|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] [PATCH] zero extend I/O reads
Jes Sorensen debugged an issue recently on KVM that a ld2.acq was
getting sign extended in the I/O emulation path[1][2]. This was exposed
by the VGA console hanging due to some benign looking changes to the VGA
console structure several kernel revisions back. I remember seeing this
on Xen, but I've lost the recipe to reproduce it. I believe the
following patch adds the same logic that is being incorporated for KVM,
but I'm unable to prove we're hitting the same issue since I can no
longer reproduce it. Please review and apply if it looks right.
Thanks,
Alex
[1] http://marc.info/?t=121118934000001
[2] http://marc.info/?t=121127848500008
[IA64] zero pad emulated I/O instructions
Fixes issue seen on KVM with more recent upstream changes to the VGA
console structure.
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
--
diff -r f04ce41dab84 xen/arch/ia64/vmx/mmio.c
--- a/xen/arch/ia64/vmx/mmio.c Tue May 20 18:54:09 2008 +0900
+++ b/xen/arch/ia64/vmx/mmio.c Wed May 21 13:02:27 2008 -0600
@@ -171,7 +171,7 @@ static void low_mmio_access(VCPU *vcpu,
vmx_send_assist_req(v);
if (dir == IOREQ_READ)
- *val = p->data;
+ *val = p->data & (~0UL >> (BITS_PER_LONG - (s * 8)));
return;
}
@@ -340,7 +340,7 @@ static void legacy_io_access(VCPU *vcpu,
vmx_send_assist_req(v);
if (dir == IOREQ_READ) { // read
- *val=p->data;
+ *val = p->data & (~0UL >> (BITS_PER_LONG - (s * 8)));
}
#ifdef DEBUG_PCI
if (dir == IOREQ_WRITE)
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |