[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Add sub instruction support to HVM MMIO decoder.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2d155d41fe466952c8b9b871b4500b7f7a29f088
# Parent  a949bd6ceb85d4ee11a2fd896487299427a41592
[HVM] Add sub instruction support to HVM MMIO decoder.
This is needed for SMP PAE windows XP SP2.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
---
 xen/arch/x86/hvm/io.c        |    3 +++
 xen/arch/x86/hvm/platform.c  |    6 ++++++
 xen/include/asm-x86/hvm/io.h |    1 +
 3 files changed, 10 insertions(+)

diff -r a949bd6ceb85 -r 2d155d41fe46 xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c     Sat Sep 30 10:49:08 2006 +0100
+++ b/xen/arch/x86/hvm/io.c     Sat Sep 30 11:08:41 2006 +0100
@@ -596,6 +596,7 @@ static void hvm_mmio_assist(struct cpu_u
         break;
 
     case INSTR_CMP:
+    case INSTR_SUB:
         if (src & REGISTER) {
             index = operand_index(src);
             value = get_reg_value(size, index, 0, regs);
@@ -607,6 +608,8 @@ static void hvm_mmio_assist(struct cpu_u
             index = operand_index(dst);
             value = get_reg_value(size, index, 0, regs);
             diff = value - (unsigned long) p->u.data;
+            if ( mmio_opp->instr == INSTR_SUB )
+                set_reg_value(size, index, 0, regs, diff);
         }
 
         /*
diff -r a949bd6ceb85 -r 2d155d41fe46 xen/arch/x86/hvm/platform.c
--- a/xen/arch/x86/hvm/platform.c       Sat Sep 30 10:49:08 2006 +0100
+++ b/xen/arch/x86/hvm/platform.c       Sat Sep 30 11:08:41 2006 +0100
@@ -394,6 +394,11 @@ static int hvm_decode(int realmode, unsi
         GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
         return mem_reg(instr->op_size, opcode, instr, rex);
 
+    case 0x2B: /* sub m32/16, r32/16 */
+        instr->instr = INSTR_SUB;
+        GET_OP_SIZE_FOR_NONEBYTE(instr->op_size);
+        return mem_reg(instr->op_size, opcode, instr, rex);
+
     case 0x30: /* xor r8, m8 */
         instr->instr = INSTR_XOR;
         instr->op_size = BYTE;
@@ -1011,6 +1016,7 @@ void handle_mmio(unsigned long va, unsig
 
     case INSTR_CMP:        /* Pass through */
     case INSTR_TEST:
+    case INSTR_SUB:
         mmio_opp->flags = mmio_inst.flags;
         mmio_opp->instr = mmio_inst.instr;
         mmio_opp->operand[0] = mmio_inst.operand[0]; /* source */
diff -r a949bd6ceb85 -r 2d155d41fe46 xen/include/asm-x86/hvm/io.h
--- a/xen/include/asm-x86/hvm/io.h      Sat Sep 30 10:49:08 2006 +0100
+++ b/xen/include/asm-x86/hvm/io.h      Sat Sep 30 11:08:41 2006 +0100
@@ -68,6 +68,7 @@
 #define INSTR_TEST  12
 #define INSTR_BT    13
 #define INSTR_XCHG  14
+#define INSTR_SUB   15
 
 struct instruction {
     __s8    instr;        /* instruction type */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.