ia64/xen-unstable

changeset 16922:ed2ca78286a8

vmx realmode: Multiple I/O reads to qemu in an instruction is not
allowed. But we do allow, for example, a read followed by a write
(e.g., MOVS within video RAM).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 28 11:28:55 2008 +0000 (2008-01-28)
parents ed8ab1a36b09
children 4a92c68db1d2
files xen/arch/x86/hvm/vmx/realmode.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/realmode.c	Mon Jan 28 10:17:05 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/realmode.c	Mon Jan 28 11:28:55 2008 +0000
     1.3 @@ -534,12 +534,6 @@ static void realmode_emulate_one(struct 
     1.4          goto fail;
     1.5      }
     1.6  
     1.7 -    if ( io_completed && curr->arch.hvm_vmx.real_mode_io_in_progress )
     1.8 -    {
     1.9 -        gdprintk(XENLOG_ERR, "Multiple I/O transactions in a single insn.\n");
    1.10 -        goto fail;
    1.11 -    }
    1.12 -
    1.13      if ( rc == X86EMUL_UNHANDLEABLE )
    1.14      {
    1.15          gdprintk(XENLOG_ERR, "Failed to emulate insn.\n");
    1.16 @@ -547,7 +541,13 @@ static void realmode_emulate_one(struct 
    1.17      }
    1.18  
    1.19      if ( rc == X86EMUL_RETRY )
    1.20 -        return;
    1.21 +    {
    1.22 +        BUG_ON(!curr->arch.hvm_vmx.real_mode_io_in_progress);
    1.23 +        if ( !io_completed )
    1.24 +            return;
    1.25 +        gdprintk(XENLOG_ERR, "Multiple I/O reads in a single insn.\n");
    1.26 +        goto fail;
    1.27 +    }
    1.28  
    1.29      if ( curr->arch.hvm_vmx.real_mode_io_in_progress &&
    1.30           (get_ioreq(curr)->vp_ioreq.dir == IOREQ_READ) )