[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.4] x86: don't clear high 32 bits of RAX on sub-word guest I/O port reads



commit 226059859e6f5a80a5a1728e5dc8ccde50e25f80
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue May 19 11:58:37 2015 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 19 11:58:37 2015 +0200

    x86: don't clear high 32 bits of RAX on sub-word guest I/O port reads
    
    1- or 2-byte operations never alter the high halves of registers.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 1191aa9d1988c469844eb4545689617a8b13eae1
    master date: 2015-05-11 10:37:58 +0200
---
 xen/arch/x86/traps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 9b03c17..e44cd2d 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -2126,7 +2126,7 @@ static int emulate_privileged_op(struct cpu_user_regs 
*regs)
             if ( op_bytes == 4 )
                 regs->eax = 0;
             else
-                regs->eax &= ~((1u << (op_bytes * 8)) - 1);
+                regs->eax &= ~((1 << (op_bytes * 8)) - 1);
             regs->eax |= guest_io_read(port, op_bytes, v, regs);
         }
         bpmatch = check_guest_io_breakpoint(v, port, op_bytes);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.