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

[Xen-changelog] Fix 2.6 which has been broken since cset 3511 -- update_va_mapping() takes



# HG changeset patch
# User shand@xxxxxxxxxxxxxxxxxxxxxxxxxxx
# Node ID 0d4181ca955a1081abe17d98d3eb9c6fa66c68eb
# Parent  f91c55ca5c0f9f8cfecb30503076bdfb6776cf20
Fix 2.6 which has been broken since cset 3511 -- update_va_mapping() takes 
a PFN not a VA in the 2.x series.

Note that booting a 2.6 dom0 will spit out a few warnings - these are 
expected, and may indeed be supressed in a future checkin. 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r f91c55ca5c0f -r 0d4181ca955a 
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h    Sat Aug 
27 23:37:50 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h    Sun Aug 
28 02:42:18 2005
@@ -21,7 +21,7 @@
                       pte_t *ptep, pte_t val )
 {
     if ( ((mm != current->mm) && (mm != &init_mm)) ||
-        HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
+        HYPERVISOR_update_va_mapping( ((addr) >> PAGE_SHIFT), (val), 0 ) )
     {
         set_pte(ptep, val);
     }
diff -r f91c55ca5c0f -r 0d4181ca955a 
linux-2.6-xen-sparse/include/asm-xen/hypervisor.h
--- a/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h Sat Aug 27 23:37:50 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/hypervisor.h Sun Aug 28 02:42:18 2005
@@ -459,11 +459,9 @@
        : "memory" );
 
     if ( unlikely(ret < 0) )
-    {
-        printk(KERN_ALERT "Failed update VA mapping: %08lx, %08lx, %08lx\n",
+        printk(KERN_WARNING 
+               "Warning: failed update VA mapping: %08lx, %08lx, %08lx\n",
                page_nr, (new_val).pte_low, flags);
-        BUG();
-    }
 
     return ret;
 }
diff -r f91c55ca5c0f -r 0d4181ca955a xen/arch/x86/memory.c
--- a/xen/arch/x86/memory.c     Sat Aug 27 23:37:50 2005
+++ b/xen/arch/x86/memory.c     Sun Aug 28 02:42:18 2005
@@ -1576,7 +1576,7 @@
 
     perfc_incrc(calls_to_update_va);
 
-    if ( unlikely(page_nr >= (HYPERVISOR_VIRT_START >> PAGE_SHIFT)) )
+    if ( unlikely(page_nr >= (HYPERVISOR_VIRT_START >> PAGE_SHIFT)) ) 
         return -EINVAL;
 
     cleanup_writable_pagetable(d);
@@ -1587,7 +1587,7 @@
      */
 
     if ( unlikely(!mod_l1_entry(&linear_pg_table[page_nr], 
-                                mk_l1_pgentry(val))) )
+                                mk_l1_pgentry(val))) ) 
         err = -EINVAL;
 
     if ( unlikely(d->mm.shadow_mode) )

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