From: awilliam@xenbuild.aw Date: Fri, 9 Jun 2006 16:35:38 +0000 (-0600) Subject: [IA64] add memory barrier to domain_flush_vtlb_range() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15984 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eb4c00fc515c6360f60b25efe3c4d39129a3eab1;p=xen.git [IA64] add memory barrier to domain_flush_vtlb_range() add memory barrier to domain_flush_vtlb_range(). vtlb purge must be visible before vhpt invalidation. added some BUG_ON(). Signed-off-by: Isaku Yamahata --- diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index 10e9ab3bc3..54b5257f4d 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -2016,6 +2016,8 @@ IA64FAULT vcpu_itc_i(VCPU *vcpu, UINT64 pte, UINT64 itir, UINT64 ifa) IA64FAULT vcpu_ptc_l(VCPU *vcpu, UINT64 vadr, UINT64 log_range) { + BUG_ON(vcpu != current); + /* Purge TC */ vcpu_purge_tr_entry(&PSCBX(vcpu,dtlb)); vcpu_purge_tr_entry(&PSCBX(vcpu,itlb)); @@ -2082,6 +2084,7 @@ IA64FAULT vcpu_ptr_d(VCPU *vcpu,UINT64 vadr,UINT64 log_range) unsigned long rid, rr; int i; TR_ENTRY *trp; + BUG_ON(vcpu != current); rr = PSCB(vcpu,rrs)[region]; rid = rr & RR_RID_MASK; @@ -2110,6 +2113,7 @@ IA64FAULT vcpu_ptr_i(VCPU *vcpu,UINT64 vadr,UINT64 log_range) unsigned long rid, rr; int i; TR_ENTRY *trp; + BUG_ON(vcpu != current); rr = PSCB(vcpu,rrs)[region]; rid = rr & RR_RID_MASK; diff --git a/xen/arch/ia64/xen/vhpt.c b/xen/arch/ia64/xen/vhpt.c index f54e2a832e..0d037fdb25 100644 --- a/xen/arch/ia64/xen/vhpt.c +++ b/xen/arch/ia64/xen/vhpt.c @@ -202,10 +202,14 @@ void domain_flush_vtlb_range (struct domain *d, u64 vadr, u64 addr_range) FIXME: clear only if match. */ vcpu_purge_tr_entry(&PSCBX(v,dtlb)); vcpu_purge_tr_entry(&PSCBX(v,itlb)); + } + smp_mb(); + for_each_vcpu (d, v) { /* Invalidate VHPT entries. */ cpu_flush_vhpt_range (v->processor, vadr, addr_range); } + // ptc.ga has release semantics. /* ptc.ga */ ia64_global_tlb_purge(vadr,vadr+addr_range,PAGE_SHIFT);