]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: VMX: Check cpl before emulating debug register access
authorAvi Kivity <avi@redhat.com>
Tue, 1 Sep 2009 09:03:25 +0000 (12:03 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:52:24 +0000 (15:52 -0700)
commit0a32cd3d6adbe5cbfdfb411e1b1fccceec75e36a
treebde11ebee14af04c388cc6b3e06612e46eb504d3
parenta3edfd184017a67b30080c1e0d46b91d7306b3d9
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>
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
include/asm-x86/kvm_host.h