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-devel

[Xen-devel] [PATCH]fix_exceeding_right_shift_under_PAE

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]fix_exceeding_right_shift_under_PAE
From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
Date: Mon, 9 Aug 2010 21:57:01 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 09 Aug 2010 06:58:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acs3yr26fiDnLKBJRxywqN4o529cTg==
Thread-topic: [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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]fix_exceeding_right_shift_under_PAE, Zhang, Yang Z <=