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][RFC] fix DTLB miss behavior with physical mode

Hi,

A behavior with bad physical address on HVM is unpredictable.
It means that a speculative load can't be used with physical mode.

This patch fixes it. but it still implies a issue with metaphyscial
mode. There is no way to distinguish RSE fault from DTLB miss.
Is there any good idea?

Thanks,
Kouya

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

diff -r 2d220f1d2254 xen/arch/ia64/vmx/vmx_fault.c
--- a/xen/arch/ia64/vmx/vmx_fault.c     Fri Mar 14 13:05:27 2008 +0900
+++ b/xen/arch/ia64/vmx/vmx_fault.c     Fri Mar 14 14:47:29 2008 +0900
@@ -356,11 +356,17 @@ vmx_hpw_miss(u64 vadr, u64 vec, REGS* re
     else
         panic_domain(regs, "wrong vec:%lx\n", vec);
 
-    /* Physical mode and region is 0 or 4.  */
     mmu_mode = VMX_MMU_MODE(v);
-    if ((mmu_mode == VMX_MMU_PHY_DT
-         || (mmu_mode == VMX_MMU_PHY_D && type == DSIDE_TLB))
-        && (REGION_NUMBER(vadr) & 3) == 0) {
+    switch (mmu_mode) {
+    case VMX_MMU_PHY_D:  // vpsr.it=1 vpsr.dt=0 vpsr.rt=1
+        if (type != DSIDE_TLB)
+            break;
+        /* FIXME: There is no way to distinguish RSE fault from DTLB miss. */
+        if (REGION_NUMBER(regs->ar_bspstore) == REGION_NUMBER(vadr) &&
+            (REGION_NUMBER(vadr) & 3) != 0)
+            break; // Maybe RSE fault
+        /* fall through */
+    case VMX_MMU_PHY_DT: // vpsr.it=0 vpsr.dt=0 vpsr.rt=0
         if (type == DSIDE_TLB) {
             u64 pte;
             /* DTLB miss.  */
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel