]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: x86 emulator: do not call writeback if msr access fails.
authorGleb Natapov <gleb@redhat.com>
Thu, 18 Mar 2010 13:20:13 +0000 (15:20 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:16:09 +0000 (12:16 +0300)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c

index 1393bf034243dd836d41147a78142dadf7ca5109..b89a8f21733255d58e44caa59e4034a76cdba48a 100644 (file)
@@ -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;