WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [PATCH] zero extend I/O reads

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH] zero extend I/O reads
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Wed, 21 May 2008 13:17:24 -0600
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 21 May 2008 12:17:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>