[HVM][MMIO] Support decode of 0x83 opcode (or imm8,m32/64').
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 7 Jun 2006 13:21:49 +0000 (14:21 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 7 Jun 2006 13:21:49 +0000 (14:21 +0100)
This instruction is used by both WinXP during an SMP installation and by
Sun Solaris.  With this patch Sun Solaris UP is able to boot.  Windows
SMP gets a bit further but still has issues.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Travis Betak <tbetak.woller@amd.com>
xen/arch/x86/hvm/platform.c

index 15d5a44e73bca621629e7c769d520ef987489eec..a342e76b6434323a4941d651f479e69665073064 100644 (file)
@@ -426,19 +426,30 @@ static int hvm_decode(int realmode, unsigned char *opcode, struct instruction *i
 
     case 0x80:
     case 0x81:
+    case 0x83:
         {
             unsigned char ins_subtype = (opcode[1] >> 3) & 7;
 
             if (opcode[0] == 0x80) {
                 GET_OP_SIZE_FOR_BYTE(size_reg);
                 instr->op_size = BYTE;
-            } else {
+            } else if (opcode[0] == 0x81) {
                 GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
                 size_reg = instr->op_size;
+            } else if (opcode[0] == 0x83) {
+                GET_OP_SIZE_FOR_NONEBYTE(size_reg);
+                instr->op_size = size_reg;
             }
+           
+            /* opcode 0x83 always has a single byte operand */
+            if (opcode[0] == 0x83)
+                instr->immediate = 
+                    (signed char)get_immediate(realmode, opcode+1, BYTE);
+            else
+                instr->immediate = 
+                    get_immediate(realmode, opcode+1, instr->op_size);
 
             instr->operand[0] = mk_operand(size_reg, 0, 0, IMMEDIATE);
-            instr->immediate = get_immediate(realmode, opcode+1, instr->op_size);
             instr->operand[1] = mk_operand(size_reg, 0, 0, MEMORY);
 
             switch (ins_subtype) {