[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1233115643 -32400
# Node ID 9ab1c319531f646c0ac3a3ee5c6038d16cd43e92
# Parent  4caff484c9f432c6d1baf32f58cc2f8ea7c79492
# Parent  83b71f4b5cb216d09856391d8616ee2cb6525c73
merge with linux-2.6.18-xen.hg
---
 arch/ia64/xen/xcom_privcmd.c     |   70 ---------------------------------------
 drivers/pci/Kconfig              |    2 -
 drivers/pci/pcie/portdrv_pci.c   |    2 -
 drivers/xen/pciback/conf_space.c |    5 ++
 include/xen/interface/memory.h   |   58 ++++++++++----------------------
 net/ipv4/tcp.c                   |   13 +++----
 6 files changed, 32 insertions(+), 118 deletions(-)

diff -r 4caff484c9f4 -r 9ab1c319531f arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Wed Jan 28 12:27:28 2009 +0900
+++ b/arch/ia64/xen/xcom_privcmd.c      Wed Jan 28 13:07:23 2009 +0900
@@ -567,80 +567,12 @@ xencomm_privcmd_memory_op(privcmd_hyperc
 
                return ret;
        }
-       case XENMEM_translate_gpfn_list:
-       {
-               xen_translate_gpfn_list_t kern_op;
-               xen_translate_gpfn_list_t __user *user_op;
-               struct xencomm_handle *desc_gpfn = NULL;
-               struct xencomm_handle *desc_mfn = NULL;
-               struct xencomm_handle *desc_op;
-               void *addr;
-
-               user_op = (xen_translate_gpfn_list_t __user *)
-                       hypercall->arg[1];
-               if (copy_from_user(&kern_op, user_op,
-                                  sizeof(xen_translate_gpfn_list_t)))
-                       return -EFAULT;
-               desc_op = xencomm_map_no_alloc(&kern_op, sizeof(kern_op));
-
-               if (kern_op.nr_gpfns) {
-                       /* gpfn_list.  */
-                       addr = xen_guest_handle(kern_op.gpfn_list);
-
-                       desc_gpfn = xencomm_map(addr, kern_op.nr_gpfns *
-                                            sizeof(*xen_guest_handle
-                                                   (kern_op.gpfn_list)));
-                       if (addr != NULL && kern_op.nr_gpfns > 0 &&
-                           desc_gpfn == NULL)
-                               return -ENOMEM;
-                       set_xen_guest_handle(kern_op.gpfn_list,
-                                            (void *)desc_gpfn);
-
-                       /* mfn_list.  */
-                       addr = xen_guest_handle(kern_op.mfn_list);
-
-                       desc_mfn = xencomm_map(addr, kern_op.nr_gpfns *
-                                            sizeof(*xen_guest_handle
-                                                   (kern_op.mfn_list)));
-                       if (addr != NULL && kern_op.nr_gpfns > 0 &&
-                           desc_mfn == NULL) {
-                               xencomm_free(desc_gpfn);
-                               return -ENOMEM;
-                       }
-
-                       set_xen_guest_handle(kern_op.mfn_list,
-                                            (void *)desc_mfn);
-               }
-
-               ret = xencomm_arch_hypercall_memory_op(cmd, desc_op);
-
-               xencomm_free(desc_gpfn);
-               xencomm_free(desc_mfn);
-
-               if (ret != 0)
-                       return ret;
-
-               return ret;
-       }
        case XENMEM_add_to_physmap:
-       case XENMEM_remove_from_physmap:
        {
                void __user *arg = (void __user *)hypercall->arg[1];
-               size_t argsize;
                struct xencomm_handle *desc;
 
-               switch (cmd) {
-               case XENMEM_add_to_physmap: 
-                       argsize = sizeof(struct xen_add_to_physmap);
-                       break;
-               case XENMEM_remove_from_physmap:
-                       argsize = sizeof(struct xen_remove_from_physmap);
-                       break;
-               default:
-                       BUG();
-               }
-
-               desc = xencomm_map(arg, argsize);
+               desc = xencomm_map(arg, sizeof(struct xen_add_to_physmap));
                if (desc == NULL)
                        return -ENOMEM;
 
diff -r 4caff484c9f4 -r 9ab1c319531f drivers/pci/Kconfig
--- a/drivers/pci/Kconfig       Wed Jan 28 12:27:28 2009 +0900
+++ b/drivers/pci/Kconfig       Wed Jan 28 13:07:23 2009 +0900
@@ -32,7 +32,7 @@ config PCI_DEBUG
 
 config PCI_GUESTDEV
        bool "PCI Device Reservation for Passthrough"
-       depends on PCI
+       depends on PCI && ACPI
        default y
        help
          Say Y here if you want to reserve PCI device for passthrough.
diff -r 4caff484c9f4 -r 9ab1c319531f drivers/pci/pcie/portdrv_pci.c
--- a/drivers/pci/pcie/portdrv_pci.c    Wed Jan 28 12:27:28 2009 +0900
+++ b/drivers/pci/pcie/portdrv_pci.c    Wed Jan 28 13:07:23 2009 +0900
@@ -37,7 +37,6 @@ static int pcie_portdrv_save_config(stru
        return pci_save_state(dev);
 }
 
-#ifdef CONFIG_PM
 static int pcie_portdrv_restore_config(struct pci_dev *dev)
 {
        int retval;
@@ -50,6 +49,7 @@ static int pcie_portdrv_restore_config(s
        return 0;
 }
 
+#ifdef CONFIG_PM
 static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state)
 {
        int ret = pcie_port_device_suspend(dev, state);
diff -r 4caff484c9f4 -r 9ab1c319531f drivers/xen/pciback/conf_space.c
--- a/drivers/xen/pciback/conf_space.c  Wed Jan 28 12:27:28 2009 +0900
+++ b/drivers/xen/pciback/conf_space.c  Wed Jan 28 13:07:23 2009 +0900
@@ -14,6 +14,9 @@
 #include "pciback.h"
 #include "conf_space.h"
 #include "conf_space_quirks.h"
+
+static int permissive;
+module_param(permissive, bool, 0644);
 
 #define DEFINE_PCI_CONFIG(op,size,type)                        \
 int pciback_##op##_config_##size                               \
@@ -255,7 +258,7 @@ int pciback_config_write(struct pci_dev 
                 * This means that some fields may still be read-only because
                 * they have entries in the config_field list that intercept
                 * the write and do nothing. */
-               if (dev_data->permissive) {
+               if (dev_data->permissive || permissive) {
                        switch (size) {
                        case 1:
                                err = pci_write_config_byte(dev, offset,
diff -r 4caff484c9f4 -r 9ab1c319531f include/xen/interface/memory.h
--- a/include/xen/interface/memory.h    Wed Jan 28 12:27:28 2009 +0900
+++ b/include/xen/interface/memory.h    Wed Jan 28 13:07:23 2009 +0900
@@ -48,6 +48,8 @@
 /* NUMA node to allocate from. */
 #define XENMEMF_node(x)     (((x) + 1) << 8)
 #define XENMEMF_get_node(x) ((((x) >> 8) - 1) & 0xffu)
+/* Flag to populate physmap with populate-on-demand entries */
+#define XENMEMF_populate_on_demand (1<<16)
 #endif
 
 struct xen_memory_reservation {
@@ -204,7 +206,7 @@ struct xen_add_to_physmap {
     /* Source mapping space. */
 #define XENMAPSPACE_shared_info 0 /* shared info page */
 #define XENMAPSPACE_grant_table 1 /* grant table page */
-#define XENMAPSPACE_mfn         2 /* usual MFN */
+#define XENMAPSPACE_gmfn        2 /* GMFN */
     unsigned int space;
 
     /* Index into source mapping space. */
@@ -216,45 +218,8 @@ typedef struct xen_add_to_physmap xen_ad
 typedef struct xen_add_to_physmap xen_add_to_physmap_t;
 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
 
-/*
- * Unmaps the page appearing at a particular GPFN from the specified guest's
- * pseudophysical address space.
- * arg == addr of xen_remove_from_physmap_t.
- */
-#define XENMEM_remove_from_physmap      15
-struct xen_remove_from_physmap {
-    /* Which domain to change the mapping for. */
-    domid_t domid;
-
-    /* GPFN of the current mapping of the page. */
-    xen_pfn_t     gpfn;
-};
-typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;
-DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);
-
-/*
- * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
- * code on failure. This call only works for auto-translated guests.
- */
-#define XENMEM_translate_gpfn_list  8
-struct xen_translate_gpfn_list {
-    /* Which domain to translate for? */
-    domid_t domid;
-
-    /* Length of list. */
-    xen_ulong_t nr_gpfns;
-
-    /* List of GPFNs to translate. */
-    XEN_GUEST_HANDLE(xen_pfn_t) gpfn_list;
-
-    /*
-     * Output list to contain MFN translations. May be the same as the input
-     * list (in which case each input GPFN is overwritten with the output MFN).
-     */
-    XEN_GUEST_HANDLE(xen_pfn_t) mfn_list;
-};
-typedef struct xen_translate_gpfn_list xen_translate_gpfn_list_t;
-DEFINE_XEN_GUEST_HANDLE(xen_translate_gpfn_list_t);
+/*** REMOVED ***/
+/*#define XENMEM_translate_gpfn_list  8*/
 
 /*
  * Returns the pseudo-physical memory map as it was when the domain
@@ -299,6 +264,19 @@ typedef struct xen_foreign_memory_map xe
 typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
 DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
 
+#define XENMEM_set_pod_target       16
+#define XENMEM_get_pod_target       17
+struct xen_pod_target {
+    /* IN */
+    uint64_t target_pages;
+    /* OUT */
+    uint64_t tot_pages;
+    uint64_t pod_cache_pages;
+    uint64_t pod_entries;
+    /* IN */
+    domid_t domid;
+};
+typedef struct xen_pod_target xen_pod_target_t;
 #endif /* __XEN_PUBLIC_MEMORY_H__ */
 
 /*
diff -r 4caff484c9f4 -r 9ab1c319531f net/ipv4/tcp.c
--- a/net/ipv4/tcp.c    Wed Jan 28 12:27:28 2009 +0900
+++ b/net/ipv4/tcp.c    Wed Jan 28 13:07:23 2009 +0900
@@ -2153,7 +2153,7 @@ struct sk_buff *tcp_tso_segment(struct s
        unsigned int seq;
        unsigned int delta;
        unsigned int oldlen;
-       unsigned int len;
+       unsigned int mss;
 
        if (!pskb_may_pull(skb, sizeof(*th)))
                goto out;
@@ -2169,10 +2169,13 @@ struct sk_buff *tcp_tso_segment(struct s
        oldlen = (u16)~skb->len;
        __skb_pull(skb, thlen);
 
+       mss = skb_shinfo(skb)->gso_size;
+       if (unlikely(skb->len <= mss))
+               goto out;
+
        if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
                /* Packet is from an untrusted source, reset gso_segs. */
                int type = skb_shinfo(skb)->gso_type;
-               int mss;
 
                if (unlikely(type &
                             ~(SKB_GSO_TCPV4 |
@@ -2183,7 +2186,6 @@ struct sk_buff *tcp_tso_segment(struct s
                             !(type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))))
                        goto out;
 
-               mss = skb_shinfo(skb)->gso_size;
                skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
 
                segs = NULL;
@@ -2194,8 +2196,7 @@ struct sk_buff *tcp_tso_segment(struct s
        if (IS_ERR(segs))
                goto out;
 
-       len = skb_shinfo(skb)->gso_size;
-       delta = htonl(oldlen + (thlen + len));
+       delta = htonl(oldlen + (thlen + mss));
 
        skb = segs;
        th = skb->h.th;
@@ -2209,7 +2210,7 @@ struct sk_buff *tcp_tso_segment(struct s
                        th->check = csum_fold(csum_partial(skb->h.raw, thlen,
                                                           skb->csum));
 
-               seq += len;
+               seq += mss;
                skb = skb->next;
                th = skb->h.th;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.