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

[Xen-ia64-devel] [PATCH] Fix vmx_vcpu_thash()

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] Fix vmx_vcpu_thash()
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Thu, 7 Jun 2007 20:30:43 +0900
Delivery-date: Thu, 07 Jun 2007 04:29:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
It looks obviously wrong.
A guest OS which uses long format VHPT might be confused.

-- Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 96331db61e47 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Wed Jun 06 09:30:01 2007 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Thu Jun 07 19:15:33 2007 +0900
@@ -646,7 +646,7 @@ u64 vmx_vcpu_thash(VCPU *vcpu, u64 vadr)
     if(vpta.vf){
         pval = ia64_call_vsa(PAL_VPS_THASH, vadr, vrr.rrval,
                              vpta.val, 0, 0, 0, 0);
-        pval = vpta.val & ~0xffff;
+        pval = (vpta.val & ~0x7FFF) | (pval & ((1UL << vpta.size) - 1));
     }else{
         vhpt_offset=((vadr>>vrr.ps)<<3)&((1UL<<(vpta.size))-1);
         pval = (vadr & VRN_MASK) |
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel