ia64/xen-unstable

changeset 19495:b5e7c26835c9

x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Apr 01 16:20:30 2009 +0100 (2009-04-01)
parents e89f7c2b9e0d
children 6dc5c26a75b9
files xen/arch/x86/hvm/intercept.c
line diff
     1.1 --- a/xen/arch/x86/hvm/intercept.c	Wed Apr 01 15:39:20 2009 +0100
     1.2 +++ b/xen/arch/x86/hvm/intercept.c	Wed Apr 01 16:20:30 2009 +0100
     1.3 @@ -100,8 +100,11 @@ static int hvm_mmio_access(struct vcpu *
     1.4          }
     1.5      }
     1.6  
     1.7 -    if ( (p->count = i) != 0 )
     1.8 +    if ( i != 0 )
     1.9 +    {
    1.10 +        p->count = i;
    1.11          rc = X86EMUL_OKAY;
    1.12 +    }
    1.13  
    1.14      return rc;
    1.15  }
    1.16 @@ -165,8 +168,11 @@ static int process_portio_intercept(port
    1.17          }
    1.18      }
    1.19  
    1.20 -    if ( (p->count = i) != 0 )
    1.21 +    if ( i != 0 )
    1.22 +    {
    1.23 +        p->count = i;
    1.24          rc = X86EMUL_OKAY;
    1.25 +    }
    1.26  
    1.27      return rc;
    1.28  }