# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1169666204 25200
# Node ID 1487b2114fc256e24980934460d7b8e1c88d9381
# Parent 10dd3c907ca772a4a7134543427f8e847ab01d90
[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@xxxxxxxxxxxxxx>
---
xen/arch/ia64/vmx/vmmu.c | 3 ++-
xen/arch/ia64/vmx/vtlb.c | 11 ++++++++++-
xen/include/asm-ia64/vmmu.h | 1 +
3 files changed, 13 insertions(+), 2 deletions(-)
diff -r 10dd3c907ca7 -r 1487b2114fc2 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 12:16:44 2007 -0700
@@ -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 -r 1487b2114fc2 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 12:16:44 2007 -0700
@@ -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 -r 1487b2114fc2 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 12:16:44 2007 -0700
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|