From: "Jan Beulich" Subject: [PATCH] x86_64: properly update RSI/RDI after emulated ins/outs Date: Fri, 26 May 2006 13:10:36 +0200 Message-ID: <4476FE4C.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part84A1BB3C.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part84A1BB3C.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Negating a value of type 'unsigned' doesn't make it signed... Signed-off-by: Jan Beulich --=__Part84A1BB3C.0__= Content-Type: text/plain; name="xen-x86_64-ins-outs-backward.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-x86_64-ins-outs-backward.patch" --- /home/jbeulich/src/xen/2006-05-19/xen/arch/x86/traps.c 2006-05-24 12:08:44.000000000 +0200 +++ 2006-05-19/xen/arch/x86/traps.c 2006-05-24 17:59:20.000000000 +0200 @@ -876,7 +876,7 @@ static int emulate_privileged_op(struct PAGE_FAULT(regs->edi, USER_WRITE_FAULT); break; } - regs->edi += (regs->eflags & EF_DF) ? -op_bytes : op_bytes; + regs->edi += (regs->eflags & EF_DF) ? -(long)op_bytes : op_bytes; break; case 0x6e: /* OUTSB */ @@ -902,7 +902,7 @@ static int emulate_privileged_op(struct outl_user((u32)data, (u16)regs->edx, v, regs); break; } - regs->esi += (regs->eflags & EF_DF) ? -op_bytes : op_bytes; + regs->esi += (regs->eflags & EF_DF) ? -(long)op_bytes : op_bytes; break; } --=__Part84A1BB3C.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part84A1BB3C.0__=--