summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-03-18 15:20:13 +0200
committerAvi Kivity <avi@redhat.com>2010-05-17 12:16:09 +0300
commitfd5253658b403d51fc19e56ecb44c54a3071fded (patch)
tree45c887e9827e0cd25a636896886a8b7c00498833 /arch
parent2e901c4cf4b550ad37840870246e835889cf7322 (diff)
downloadlinux-stable-fd5253658b403d51fc19e56ecb44c54a3071fded.tar.gz
linux-stable-fd5253658b403d51fc19e56ecb44c54a3071fded.tar.bz2
linux-stable-fd5253658b403d51fc19e56ecb44c54a3071fded.zip
KVM: x86 emulator: do not call writeback if msr access fails.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/emulate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 1393bf034243..b89a8f217332 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2563,7 +2563,7 @@ twobyte_insn:
| ((u64)c->regs[VCPU_REGS_RDX] << 32);
if (kvm_set_msr(ctxt->vcpu, c->regs[VCPU_REGS_RCX], msr_data)) {
kvm_inject_gp(ctxt->vcpu, 0);
- c->eip = ctxt->eip;
+ goto done;
}
rc = X86EMUL_CONTINUE;
c->dst.type = OP_NONE;
@@ -2572,7 +2572,7 @@ twobyte_insn:
/* rdmsr */
if (kvm_get_msr(ctxt->vcpu, c->regs[VCPU_REGS_RCX], &msr_data)) {
kvm_inject_gp(ctxt->vcpu, 0);
- c->eip = ctxt->eip;
+ goto done;
} else {
c->regs[VCPU_REGS_RAX] = (u32)msr_data;
c->regs[VCPU_REGS_RDX] = msr_data >> 32;