]> git.baikalelectronics.ru Git - kernel.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)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 15:11:10 +0000 (18:11 +0300)
commit3e32316ea937319826934ad0007c66a7053a3e40
tree86dc2671cbd3326e92c8845ce699bdb651d785b5
parent7f48c719210c2e8328002672a59cd48911a5a4fe
KVM: VMX: Check cpl before emulating debug register access

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.

Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c