Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8a98945 authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity
Browse files

KVM: x86 emulator: cleanup nop emulation



Make it more explicit what we are checking for.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent f0c13ef1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2799,8 +2799,8 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
			goto done;
			goto done;
		break;
		break;
	case 0x90: /* nop / xchg r8,rax */
	case 0x90: /* nop / xchg r8,rax */
		if (!(c->rex_prefix & 1)) { /* nop */
		if (c->dst.ptr == (unsigned long *)&c->regs[VCPU_REGS_RAX]) {
			c->dst.type = OP_NONE;
			c->dst.type = OP_NONE;  /* nop */
			break;
			break;
		}
		}
	case 0x91 ... 0x97: /* xchg reg,rax */
	case 0x91 ... 0x97: /* xchg reg,rax */