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] [XEN] Small ioemul cleanup.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Small ioemul cleanup.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Nov 2006 11:10:13 +0000
Delivery-date: Fri, 24 Nov 2006 03:09:56 -0800
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
# Node ID 3127a43786d801dc27d7ff47e24268d1ed1da240
# Parent  62307643804e069200361d729d598ae92bb14a8b
[XEN] Small ioemul cleanup.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/traps.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r 62307643804e -r 3127a43786d8 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Nov 23 17:32:18 2006 +0000
+++ b/xen/arch/x86/traps.c      Thu Nov 23 17:37:23 2006 +0000
@@ -1046,8 +1046,7 @@ static int emulate_privileged_op(struct 
     u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0;
     unsigned int port, i, op_bytes = 4, data, rc;
     char io_emul_stub[16];
-    void (*io_emul)(struct cpu_user_regs *) __attribute__((__regparm__(1))) \
-        = (void*)&io_emul_stub[0];
+    void (*io_emul)(struct cpu_user_regs *) __attribute__((__regparm__(1)));
     u32 l, h;
 
     /* Legacy prefixes. */
@@ -1190,6 +1189,9 @@ static int emulate_privileged_op(struct 
     *(s32 *)&io_emul_stub[9] =
         (char *)guest_to_host_gpr_switch - &io_emul_stub[13];
 
+    /* Handy function-typed pointer to the stub. */
+    io_emul = (void *)io_emul_stub;
+
     /* I/O Port and Interrupt Flag instructions. */
     switch ( opcode )
     {
@@ -1207,13 +1209,13 @@ static int emulate_privileged_op(struct 
             if ( guest_inb_okay(port, v, regs) )
                 io_emul(regs);
             else
-                regs->eax = (regs->eax & ~0xffUL) | (u8)~0;
+                regs->eax |= (u8)~0;
             break;
         case 2:
             if ( guest_inw_okay(port, v, regs) )
                 io_emul(regs);
             else
-                regs->eax = (regs->eax & ~0xffffUL) | (u16)~0;
+                regs->eax |= (u16)~0;
             break;
         case 4:
             if ( guest_inl_okay(port, v, regs) )

_______________________________________________
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] [XEN] Small ioemul cleanup., Xen patchbot-unstable <=