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

[Xen-changelog] Currently the mmio_operands assumes writing to memory when operand 0 is



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 868b8c599dfb6d4609bd4def71b44ea311bf8da3
# Parent  46046d5fb354ead9684ce43465856b676a975778
Currently the mmio_operands assumes writing to memory when operand 0 is
register or immediate, this is false for cmp/test opcode.
This patch resolve this problem, please review.

Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>
Signed-off-by: Jun Nakajima  <jun.nakajima@xxxxxxxxx>

diff -r 46046d5fb354 -r 868b8c599dfb xen/arch/x86/vmx_platform.c
--- a/xen/arch/x86/vmx_platform.c       Tue Sep 27 21:09:46 2005
+++ b/xen/arch/x86/vmx_platform.c       Wed Sep 28 12:49:33 2005
@@ -833,12 +833,16 @@
         mmio_operands(IOREQ_TYPE_XOR, gpa, &mmio_inst, mpcip, regs);
         break;
 
-    case INSTR_CMP:
-        mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
-        break;
-
+    case INSTR_CMP:        /* Pass through */
     case INSTR_TEST:
-        mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
+        mpcip->flags = mmio_inst.flags;
+        mpcip->instr = mmio_inst.instr;
+        mpcip->operand[0] = mmio_inst.operand[0]; /* source */
+        mpcip->operand[1] = mmio_inst.operand[1]; /* destination */
+        mpcip->immediate = mmio_inst.immediate;
+
+        /* send the request and wait for the value */
+        send_mmio_req(IOREQ_TYPE_COPY, gpa, 1, mmio_inst.op_size, 0, 
IOREQ_READ, 0);
         break;
 
     default:

_______________________________________________
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®.