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] ptc_ga might not purge vtlb

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH] ptc_ga might not purge vtlb
From: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Date: Wed, 24 Jan 2007 11:37:25 +0900
Delivery-date: Tue, 23 Jan 2007 18:37:27 -0800
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
Hi,

SMP Windows sometimes failed to boot up with BSOD.
After the deep investigation, I found a bug.

If VTLB hasn't been used in region 0,
ptc_ga for other region doesn't purge VTLBs.

Thanks,
Kouya

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

diff -r 10dd3c907ca7 xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Tue Jan 23 12:07:02 2007 -0700
+++ b/xen/arch/ia64/vmx/vmmu.c  Wed Jan 24 11:12:03 2007 +0900
@@ -574,7 +574,8 @@ static void ptc_ga_remote_func (void *va
     mpta = ia64_get_pta();
     ia64_set_pta(v->arch.arch_vmx.mpta&(~1));
     ia64_srlz_d();
-    vmx_vcpu_ptc_l(v, REGION_OFFSET(vadr), args->ps);
+    vadr = PAGEALIGN(vadr, args->ps);
+    thash_purge_entries_remote(v, vadr, args->ps);
     VMX(v, vrr[0]) = oldrid; 
     VMX(v, psbits[0]) = oldpsbits;
     ia64_set_rr(0x0,moldrid);
diff -r 10dd3c907ca7 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Tue Jan 23 12:07:02 2007 -0700
+++ b/xen/arch/ia64/vmx/vtlb.c  Wed Jan 24 11:12:03 2007 +0900
@@ -261,7 +261,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
  *  purge software guest tlb
  */
 
-void vtlb_purge(VCPU *v, u64 va, u64 ps)
+static void vtlb_purge(VCPU *v, u64 va, u64 ps)
 {
     thash_data_t *cur;
     u64 start, curadr, size, psbits, tag, rr_ps, num;
@@ -442,6 +442,15 @@ void thash_purge_entries(VCPU *v, u64 va
     vhpt_purge(v, va, ps);
 }
 
+void thash_purge_entries_remote(VCPU *v, u64 va, u64 ps)
+{
+    u64 old_va = va;
+    va = REGION_OFFSET(va);
+    if(vcpu_quick_region_check(v->arch.tc_regions,old_va))
+        vtlb_purge(v, va, ps);
+    vhpt_purge(v, va, ps);
+}
+
 u64 translate_phy_pte(VCPU *v, u64 *pte, u64 itir, u64 va)
 {
     u64 ps, ps_mask, paddr, maddr;
diff -r 10dd3c907ca7 xen/include/asm-ia64/vmmu.h
--- a/xen/include/asm-ia64/vmmu.h       Tue Jan 23 12:07:02 2007 -0700
+++ b/xen/include/asm-ia64/vmmu.h       Wed Jan 24 11:12:03 2007 +0900
@@ -271,6 +271,7 @@ extern thash_data_t *thash_find_next_ove
  *
  */
 extern void thash_purge_entries(struct vcpu *v, u64 va, u64 ps);
+extern void thash_purge_entries_remote(struct vcpu *v, u64 va, u64 ps);
 extern void thash_purge_and_insert(struct vcpu *v, u64 pte, u64 itir, u64 ifa, 
int type);
 
 /*
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>