aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vpic.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-04-15 13:28:02 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-04-15 13:28:02 +0100
commit6742db6e6819687ab311199bfe76476947ed75ed (patch)
tree3736ca574aebcce589b9769d62aeb96bc19b0176 /xen/arch/x86/hvm/vpic.c
parentef3c86eb818614eb5a4bdd7c0c82b1e1346dd60e (diff)
downloadxen-6742db6e6819687ab311199bfe76476947ed75ed.tar.gz
xen-6742db6e6819687ab311199bfe76476947ed75ed.tar.bz2
xen-6742db6e6819687ab311199bfe76476947ed75ed.zip
x86, hvm: I/O emulation handlers return X86EMUL_* return codes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/vpic.c')
-rw-r--r--xen/arch/x86/hvm/vpic.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c
index f7bc2eb34f..a3d6f2d9ca 100644
--- a/xen/arch/x86/hvm/vpic.c
+++ b/xen/arch/x86/hvm/vpic.c
@@ -319,7 +319,7 @@ static int vpic_intercept_pic_io(
if ( bytes != 1 )
{
gdprintk(XENLOG_WARNING, "PIC_IO bad access size %d\n", bytes);
- return 1;
+ return X86EMUL_OKAY;
}
vpic = &current->domain->arch.hvm_domain.vpic[port >> 7];
@@ -329,7 +329,7 @@ static int vpic_intercept_pic_io(
else
*val = (uint8_t)vpic_ioport_read(vpic, port);
- return 1;
+ return X86EMUL_OKAY;
}
static int vpic_intercept_elcr_io(
@@ -338,11 +338,7 @@ static int vpic_intercept_elcr_io(
struct hvm_hw_vpic *vpic;
uint32_t data;
- if ( bytes != 1 )
- {
- gdprintk(XENLOG_WARNING, "PIC_IO bad access size %d\n", bytes);
- return 1;
- }
+ BUG_ON(bytes != 1);
vpic = &current->domain->arch.hvm_domain.vpic[port & 1];
@@ -360,7 +356,7 @@ static int vpic_intercept_elcr_io(
*val = vpic->elcr & vpic_elcr_mask(vpic);
}
- return 1;
+ return X86EMUL_OKAY;
}
static int vpic_save(struct domain *d, hvm_domain_context_t *h)