Fix the mmio for cmp/test opcode
PATCH 1/1 Fix the mmio for cmp/test opcode
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 <[email protected]>
Signed-off-by Jun Nakajima <[email protected]>
Thanks
Yunhong Jiang
# HG changeset patch
# User [email protected]
# Node ID 4fdd0bb950df87d41d1aa422192aead1e3dd32d6
# Parent 70b6e60df7502463a240689ed0f6b4975b9a9a62
Fix the mmio for cmp/test opcode.
Currently the mmio_operands assumes writing to memory when operand 0 is register or immediate, this is false for cmp/test opcode.
Signed-off-by Yunhong Jiang <[email protected]>
Signed-off-by Jun Nakajima <[email protected]>
xen/arch/x86/vmx_platform.c +9 -5
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel