summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}