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] Fix EA calculation for POP <rm> whe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Fix EA calculation for POP <rm> when stack pointer is used as
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Jan 2007 12:55:05 -0800
Delivery-date: Fri, 05 Jan 2007 12:55:00 -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
# Date 1168008298 0
# Node ID 16b0e0f250f49bd383f9cbe4a21155f8df1091cf
# Parent  58efd34d08375a13a33cf07f78af3cb8f094c322
[XEN] Fix EA calculation for POP <rm> when stack pointer is used as
base of the EA calculation. It should be used *post* increment.

Original patch from Jan Beulich <jbeulich@xxxxxxxxxx>

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 58efd34d0837 -r 16b0e0f250f4 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Fri Jan 05 12:33:23 2007 +0000
+++ b/xen/arch/x86/x86_emulate.c        Fri Jan 05 14:44:58 2007 +0000
@@ -616,6 +616,11 @@ x86_emulate(
                 ea.mem.off <<= (sib >> 6) & 3;
                 if ( (modrm_mod == 0) && ((sib_base & 7) == 5) )
                     ea.mem.off += insn_fetch_type(int32_t);
+                else if ( (sib_base == 4) && !twobyte && (b == 0x8f) )
+                    /* POP <rm> must have its EA calculated post increment. */
+                    ea.mem.off += _regs.esp +
+                        (((mode == X86EMUL_MODE_PROT64) && (op_bytes == 4))
+                         ? 8 : op_bytes);
                 else
                     ea.mem.off += *(long*)decode_register(sib_base, &_regs, 0);
             }

_______________________________________________
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] Fix EA calculation for POP <rm> when stack pointer is used as, Xen patchbot-unstable <=