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

[Xen-devel] [PATCH]fix_exceeding_right_shift_under_PAE



Currently, there has a logic to check whether the EPT GFN is exceeding guest 
physical address width. It uses right shift(>>) to implement the check . But 
the right shift count is greater than the width of the type(unsigned long = 32) 
under the PAE. And this will cause guest boot fail under PAE with EPT supported.

Signed-off-by: Li Xin <xin.li@xxxxxxxxx>
Signed-off-by: Zhang Yang <yang.z.zhang@xxxxxxxxx>

diff -r fe930e1b2ce8 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Fri Aug 06 18:35:02 2010 +0100
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Mon Aug 09 09:14:41 2010 +0800
@@ -267,7 +267,7 @@
      * 3. passing a valid order.
      */
     if ( ((gfn | mfn_x(mfn)) & ((1UL << order) - 1)) ||
-         (gfn >> ((ept_get_wl(d) + 1) * EPT_TABLE_ORDER)) ||
+         ((u64)gfn >> ((ept_get_wl(d) + 1) * EPT_TABLE_ORDER)) ||
          (order % EPT_TABLE_ORDER) )
         return 0;

Attachment: fix_exceeding_right_shift.patch
Description: fix_exceeding_right_shift.patch

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

 


Rackspace

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