From: Avi Kivity Date: Sun, 22 Jul 2007 12:51:58 +0000 (+0300) Subject: KVM: x86 emulator: fix faulty check for two-byte opcode X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=394b6e5944865a558fe25f0c5903b34c434038ee;p=deliverable%2Flinux.git KVM: x86 emulator: fix faulty check for two-byte opcode Right now, the bug is harmless as we never emulate one-byte 0xb6 or 0xb7. But things may change. Noted by the mysterious Gabriel C. Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 82b4ea62c982..ef7518a2d7ac 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -819,7 +819,7 @@ done_prefixes: case DstReg: dst.type = OP_REG; if ((d & ByteOp) - && !(twobyte_table && (b == 0xb6 || b == 0xb7))) { + && !(twobyte && (b == 0xb6 || b == 0xb7))) { dst.ptr = decode_register(modrm_reg, _regs, (rex_prefix == 0)); dst.val = *(u8 *) dst.ptr;