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

[Xen-changelog] Merged.



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 9da47130ff421727defa26bd91c22bec1125a87f
# Parent  c0ef782130dbe624fa72255d0929b0ffa043a3c2
# Parent  4c0606fb701bf3135377cc86f4f56028355d3d1c
Merged.

diff -r c0ef782130db -r 9da47130ff42 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
11:10:08 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Thu Nov 17 
11:12:57 2005
@@ -219,7 +219,6 @@
 
 #ifndef __ia64__
        case IOCTL_PRIVCMD_GET_MACH2PHYS_MFNS: {
-
                pgd_t *pgd; 
                pud_t *pud; 
                pmd_t *pmd; 
@@ -235,13 +234,13 @@
 
                p = m.arr; 
 
-               for(i=0; i < m.num; i++) { 
-
+               for (i=0; i < m.num; i++) { 
                        pgd = pgd_offset_k(m2pv);
                        pud = pud_offset(pgd, m2pv);
                        pmd = pmd_offset(pud, m2pv);
-                       m2p_mfn = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
-                       
+                       m2p_mfn  = (*(uint64_t *)pmd >> PAGE_SHIFT)&0xFFFFFFFF;
+                       m2p_mfn += pte_index(m2pv);
+
                        if (put_user(m2p_mfn, p + i))
                                return -EFAULT;
 
diff -r c0ef782130db -r 9da47130ff42 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Thu Nov 17 11:10:08 2005
+++ b/tools/libxc/xc_linux_restore.c    Thu Nov 17 11:12:57 2005
@@ -146,7 +146,7 @@
     unsigned long buf[PAGE_SIZE/sizeof(unsigned long)];
 
     struct mmuext_op pin[MAX_PIN_BATCH];
-    unsigned int nr_pins = 0;
+    unsigned int nr_pins; 
 
 
     max_pfn = nr_pfns; 
@@ -501,7 +501,16 @@
      * Pin page tables. Do this after writing to them as otherwise Xen
      * will barf when doing the type-checking.
      */
+    nr_pins = 0; 
     for (i = 0; i < max_pfn; i++) {
+
+        if (i == (max_pfn-1) || nr_pins == MAX_PIN_BATCH) {
+            if (xc_mmuext_op(xc_handle, pin, nr_pins, dom) < 0) { 
+                ERR("Failed to pin batch of %d page tables", nr_pins); 
+                goto out;
+            } 
+            nr_pins = 0;
+        }
 
         if ( (pfn_type[i] & LPINTAB) == 0 )
             continue;
@@ -529,16 +538,8 @@
         }
 
         pin[nr_pins].arg1.mfn = p2m[i];
-
-        nr_pins ++; 
-        
-        if (i == (max_pfn-1) || nr_pins == MAX_PIN_BATCH) {
-            if (xc_mmuext_op(xc_handle, pin, nr_pins, dom) < 0) { 
-                ERR("Failed to pin batch of %d page tables", nr_pins); 
-                goto out;
-            } 
-            nr_pins = 0;
-        }
+        nr_pins++; 
+
     }
 
     DPRINTF("\b\b\b\b100%%\n");

_______________________________________________
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®.