summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-08-06 21:33:03 -0700
committerBryan Cantrill <bryan@joyent.com>2011-08-06 21:33:03 -0700
commit2b110f967478021ba1cb226d7f7fd4f1536d588d (patch)
tree4ab20c13275f4eedc339ae2ae722a2ac2cd8ca90
parenta8fd9893776b342a9361388b9009d1f337f44841 (diff)
downloadillumos-kvm-2b110f967478021ba1cb226d7f7fd4f1536d588d.tar.gz
HVM-575 KVM: MMU: flush remote tlbs when overwriting spte with different pfn
-rw-r--r--kvm_mmu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm_mmu.c b/kvm_mmu.c
index 82236a9..df965ce 100644
--- a/kvm_mmu.c
+++ b/kvm_mmu.c
@@ -1752,6 +1752,8 @@ mmu_set_spte(struct kvm_vcpu *vcpu, uint64_t *sptep, unsigned pt_access,
kvm_flush_remote_tlbs(vcpu->kvm);
} else if (pfn != spte_to_pfn(*sptep)) {
rmap_remove(vcpu->kvm, sptep);
+ __set_spte(sptep, shadow_trap_nonpresent_pte);
+ kvm_flush_remote_tlbs(vcpu->kvm);
} else
was_rmapped = 1;
}