]> xenbits.xensource.com Git - xen.git/commitdiff
[IA64] Fix TLB insertion for subpaging
authorAlex Williamson <alex.williamson@hp.com>
Fri, 12 Oct 2007 20:49:37 +0000 (14:49 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Fri, 12 Oct 2007 20:49:37 +0000 (14:49 -0600)
Without this patch, Longhorn is sure to hang up.  .NET application
might hit this bug.  itc.i instruction is repeated forever, because
TLB entry with smaller page size is volatile.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/ia64/vmx/vtlb.c

index 5680250e3dc8fe3f68b60e048c887a3c7f4fbe56..07d840feffa887a8d6f62e4ab590f4e0bd8fa579 100644 (file)
@@ -572,13 +572,16 @@ int thash_purge_and_insert(VCPU *v, u64 pte, u64 itir, u64 ifa, int type)
         }
         else {
             u64 psr;
-            phy_pte  &= ~PAGE_FLAGS_RV_MASK;
-            psr = ia64_clear_ic();
-            ia64_itc(type + 1, ifa, phy_pte, IA64_ITIR_PS_KEY(ps, 0));
-            ia64_set_psr(psr);
-            ia64_srlz_i();
-            // ps < mrr.ps, this is not supported
-            // panic_domain(NULL, "%s: ps (%lx) < mrr.ps \n", __func__, ps);
+
+            vtlb_insert(v, pte, itir, ifa);
+            vcpu_quick_region_set(PSCBX(v, tc_regions), ifa);
+            if (!(pte & VTLB_PTE_IO)) {
+                phy_pte  &= ~PAGE_FLAGS_RV_MASK;
+                psr = ia64_clear_ic();
+                ia64_itc(type + 1, ifa, phy_pte, IA64_ITIR_PS_KEY(ps, 0));
+                ia64_set_psr(psr);
+                ia64_srlz_i();
+            }
         }
     }
     else{