]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Inject #GP with the right rip on efer writes
authorRoedel, Joerg <Joerg.Roedel@amd.com>
Thu, 6 May 2010 09:38:43 +0000 (11:38 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 19 May 2010 08:36:39 +0000 (11:36 +0300)
commitead4b4bab1e388a622d0039da46a1504f54f53fd
tree102d0728a1c8ae0b698e6f746cd40a67dfc2db94
parent52b270ef04cf420eb701a7c0823982a9974dd4a4
KVM: x86: Inject #GP with the right rip on efer writes

This patch fixes a bug in the KVM efer-msr write path. If a
guest writes to a reserved efer bit the set_efer function
injects the #GP directly. The architecture dependent wrmsr
function does not see this, assumes success and advances the
rip. This results in a #GP in the guest with the wrong rip.
This patch fixes this by reporting efer write errors back to
the architectural wrmsr function.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c