WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxenctrl: Build fix after gnttab_v2 cha

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenctrl: Build fix after gnttab_v2 changes.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Oct 2009 02:30:18 -0700
Delivery-date: Wed, 07 Oct 2009 02:30:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1254907599 -3600
# Node ID f9cbb5a274d668e54ab6cdf00d88a1b7da665514
# Parent  8b4fa7d997b52ecab4c942f9c9066227ce07b8a9
libxenctrl: Build fix after gnttab_v2 changes.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_linux.c        |   12 ++++++------
 tools/libxc/xc_offline_page.c |   14 +++++++-------
 tools/libxc/xenctrl.h         |    4 ++--
 3 files changed, 15 insertions(+), 15 deletions(-)

diff -r 8b4fa7d997b5 -r f9cbb5a274d6 tools/libxc/xc_linux.c
--- a/tools/libxc/xc_linux.c    Wed Oct 07 08:42:50 2009 +0100
+++ b/tools/libxc/xc_linux.c    Wed Oct 07 10:26:39 2009 +0100
@@ -579,7 +579,7 @@ static void *_gnttab_map_table(int xc_ha
     struct gnttab_setup_table setup;
     unsigned long *frame_list = NULL;
     xen_pfn_t *pfn_list = NULL;
-    struct grant_entry_v1 *gnt = NULL;
+    grant_entry_v1_t *gnt = NULL;
 
     if (!gnt_num)
         return NULL;
@@ -595,7 +595,7 @@ static void *_gnttab_map_table(int xc_ha
     }
 
     *gnt_num = query.nr_frames *
-            (PAGE_SIZE / sizeof(struct grant_entry_v1) );
+            (PAGE_SIZE / sizeof(grant_entry_v1_t) );
 
     frame_list = malloc(query.nr_frames * sizeof(unsigned long));
     if (!frame_list || lock_pages(frame_list, query.nr_frames *
@@ -652,16 +652,16 @@ err:
     return gnt;
 }
 
-struct grant_entry_v1 *xc_gnttab_map_table_v1(int xc_handle, int domid,
-                                              int *gnt_num)
+grant_entry_v1_t *xc_gnttab_map_table_v1(int xc_handle, int domid,
+                                         int *gnt_num)
 {
     if (xc_gnttab_get_version(xc_handle, domid) == 2)
         return NULL;
     return _gnttab_map_table(xc_handle, domid, gnt_num);
 }
 
-struct grant_entry_v2 *xc_gnttab_map_table_v2(int xc_handle, int domid,
-                                              int *gnt_num)
+grant_entry_v2_t *xc_gnttab_map_table_v2(int xc_handle, int domid,
+                                         int *gnt_num)
 {
     if (xc_gnttab_get_version(xc_handle, domid) != 2)
         return NULL;
diff -r 8b4fa7d997b5 -r f9cbb5a274d6 tools/libxc/xc_offline_page.c
--- a/tools/libxc/xc_offline_page.c     Wed Oct 07 08:42:50 2009 +0100
+++ b/tools/libxc/xc_offline_page.c     Wed Oct 07 10:26:39 2009 +0100
@@ -133,7 +133,7 @@ int xc_query_page_offline_status(int xc,
   * There should no update to the grant when domain paused
   */
 static int xc_is_page_granted_v1(int xc_handle, xen_pfn_t gpfn,
-                                 struct grant_entry_v1 *gnttab, int gnt_num)
+                                 grant_entry_v1_t *gnttab, int gnt_num)
 {
     int i = 0;
 
@@ -149,7 +149,7 @@ static int xc_is_page_granted_v1(int xc_
 }
 
 static int xc_is_page_granted_v2(int xc_handle, xen_pfn_t gpfn,
-                                 struct grant_entry_v2 *gnttab, int gnt_num)
+                                 grant_entry_v2_t *gnttab, int gnt_num)
 {
     int i = 0;
 
@@ -158,7 +158,7 @@ static int xc_is_page_granted_v2(int xc_
 
     for (i = 0; i < gnt_num; i++)
         if ( ((gnttab[i].hdr.flags & GTF_type_mask) !=  GTF_invalid) &&
-             (gnttab[i].frame == gpfn) )
+             (gnttab[i].full_page.frame == gpfn) )
              break;
 
    return (i != gnt_num);
@@ -565,8 +565,8 @@ int xc_exchange_page(int xc_handle, int 
     struct domain_mem_info minfo;
     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;
+    grant_entry_v1_t *gnttab_v1 = NULL;
+    grant_entry_v2_t *gnttab_v2 = NULL;
     struct mmuext_op mops;
     int gnt_num, unpined = 0;
     void *old_p, *backup = NULL;
@@ -779,9 +779,9 @@ failed:
         free(backup);
 
     if (gnttab_v1)
-        munmap(gnttab_v1, gnt_num / (PAGE_SIZE/sizeof(struct grant_entry_v1)));
+        munmap(gnttab_v1, gnt_num / (PAGE_SIZE/sizeof(grant_entry_v1_t)));
     if (gnttab_v2)
-        munmap(gnttab_v2, gnt_num / (PAGE_SIZE/sizeof(struct grant_entry_v2)));
+        munmap(gnttab_v2, gnt_num / (PAGE_SIZE/sizeof(grant_entry_v2_t)));
 
     close_mem_info(xc_handle, &minfo);
 
diff -r 8b4fa7d997b5 -r f9cbb5a274d6 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Wed Oct 07 08:42:50 2009 +0100
+++ b/tools/libxc/xenctrl.h     Wed Oct 07 10:26:39 2009 +0100
@@ -944,8 +944,8 @@ int xc_gnttab_op(int xc_handle, int cmd,
                  void * op, int op_size, int count);
 
 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);
+grant_entry_v1_t *xc_gnttab_map_table_v1(int xc_handle, int domid, int 
*gnt_num);
+grant_entry_v2_t *xc_gnttab_map_table_v2(int xc_handle, int domid, int 
*gnt_num);
 
 int xc_physdev_map_pirq(int xc_handle,
                         int domid,

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxenctrl: Build fix after gnttab_v2 changes., Xen patchbot-unstable <=