[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: don't clear high 32 bits of RAX on sub-word guest I/O port reads
On Fri, May 08, 2015 at 01:08:05PM +0100, Jan Beulich wrote: > 1- or 2-byte operations never alter the high halves of registers. > That is impressive. How possibly did you spot this? Was it due to reviewing some other code that got you looking at this? Thanks! > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -2234,7 +2234,7 @@ static int emulate_privileged_op(struct > 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); > > > > 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> > > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -2234,7 +2234,7 @@ static int emulate_privileged_op(struct > 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); > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |