From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86: don't clear high 32 bits of RAX on sub-word guest I/O port reads Date: Fri, 8 May 2015 13:36:51 +0100 Message-ID: <554CADE3.2020601@citrix.com> References: <554CC34502000078000783A3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yqhbk-0006kQ-8W for xen-devel@lists.xenproject.org; Fri, 08 May 2015 12:42:24 +0000 In-Reply-To: <554CC34502000078000783A3@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 08/05/15 13:08, Jan Beulich wrote: > 1- or 2-byte operations never alter the high halves of registers. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper > > --- 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); > > >