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-changelog

[Xen-changelog] [xen-unstable] x86-64/hvm: pio result storing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86-64/hvm: pio result storing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 May 2007 08:21:37 -0700
Delivery-date: Tue, 15 May 2007 08:24:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1179220391 -3600
# Node ID eb027b704dc55bb7f6e01a4b068c1ac407331ec1
# Parent  807f374e720d57210e60ef4611e8abe22f49e043
x86-64/hvm: pio result storing

Don't clear upper 32 bits on 8- and 16-bit PIO reads.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hvm/io.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r 807f374e720d -r eb027b704dc5 xen/arch/x86/hvm/io.c
--- a/xen/arch/x86/hvm/io.c     Tue May 15 10:12:02 2007 +0100
+++ b/xen/arch/x86/hvm/io.c     Tue May 15 10:13:11 2007 +0100
@@ -418,11 +418,10 @@ static void hvm_pio_assist(struct cpu_us
 static void hvm_pio_assist(struct cpu_user_regs *regs, ioreq_t *p,
                            struct hvm_io_op *pio_opp)
 {
-    unsigned long old_eax;
-    int sign = p->df ? -1 : 1;
-
     if ( p->data_is_ptr || (pio_opp->flags & OVERLAP) )
     {
+        int sign = p->df ? -1 : 1;
+
         if ( pio_opp->flags & REPZ )
             regs->ecx -= p->count;
 
@@ -459,14 +458,15 @@ static void hvm_pio_assist(struct cpu_us
     }
     else if ( p->dir == IOREQ_READ )
     {
-        old_eax = regs->eax;
+        unsigned long old_eax = regs->eax;
+
         switch ( p->size )
         {
         case 1:
-            regs->eax = (old_eax & 0xffffff00) | (p->data & 0xff);
+            regs->eax = (old_eax & ~0xff) | (p->data & 0xff);
             break;
         case 2:
-            regs->eax = (old_eax & 0xffff0000) | (p->data & 0xffff);
+            regs->eax = (old_eax & ~0xffff) | (p->data & 0xffff);
             break;
         case 4:
             regs->eax = (p->data & 0xffffffff);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86-64/hvm: pio result storing, Xen patchbot-unstable <=