Hi Avi,
Attached is the patch to implement instruction:
mov rl/rh/r, imm
opcodes: 0xb0 - 0xbfPlease apply, -- Thanks & Regards, Nitin Open Source Technology Center, Intel Corporation ----------------------------------------------------------------- The mind is like a parachute; it works much better when it's open
commit 910f3167e57c224206a2ef5fe2cb248494724087
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date: Thu Sep 13 20:18:51 2007 -0700
Implement emulation of instruction
mov rl/rh/r imm
opcodes: 0xb0 - 0xbf
Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2d2801f..c2540c3 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -137,8 +137,12 @@ static u8 opcode_table[256] = {
0, 0, ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
ByteOp | ImplicitOps | Mov, ImplicitOps | Mov,
ByteOp | ImplicitOps, ImplicitOps,
- /* 0xB0 - 0xBF */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 0xB0 - 0xB7 */
+ Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte,
+ Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte, Mov | SrcImmByte,
+ /* 0xB8 - 0xBF */
+ Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
+ Mov | SrcImm, Mov | SrcImm, Mov | SrcImm, Mov | SrcImm,
/* 0xC0 - 0xC7 */
ByteOp | DstMem | SrcImm | ModRM, DstMem | SrcImmByte | ModRM,
0, ImplicitOps, 0, 0,
@@ -1102,6 +1106,23 @@ push:
dst.val = (unsigned long)_regs[VCPU_REGS_RAX];
_eip += ad_bytes; /* skip dst displacement */
break;
+ case 0xb0 ... 0xb3: /* mov rl, imm8 */
+ dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX + (b & 0x3)];
+ dst.val = src.val;
+ dst.type = OP_REG;
+ dst.bytes = 1;
+ break;
+ case 0xb4 ... 0xb7: /* mov rh, imm8 */
+ dst.ptr = ((void *)&_regs[VCPU_REGS_RAX + (b & 0x3)] + 1);
+ dst.val = src.val;
+ dst.type = OP_REG;
+ dst.bytes = 1;
+ break;
+ case 0xb8 ... 0xbf: /* mov r, imm */
+ dst.ptr = (unsigned long *)&_regs[VCPU_REGS_RAX + (b & 0x7)];
+ dst.val = src.val;
+ dst.type = OP_REG;
+ break;
case 0xc0 ... 0xc1:
grp2: /* Grp2 */
switch (modrm_reg) {
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ kvm-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/kvm-devel
