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)
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>

No differences found