]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: Inject #GP with the right rip on efer writes
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 6 May 2010 09:38:43 +0000 (11:38 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:23:05 +0000 (11:23 -0700)
commitce9fea841204616bc21fe42bdfbd60db8ae12d9e
tree6b5a61c6c859d09d14e427064cc5dcb9747d3426
parent8d3c865a11cc027bee53985237e12b086a6d7f41
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(Cherry-picked from commit b69e8caef5b190af48c525f6d715e7b7728a77f6)
arch/x86/kvm/x86.c