Skip to content

Commit 34698d8

Browse files
mgamalavikivity
authored andcommitted
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>
1 parent 2dbd0dd commit 34698d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/x86/kvm/emulate.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
29122912
break;
29132913
case 0x90 ... 0x97: /* nop / xchg reg, rax */
29142914
if (c->dst.addr.reg == &c->regs[VCPU_REGS_RAX])
2915-
goto done;
2915+
break;
29162916
goto xchg;
29172917
case 0x9c: /* pushf */
29182918
c->src.val = (unsigned long) ctxt->eflags;

0 commit comments

Comments
 (0)