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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] x86_emulate: fix unintended writeback on

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86_emulate: fix unintended writeback on cmp/test instructions
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jul 2008 08:10:10 -0700
Delivery-date: Mon, 28 Jul 2008 08:10:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216990827 -3600
# Node ID 2e4ecfc834602ff4b13564532dc33d9f94c03f89
# Parent  267a59f9580bf8694bf8a9e4b2ea3377f5262039
x86_emulate: fix unintended writeback on cmp/test instructions

This patch fixes an issue when x86_emulate is called with
force_writeback=1 set. It resulted in cmp and test instructions with
memory operands to have the mem value written back after instruction
emulation finished. This caused false alarms on writes to RO mem, and
might have caused other issues if unintended writes occured to device
registers in mmio space.

Signed-off-by: Trolle Selander <trolle.selander@xxxxxxxxxxxxx>
 xen/arch/x86/x86_emulate/x86_emulate.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r 267a59f9580b -r 2e4ecfc83460 xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c    Fri Jul 25 13:59:07 2008 +0100
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c    Fri Jul 25 14:00:27 2008 +0100
@@ -1606,6 +1606,7 @@ x86_emulate(
         dst.val = _regs.eax;
     case 0x38 ... 0x3b: cmp: /* cmp */
         emulate_2op_SrcV("cmp", src, dst, _regs.eflags);
+        dst.type = OP_NONE;
     case 0x62: /* bound */ {
@@ -1707,6 +1708,7 @@ x86_emulate(
         dst.val = _regs.eax;
     case 0x84 ... 0x85: test: /* test */
         emulate_2op_SrcV("test", src, dst, _regs.eflags);
+        dst.type = OP_NONE;
     case 0x86 ... 0x87: xchg: /* xchg */

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86_emulate: fix unintended writeback on cmp/test instructions, Xen patchbot-unstable <=