From: Ross Philipson Date: Thu, 8 Oct 2009 19:36:35 +0000 (-0400) Subject: NC2 fixes and reorder grant table patches X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9f8cdd5b02c76f108dd42a34506d576c6911b797;p=xenclient%2Fxen-pq.git NC2 fixes and reorder grant table patches Changes to be committed: modified: master/series new file: master/xen-unstable-netchannel2-fixes --- diff --git a/master/series b/master/series index b003d4c..30c0a50 100644 --- a/master/series +++ b/master/series @@ -1,5 +1,6 @@ -xen-unstable-netchannel2 xen-unstable-19932-c0cb307d927f +xen-unstable-netchannel2 +xen-unstable-netchannel2-fixes check-open-pv-log-file fix_compilation diff --git a/master/xen-unstable-netchannel2-fixes b/master/xen-unstable-netchannel2-fixes new file mode 100644 index 0000000..6d4deb3 --- /dev/null +++ b/master/xen-unstable-netchannel2-fixes @@ -0,0 +1,97 @@ +diff --git a/tools/libxc/xc_linux.c b/tools/libxc/xc_linux.c +index c9be4f7..d17cb78 100644 +--- a/tools/libxc/xc_linux.c ++++ b/tools/libxc/xc_linux.c +@@ -15,6 +15,7 @@ + #include "xc_private.h" + + #include ++#include + #include + #include + #include +@@ -689,7 +690,7 @@ struct grant_entry_v1 *xc_gnttab_map_table_v1(int xc_handle, int domid, + return _gnttab_map_table(xc_handle, domid, gnt_num); + } + +-struct grant_entry_v2 *xc_gnttab_map_table_v2(int xc_handle, int domid, ++union grant_entry_v2 *xc_gnttab_map_table_v2(int xc_handle, int domid, + int *gnt_num) + { + if (xc_gnttab_get_version(xc_handle, domid) != 2) +diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c +index 21d26bd..34b9756 100644 +--- a/tools/libxc/xc_offline_page.c ++++ b/tools/libxc/xc_offline_page.c +@@ -149,7 +149,7 @@ static int xc_is_page_granted_v1(int xc_handle, xen_pfn_t gpfn, + } + + static int xc_is_page_granted_v2(int xc_handle, xen_pfn_t gpfn, +- struct grant_entry_v2 *gnttab, int gnt_num) ++ union grant_entry_v2 *gnttab, int gnt_num) + { + int i = 0; + +@@ -566,7 +566,7 @@ int xc_exchange_page(int xc_handle, int domid, xen_pfn_t mfn) + struct xc_mmu *mmu = NULL; + struct pte_backup old_ptes = {NULL, 0, 0}; + struct grant_entry_v1 *gnttab_v1 = NULL; +- struct grant_entry_v2 *gnttab_v2 = NULL; ++ union grant_entry_v2 *gnttab_v2 = NULL; + struct mmuext_op mops; + int gnt_num, unpined = 0; + void *old_p, *backup = NULL; +@@ -781,7 +781,7 @@ failed: + if (gnttab_v1) + munmap(gnttab_v1, gnt_num / (PAGE_SIZE/sizeof(struct grant_entry_v1))); + if (gnttab_v2) +- munmap(gnttab_v2, gnt_num / (PAGE_SIZE/sizeof(struct grant_entry_v2))); ++ munmap(gnttab_v2, gnt_num / (PAGE_SIZE/sizeof(union grant_entry_v2))); + + close_mem_info(xc_handle, &minfo); + +diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h +index 10ab1ea..50026ea 100644 +--- a/tools/libxc/xenctrl.h ++++ b/tools/libxc/xenctrl.h +@@ -942,7 +942,7 @@ int xc_gnttab_op(int xc_handle, int cmd, + + int xc_gnttab_get_version(int xc_handle, int domid); + struct grant_entry_v1 *xc_gnttab_map_table_v1(int xc_handle, int domid, int *gnt_num); +-struct grant_entry_v2 *xc_gnttab_map_table_v2(int xc_handle, int domid, int *gnt_num); ++union grant_entry_v2 *xc_gnttab_map_table_v2(int xc_handle, int domid, int *gnt_num); + + int xc_physdev_map_pirq(int xc_handle, + int domid, +diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c +index 619bada..e7a0d05 100644 +--- a/xen/arch/x86/hvm/hvm.c ++++ b/xen/arch/x86/hvm/hvm.c +@@ -1999,6 +1999,7 @@ static hvm_hypercall_t *hvm_hypercall32_table[NR_hypercalls] = { + + #else /* defined(__x86_64__) */ + ++/** NOT USED + static long hvm_grant_table_op_compat32(unsigned int cmd, + XEN_GUEST_HANDLE(void) uop, + unsigned int count) +@@ -2007,6 +2008,7 @@ static long hvm_grant_table_op_compat32(unsigned int cmd, + return -ENOSYS; + return compat_grant_table_op(cmd, uop, count); + } ++**/ + + static long hvm_memory_op_compat32(int cmd, XEN_GUEST_HANDLE(void) arg) + { +diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c +index 4265860..04c3c5c 100644 +--- a/xen/common/grant_table.c ++++ b/xen/common/grant_table.c +@@ -788,7 +788,6 @@ __gnttab_unmap_common_complete(struct gnttab_unmap_common *op) + struct domain *ld, *rd; + struct active_grant_entry *act; + grant_entry_header_t *sha; +- struct page_info *pg; + uint16_t *status; + + rd = op->rd;