aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2010-08-04 07:41:04 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:41 -0400
commit34698d8c61bd3fc86b2e99c3d1ad9ef140b3eb0d (patch)
treeee0db9085fab5767d0c5434bb65b729cf65eb5da
parent2dbd0dd711e6c0ca6a2be9e6d93bbeb339386638 (diff)
KVM: x86 emulator: Fix nop emulation
If a nop instruction is encountered, we jump directly to the done label. This skip updating rip. Break from the switch case instead Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 955d48074648..ddbad15c9486 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2912,7 +2912,7 @@ special_insn:
2912 break; 2912 break;
2913 case 0x90 ... 0x97: /* nop / xchg reg, rax */ 2913 case 0x90 ... 0x97: /* nop / xchg reg, rax */
2914 if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX]) 2914 if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX])
2915 goto done; 2915 break;
2916 goto xchg; 2916 goto xchg;
2917 case 0x9c: /* pushf */ 2917 case 0x9c: /* pushf */
2918 c->src.val = (unsigned long) ctxt->eflags; 2918 c->src.val = (unsigned long) ctxt->eflags;