diff options
author | Avi Kivity <avi@redhat.com> | 2009-09-01 12:03:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 15:52:24 -0700 |
commit | 0a32cd3d6adbe5cbfdfb411e1b1fccceec75e36a (patch) | |
tree | bde11ebee14af04c388cc6b3e06612e46eb504d3 /include | |
parent | a3edfd184017a67b30080c1e0d46b91d7306b3d9 (diff) |
KVM: VMX: Check cpl before emulating debug register access
commit 0a79b009525b160081d75cef5dbf45817956acf2 upstream.
Debug registers may only be accessed from cpl 0. Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index cf7c887165c4..69d4de9b2bbc 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h @@ -537,6 +537,7 @@ void kvm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr); void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code); void kvm_inject_page_fault(struct kvm_vcpu *vcpu, unsigned long cr2, u32 error_code); +bool kvm_require_cpl(struct kvm_vcpu *vcpu, int required_cpl); void kvm_inject_nmi(struct kvm_vcpu *vcpu); |