[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] [PATCH] ptc_ga might not purge vtlb
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |