ia64/linux-2.6.18-xen.hg

changeset 782:9ab1c319531f

merge with linux-2.6.18-xen.hg
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jan 28 13:07:23 2009 +0900 (2009-01-28)
parents 4caff484c9f4 83b71f4b5cb2
children b790b287bf47
files arch/ia64/xen/xcom_privcmd.c
line diff
     1.1 --- a/arch/ia64/xen/xcom_privcmd.c	Wed Jan 28 12:27:28 2009 +0900
     1.2 +++ b/arch/ia64/xen/xcom_privcmd.c	Wed Jan 28 13:07:23 2009 +0900
     1.3 @@ -567,80 +567,12 @@ xencomm_privcmd_memory_op(privcmd_hyperc
     1.4  
     1.5  		return ret;
     1.6  	}
     1.7 -	case XENMEM_translate_gpfn_list:
     1.8 -	{
     1.9 -		xen_translate_gpfn_list_t kern_op;
    1.10 -		xen_translate_gpfn_list_t __user *user_op;
    1.11 -		struct xencomm_handle *desc_gpfn = NULL;
    1.12 -		struct xencomm_handle *desc_mfn = NULL;
    1.13 -		struct xencomm_handle *desc_op;
    1.14 -		void *addr;
    1.15 -
    1.16 -		user_op = (xen_translate_gpfn_list_t __user *)
    1.17 -			hypercall->arg[1];
    1.18 -		if (copy_from_user(&kern_op, user_op,
    1.19 -		                   sizeof(xen_translate_gpfn_list_t)))
    1.20 -			return -EFAULT;
    1.21 -		desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
    1.22 -
    1.23 -		if (kern_op.nr_gpfns) {
    1.24 -			/* gpfn_list.  */
    1.25 -			addr = xen_guest_handle(kern_op.gpfn_list);
    1.26 -
    1.27 -			desc_gpfn = xencomm_map(addr, kern_op.nr_gpfns *
    1.28 -			                     sizeof(*xen_guest_handle
    1.29 -			                            (kern_op.gpfn_list)));
    1.30 -			if (addr != NULL && kern_op.nr_gpfns > 0 &&
    1.31 -			    desc_gpfn == NULL)
    1.32 -				return -ENOMEM;
    1.33 -			set_xen_guest_handle(kern_op.gpfn_list,
    1.34 -			                     (void *)desc_gpfn);
    1.35 -
    1.36 -			/* mfn_list.  */
    1.37 -			addr = xen_guest_handle(kern_op.mfn_list);
    1.38 -
    1.39 -			desc_mfn = xencomm_map(addr, kern_op.nr_gpfns *
    1.40 -			                     sizeof(*xen_guest_handle
    1.41 -			                            (kern_op.mfn_list)));
    1.42 -			if (addr != NULL && kern_op.nr_gpfns > 0 &&
    1.43 -			    desc_mfn == NULL) {
    1.44 -				xencomm_free(desc_gpfn);
    1.45 -				return -ENOMEM;
    1.46 -			}
    1.47 -
    1.48 -			set_xen_guest_handle(kern_op.mfn_list,
    1.49 -			                     (void *)desc_mfn);
    1.50 -		}
    1.51 -
    1.52 -		ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
    1.53 -
    1.54 -		xencomm_free(desc_gpfn);
    1.55 -		xencomm_free(desc_mfn);
    1.56 -
    1.57 -		if (ret != 0)
    1.58 -			return ret;
    1.59 -
    1.60 -		return ret;
    1.61 -	}
    1.62  	case XENMEM_add_to_physmap:
    1.63 -	case XENMEM_remove_from_physmap:
    1.64  	{
    1.65  		void __user *arg = (void __user *)hypercall->arg[1];
    1.66 -		size_t argsize;
    1.67  		struct xencomm_handle *desc;
    1.68  
    1.69 -		switch (cmd) {
    1.70 -		case XENMEM_add_to_physmap: 
    1.71 -			argsize = sizeof(struct xen_add_to_physmap);
    1.72 -			break;
    1.73 -		case XENMEM_remove_from_physmap:
    1.74 -			argsize = sizeof(struct xen_remove_from_physmap);
    1.75 -			break;
    1.76 -		default:
    1.77 -			BUG();
    1.78 -		}
    1.79 -
    1.80 -		desc = xencomm_map(arg, argsize);
    1.81 +		desc = xencomm_map(arg, sizeof(struct xen_add_to_physmap));
    1.82  		if (desc == NULL)
    1.83  			return -ENOMEM;
    1.84  
     2.1 --- a/drivers/pci/Kconfig	Wed Jan 28 12:27:28 2009 +0900
     2.2 +++ b/drivers/pci/Kconfig	Wed Jan 28 13:07:23 2009 +0900
     2.3 @@ -32,7 +32,7 @@ config PCI_DEBUG
     2.4  
     2.5  config PCI_GUESTDEV
     2.6  	bool "PCI Device Reservation for Passthrough"
     2.7 -	depends on PCI
     2.8 +	depends on PCI && ACPI
     2.9  	default y
    2.10  	help
    2.11  	  Say Y here if you want to reserve PCI device for passthrough.
     3.1 --- a/drivers/pci/pcie/portdrv_pci.c	Wed Jan 28 12:27:28 2009 +0900
     3.2 +++ b/drivers/pci/pcie/portdrv_pci.c	Wed Jan 28 13:07:23 2009 +0900
     3.3 @@ -37,7 +37,6 @@ static int pcie_portdrv_save_config(stru
     3.4  	return pci_save_state(dev);
     3.5  }
     3.6  
     3.7 -#ifdef CONFIG_PM
     3.8  static int pcie_portdrv_restore_config(struct pci_dev *dev)
     3.9  {
    3.10  	int retval;
    3.11 @@ -50,6 +49,7 @@ static int pcie_portdrv_restore_config(s
    3.12  	return 0;
    3.13  }
    3.14  
    3.15 +#ifdef CONFIG_PM
    3.16  static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state)
    3.17  {
    3.18  	int ret = pcie_port_device_suspend(dev, state);
     4.1 --- a/drivers/xen/pciback/conf_space.c	Wed Jan 28 12:27:28 2009 +0900
     4.2 +++ b/drivers/xen/pciback/conf_space.c	Wed Jan 28 13:07:23 2009 +0900
     4.3 @@ -15,6 +15,9 @@
     4.4  #include "conf_space.h"
     4.5  #include "conf_space_quirks.h"
     4.6  
     4.7 +static int permissive;
     4.8 +module_param(permissive, bool, 0644);
     4.9 +
    4.10  #define DEFINE_PCI_CONFIG(op,size,type) 			\
    4.11  int pciback_##op##_config_##size 				\
    4.12  (struct pci_dev *dev, int offset, type value, void *data)	\
    4.13 @@ -255,7 +258,7 @@ int pciback_config_write(struct pci_dev 
    4.14  		 * This means that some fields may still be read-only because
    4.15  		 * they have entries in the config_field list that intercept
    4.16  		 * the write and do nothing. */
    4.17 -		if (dev_data->permissive) {
    4.18 +		if (dev_data->permissive || permissive) {
    4.19  			switch (size) {
    4.20  			case 1:
    4.21  				err = pci_write_config_byte(dev, offset,
     5.1 --- a/include/xen/interface/memory.h	Wed Jan 28 12:27:28 2009 +0900
     5.2 +++ b/include/xen/interface/memory.h	Wed Jan 28 13:07:23 2009 +0900
     5.3 @@ -48,6 +48,8 @@
     5.4  /* NUMA node to allocate from. */
     5.5  #define XENMEMF_node(x)     (((x) + 1) << 8)
     5.6  #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
     5.7 +/* Flag to populate physmap with populate-on-demand entries */
     5.8 +#define XENMEMF_populate_on_demand (1<<16)
     5.9  #endif
    5.10  
    5.11  struct xen_memory_reservation {
    5.12 @@ -204,7 +206,7 @@ struct xen_add_to_physmap {
    5.13      /* Source mapping space. */
    5.14  #define XENMAPSPACE_shared_info 0 /* shared info page */
    5.15  #define XENMAPSPACE_grant_table 1 /* grant table page */
    5.16 -#define XENMAPSPACE_mfn         2 /* usual MFN */
    5.17 +#define XENMAPSPACE_gmfn        2 /* GMFN */
    5.18      unsigned int space;
    5.19  
    5.20      /* Index into source mapping space. */
    5.21 @@ -216,45 +218,8 @@ struct xen_add_to_physmap {
    5.22  typedef struct xen_add_to_physmap xen_add_to_physmap_t;
    5.23  DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
    5.24  
    5.25 -/*
    5.26 - * Unmaps the page appearing at a particular GPFN from the specified guest's
    5.27 - * pseudophysical address space.
    5.28 - * arg == addr of xen_remove_from_physmap_t.
    5.29 - */
    5.30 -#define XENMEM_remove_from_physmap      15
    5.31 -struct xen_remove_from_physmap {
    5.32 -    /* Which domain to change the mapping for. */
    5.33 -    domid_t domid;
    5.34 -
    5.35 -    /* GPFN of the current mapping of the page. */
    5.36 -    xen_pfn_t     gpfn;
    5.37 -};
    5.38 -typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;
    5.39 -DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);
    5.40 -
    5.41 -/*
    5.42 - * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
    5.43 - * code on failure. This call only works for auto-translated guests.
    5.44 - */
    5.45 -#define XENMEM_translate_gpfn_list  8
    5.46 -struct xen_translate_gpfn_list {
    5.47 -    /* Which domain to translate for? */
    5.48 -    domid_t domid;
    5.49 -
    5.50 -    /* Length of list. */
    5.51 -    xen_ulong_t nr_gpfns;
    5.52 -
    5.53 -    /* List of GPFNs to translate. */
    5.54 -    XEN_GUEST_HANDLE(xen_pfn_t) gpfn_list;
    5.55 -
    5.56 -    /*
    5.57 -     * Output list to contain MFN translations. May be the same as the input
    5.58 -     * list (in which case each input GPFN is overwritten with the output MFN).
    5.59 -     */
    5.60 -    XEN_GUEST_HANDLE(xen_pfn_t) mfn_list;
    5.61 -};
    5.62 -typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t;
    5.63 -DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t);
    5.64 +/*** REMOVED ***/
    5.65 +/*#define XENMEM_translate_gpfn_list  8*/
    5.66  
    5.67  /*
    5.68   * Returns the pseudo-physical memory map as it was when the domain
    5.69 @@ -299,6 +264,19 @@ struct xen_foreign_memory_map {
    5.70  typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
    5.71  DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
    5.72  
    5.73 +#define XENMEM_set_pod_target       16
    5.74 +#define XENMEM_get_pod_target       17
    5.75 +struct xen_pod_target {
    5.76 +    /* IN */
    5.77 +    uint64_t target_pages;
    5.78 +    /* OUT */
    5.79 +    uint64_t tot_pages;
    5.80 +    uint64_t pod_cache_pages;
    5.81 +    uint64_t pod_entries;
    5.82 +    /* IN */
    5.83 +    domid_t domid;
    5.84 +};
    5.85 +typedef struct xen_pod_target xen_pod_target_t;
    5.86  #endif /* __XEN_PUBLIC_MEMORY_H__ */
    5.87  
    5.88  /*
     6.1 --- a/net/ipv4/tcp.c	Wed Jan 28 12:27:28 2009 +0900
     6.2 +++ b/net/ipv4/tcp.c	Wed Jan 28 13:07:23 2009 +0900
     6.3 @@ -2153,7 +2153,7 @@ struct sk_buff *tcp_tso_segment(struct s
     6.4  	unsigned int seq;
     6.5  	unsigned int delta;
     6.6  	unsigned int oldlen;
     6.7 -	unsigned int len;
     6.8 +	unsigned int mss;
     6.9  
    6.10  	if (!pskb_may_pull(skb, sizeof(*th)))
    6.11  		goto out;
    6.12 @@ -2169,10 +2169,13 @@ struct sk_buff *tcp_tso_segment(struct s
    6.13  	oldlen = (u16)~skb->len;
    6.14  	__skb_pull(skb, thlen);
    6.15  
    6.16 +	mss = skb_shinfo(skb)->gso_size;
    6.17 +	if (unlikely(skb->len <= mss))
    6.18 +		goto out;
    6.19 +
    6.20  	if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
    6.21  		/* Packet is from an untrusted source, reset gso_segs. */
    6.22  		int type = skb_shinfo(skb)->gso_type;
    6.23 -		int mss;
    6.24  
    6.25  		if (unlikely(type &
    6.26  			     ~(SKB_GSO_TCPV4 |
    6.27 @@ -2183,7 +2186,6 @@ struct sk_buff *tcp_tso_segment(struct s
    6.28  			     !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))))
    6.29  			goto out;
    6.30  
    6.31 -		mss = skb_shinfo(skb)->gso_size;
    6.32  		skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
    6.33  
    6.34  		segs = NULL;
    6.35 @@ -2194,8 +2196,7 @@ struct sk_buff *tcp_tso_segment(struct s
    6.36  	if (IS_ERR(segs))
    6.37  		goto out;
    6.38  
    6.39 -	len = skb_shinfo(skb)->gso_size;
    6.40 -	delta = htonl(oldlen + (thlen + len));
    6.41 +	delta = htonl(oldlen + (thlen + mss));
    6.42  
    6.43  	skb = segs;
    6.44  	th = skb->h.th;
    6.45 @@ -2209,7 +2210,7 @@ struct sk_buff *tcp_tso_segment(struct s
    6.46  			th->check = csum_fold(csum_partial(skb->h.raw, thlen,
    6.47  							   skb->csum));
    6.48  
    6.49 -		seq += len;
    6.50 +		seq += mss;
    6.51  		skb = skb->next;
    6.52  		th = skb->h.th;
    6.53