summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMarcelo Tosatti2008-07-11 01:49:31 +0200
committerAvi Kivity2008-07-20 11:42:40 +0200
commit34d4cb8fca1f2a31be152b74797e6cd160ec9de6 (patch)
tree1e8f2c3c4feb54763fd0d8b27ef83ba546215069 /arch/x86/kvm/x86.c
parentKVM: Prefix some x86 low level function with kvm_, to avoid namespace issues (diff)
downloadkernel-qcow2-linux-34d4cb8fca1f2a31be152b74797e6cd160ec9de6.tar.gz
kernel-qcow2-linux-34d4cb8fca1f2a31be152b74797e6cd160ec9de6.tar.xz
kernel-qcow2-linux-34d4cb8fca1f2a31be152b74797e6cd160ec9de6.zip
KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction
Flush the shadow mmu before removing regions to avoid stale entries. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b131f3c0cf64..9f1cdb011cff 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4032,6 +4032,11 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
return 0;
}
+void kvm_arch_flush_shadow(struct kvm *kvm)
+{
+ kvm_mmu_zap_all(kvm);
+}
+
int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
{
return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE