summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Gamal <m.gamal005@gmail.com>2010-08-04 14:41:04 +0300
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:41 +0200
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 955d4807464..ddbad15c948 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2912,7 +2912,7 @@ special_insn:
break;
case 0x90 ... 0x97: /* nop / xchg reg, rax */
if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX])
- goto done;
+ break;
goto xchg;
case 0x9c: /* pushf */
c->src.val = (unsigned long) ctxt->eflags;