ia64/xen-unstable

changeset 8953:2f515e08edfc

inst_len in HVM mmio handler must be a signed variable, as
it may hold an error return value (from hvm_instruction_length).

Signed-off-by: Tom Woller <thomas.woller@amd.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Feb 21 19:32:15 2006 +0100 (2006-02-21)
parents 602bf0aa15ab
children e9d5563c08be
files xen/arch/x86/hvm/platform.c
line diff
     1.1 --- a/xen/arch/x86/hvm/platform.c	Tue Feb 21 18:29:28 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/platform.c	Tue Feb 21 19:32:15 2006 +0100
     1.3 @@ -760,12 +760,12 @@ static void mmio_operands(int type, unsi
     1.4  
     1.5  void handle_mmio(unsigned long va, unsigned long gpa)
     1.6  {
     1.7 -    unsigned long inst_len, inst_addr;
     1.8 +    unsigned long inst_addr;
     1.9      struct mmio_op *mmio_opp;
    1.10      struct cpu_user_regs *regs;
    1.11      struct instruction mmio_inst;
    1.12      unsigned char inst[MAX_INST_LEN];
    1.13 -    int i, realmode, ret;
    1.14 +    int i, realmode, ret, inst_len;
    1.15      struct vcpu *v = current;
    1.16  
    1.17      mmio_opp = &v->arch.hvm_vcpu.mmio_op;
    1.18 @@ -795,7 +795,7 @@ void handle_mmio(unsigned long va, unsig
    1.19  
    1.20      if (hvm_decode(realmode, inst, &mmio_inst) == DECODE_failure) {
    1.21          printf("handle_mmio: failed to decode instruction\n");
    1.22 -        printf("mmio opcode: va 0x%lx, gpa 0x%lx, len %ld:",
    1.23 +        printf("mmio opcode: va 0x%lx, gpa 0x%lx, len %d:",
    1.24                 va, gpa, inst_len);
    1.25          for (i = 0; i < inst_len; i++)
    1.26              printf(" %02x", inst[i] & 0xFF);