ia64/xen-unstable

changeset 7094:868b8c599dfb

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@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Sep 28 13:49:33 2005 +0100 (2005-09-28)
parents 46046d5fb354
children b1327ae8f414
files xen/arch/x86/vmx_platform.c
line diff
     1.1 --- a/xen/arch/x86/vmx_platform.c	Tue Sep 27 22:09:46 2005 +0100
     1.2 +++ b/xen/arch/x86/vmx_platform.c	Wed Sep 28 13:49:33 2005 +0100
     1.3 @@ -833,12 +833,16 @@ void handle_mmio(unsigned long va, unsig
     1.4          mmio_operands(IOREQ_TYPE_XOR, gpa, &mmio_inst, mpcip, regs);
     1.5          break;
     1.6  
     1.7 -    case INSTR_CMP:
     1.8 -        mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
     1.9 -        break;
    1.10 +    case INSTR_CMP:        /* Pass through */
    1.11 +    case INSTR_TEST:
    1.12 +        mpcip->flags = mmio_inst.flags;
    1.13 +        mpcip->instr = mmio_inst.instr;
    1.14 +        mpcip->operand[0] = mmio_inst.operand[0]; /* source */
    1.15 +        mpcip->operand[1] = mmio_inst.operand[1]; /* destination */
    1.16 +        mpcip->immediate = mmio_inst.immediate;
    1.17  
    1.18 -    case INSTR_TEST:
    1.19 -        mmio_operands(IOREQ_TYPE_COPY, gpa, &mmio_inst, mpcip, regs);
    1.20 +        /* send the request and wait for the value */
    1.21 +        send_mmio_req(IOREQ_TYPE_COPY, gpa, 1, mmio_inst.op_size, 0, IOREQ_READ, 0);
    1.22          break;
    1.23  
    1.24      default: