aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/intercept.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-01 16:20:30 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-01 16:20:30 +0100
commitd3a7711f0c72e302bdbc5a2a1f0fa2649a6b6858 (patch)
tree1a0c83f73a82a6f4e5ec4aabd134ea99dd99b7b2 /xen/arch/x86/hvm/intercept.c
parentea78378d2cb685b6fa3897a91435c36235b75446 (diff)
downloadxen-d3a7711f0c72e302bdbc5a2a1f0fa2649a6b6858.tar.gz
xen-d3a7711f0c72e302bdbc5a2a1f0fa2649a6b6858.tar.bz2
xen-d3a7711f0c72e302bdbc5a2a1f0fa2649a6b6858.zip
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>
Diffstat (limited to 'xen/arch/x86/hvm/intercept.c')
-rw-r--r--xen/arch/x86/hvm/intercept.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c
index 107b87d2f7..1a1f24c7f6 100644
--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -100,8 +100,11 @@ static int hvm_mmio_access(struct vcpu *v,
}
}
- if ( (p->count = i) != 0 )
+ if ( i != 0 )
+ {
+ p->count = i;
rc = X86EMUL_OKAY;
+ }
return rc;
}
@@ -165,8 +168,11 @@ static int process_portio_intercept(portio_action_t action, ioreq_t *p)
}
}
- if ( (p->count = i) != 0 )
+ if ( i != 0 )
+ {
+ p->count = i;
rc = X86EMUL_OKAY;
+ }
return rc;
}