From: Mohammed Gamal Date: Wed, 4 Aug 2010 11:41:04 +0000 (+0300) Subject: KVM: x86 emulator: Fix nop emulation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34698d8c61bd3fc86b2e99c3d1ad9ef140b3eb0d;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Avi Kivity --- 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: 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;