diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-02-20 14:47:24 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 04:53:25 -0400 |
commit | 2e53d63acba75795aa226febd140f67c58c6a353 (patch) | |
tree | be4ad4e5b28c737053af78a950d270a657e9f628 /include | |
parent | 847f0ad8cbfa70c1af6948025836dfbd9ed6da1e (diff) |
KVM: MMU: ignore zapped root pagetables
Mark zapped root pagetables as invalid and ignore such pages during lookup.
This is a problem with the cr3-target feature, where a zapped root table fools
the faulting code into creating a read-only mapping. The result is a lockup
if the instruction can't be emulated.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/kvm_host.h | 1 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 935ffa4db9f4..8c3f74b73524 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -141,6 +141,7 @@ union kvm_mmu_page_role { | |||
141 | unsigned pad_for_nice_hex_output:6; | 141 | unsigned pad_for_nice_hex_output:6; |
142 | unsigned metaphysical:1; | 142 | unsigned metaphysical:1; |
143 | unsigned access:3; | 143 | unsigned access:3; |
144 | unsigned invalid:1; | ||
144 | }; | 145 | }; |
145 | }; | 146 | }; |
146 | 147 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index eb88d32dd5c7..994278fb5883 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -37,6 +37,7 @@ | |||
37 | #define KVM_REQ_TLB_FLUSH 0 | 37 | #define KVM_REQ_TLB_FLUSH 0 |
38 | #define KVM_REQ_MIGRATE_TIMER 1 | 38 | #define KVM_REQ_MIGRATE_TIMER 1 |
39 | #define KVM_REQ_REPORT_TPR_ACCESS 2 | 39 | #define KVM_REQ_REPORT_TPR_ACCESS 2 |
40 | #define KVM_REQ_MMU_RELOAD 3 | ||
40 | 41 | ||
41 | struct kvm_vcpu; | 42 | struct kvm_vcpu; |
42 | extern struct kmem_cache *kvm_vcpu_cache; | 43 | extern struct kmem_cache *kvm_vcpu_cache; |
@@ -190,6 +191,7 @@ void kvm_resched(struct kvm_vcpu *vcpu); | |||
190 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu); | 191 | void kvm_load_guest_fpu(struct kvm_vcpu *vcpu); |
191 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); | 192 | void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); |
192 | void kvm_flush_remote_tlbs(struct kvm *kvm); | 193 | void kvm_flush_remote_tlbs(struct kvm *kvm); |
194 | void kvm_reload_remote_mmus(struct kvm *kvm); | ||
193 | 195 | ||
194 | long kvm_arch_dev_ioctl(struct file *filp, | 196 | long kvm_arch_dev_ioctl(struct file *filp, |
195 | unsigned int ioctl, unsigned long arg); | 197 | unsigned int ioctl, unsigned long arg); |