Hi Avi,
  This patch corrects the emulation of the instruction "or" for opcodes
0xc & 0cd.
  Please 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 e7b48d62cfaf4261ec228ee58bcb3d30b434ab8c
Author: Nitin A Kamble <[EMAIL PROTECTED]>
Date:   Thu Sep 13 19:30:26 2007 -0700

    Correct the emulation of or instruction, opcodes 0xc & 0xd.
    
    Signed-off-by: Nitin A Kamble <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index eaf89fa..2ffe7f8 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -913,10 +913,27 @@ done_prefixes:
 	      add:		/* add */
 		emulate_2op_SrcV("add", src, dst, _eflags);
 		break;
-	case 0x08 ... 0x0d:
+	case 0x08 ... 0x0b:
 	      or:		/* or */
 		emulate_2op_SrcV("or", src, dst, _eflags);
 		break;
+	case 0x0c: 		/* or al imm8 */
+		dst.type = OP_REG;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		dst.val = *(u8 *)dst.ptr;
+		dst.bytes = 1;
+		dst.orig_val = dst.val;
+		goto or;
+	case 0x0d:		/* or ax imm16, or eax imm32 */
+		dst.type = OP_REG;
+		dst.bytes = op_bytes;
+		dst.ptr = &_regs[VCPU_REGS_RAX];
+		if (op_bytes == 2)
+			dst.val = *(u16 *)dst.ptr;
+		else
+			dst.val = *(u32 *)dst.ptr;
+		dst.orig_val = dst.val;
+		goto or;
 	case 0x10 ... 0x15:
 	      adc:		/* adc */
 		emulate_2op_SrcV("adc", src, dst, _eflags);

Attachment: 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
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to