ia64/xen-unstable

changeset 13473:1487b2114fc2

[IA64] ptc_ga might not purge vtlb

SMP Windows sometimes failed to boot up with BSOD.

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

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Wed Jan 24 12:16:44 2007 -0700 (2007-01-24)
parents 10dd3c907ca7
children b8de061f3dc6
files xen/arch/ia64/vmx/vmmu.c xen/arch/ia64/vmx/vtlb.c xen/include/asm-ia64/vmmu.h
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmmu.c	Tue Jan 23 12:07:02 2007 -0700
     1.2 +++ b/xen/arch/ia64/vmx/vmmu.c	Wed Jan 24 12:16:44 2007 -0700
     1.3 @@ -574,7 +574,8 @@ static void ptc_ga_remote_func (void *va
     1.4      mpta = ia64_get_pta();
     1.5      ia64_set_pta(v->arch.arch_vmx.mpta&(~1));
     1.6      ia64_srlz_d();
     1.7 -    vmx_vcpu_ptc_l(v, REGION_OFFSET(vadr), args->ps);
     1.8 +    vadr = PAGEALIGN(vadr, args->ps);
     1.9 +    thash_purge_entries_remote(v, vadr, args->ps);
    1.10      VMX(v, vrr[0]) = oldrid; 
    1.11      VMX(v, psbits[0]) = oldpsbits;
    1.12      ia64_set_rr(0x0,moldrid);
     2.1 --- a/xen/arch/ia64/vmx/vtlb.c	Tue Jan 23 12:07:02 2007 -0700
     2.2 +++ b/xen/arch/ia64/vmx/vtlb.c	Wed Jan 24 12:16:44 2007 -0700
     2.3 @@ -261,7 +261,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
     2.4   *  purge software guest tlb
     2.5   */
     2.6  
     2.7 -void vtlb_purge(VCPU *v, u64 va, u64 ps)
     2.8 +static void vtlb_purge(VCPU *v, u64 va, u64 ps)
     2.9  {
    2.10      thash_data_t *cur;
    2.11      u64 start, curadr, size, psbits, tag, rr_ps, num;
    2.12 @@ -442,6 +442,15 @@ void thash_purge_entries(VCPU *v, u64 va
    2.13      vhpt_purge(v, va, ps);
    2.14  }
    2.15  
    2.16 +void thash_purge_entries_remote(VCPU *v, u64 va, u64 ps)
    2.17 +{
    2.18 +    u64 old_va = va;
    2.19 +    va = REGION_OFFSET(va);
    2.20 +    if (vcpu_quick_region_check(v->arch.tc_regions, old_va))
    2.21 +        vtlb_purge(v, va, ps);
    2.22 +    vhpt_purge(v, va, ps);
    2.23 +}
    2.24 +
    2.25  u64 translate_phy_pte(VCPU *v, u64 *pte, u64 itir, u64 va)
    2.26  {
    2.27      u64 ps, ps_mask, paddr, maddr;
     3.1 --- a/xen/include/asm-ia64/vmmu.h	Tue Jan 23 12:07:02 2007 -0700
     3.2 +++ b/xen/include/asm-ia64/vmmu.h	Wed Jan 24 12:16:44 2007 -0700
     3.3 @@ -271,6 +271,7 @@ extern thash_data_t *thash_find_next_ove
     3.4   *
     3.5   */
     3.6  extern void thash_purge_entries(struct vcpu *v, u64 va, u64 ps);
     3.7 +extern void thash_purge_entries_remote(struct vcpu *v, u64 va, u64 ps);
     3.8  extern void thash_purge_and_insert(struct vcpu *v, u64 pte, u64 itir, u64 ifa, int type);
     3.9  
    3.10  /*