aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_emulate.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-21 14:50:27 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-21 14:50:27 +0000
commit2bd0e7b9652a975f6dc89faf4eba904cf27f4d3b (patch)
treec3b9214647c19576097af59d2c02bd77a0d76ad7 /xen/arch/x86/x86_emulate.c
parent219c37ca95a548a36434f382e5c47f15f93954f4 (diff)
downloadxen-2bd0e7b9652a975f6dc89faf4eba904cf27f4d3b.tar.gz
xen-2bd0e7b9652a975f6dc89faf4eba904cf27f4d3b.tar.bz2
xen-2bd0e7b9652a975f6dc89faf4eba904cf27f4d3b.zip
x86_emulate: Allow writeback-avoidance optimisation to be defeated by
the caller. This is used in cases where the writeback may be to an MMIO region with side effects (the APIC EOI register is the main example of this). Also fix up build of the x86_emulate user-space test harness. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/x86_emulate.c')
-rw-r--r--xen/arch/x86/x86_emulate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_emulate.c b/xen/arch/x86/x86_emulate.c
index b240a0a48e..fb3280d505 100644
--- a/xen/arch/x86/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate.c
@@ -24,6 +24,7 @@
#ifndef __XEN__
#include <stddef.h>
#include <stdint.h>
+#include <string.h>
#include <public/xen.h>
#else
#include <xen/config.h>
@@ -1983,7 +1984,8 @@ x86_emulate(
}
break;
case OP_MEM:
- if ( !(d & Mov) && (dst.orig_val == dst.val) )
+ if ( !(d & Mov) && (dst.orig_val == dst.val) &&
+ !ctxt->force_writeback )
/* nothing to do */;
else if ( lock_prefix )
rc = ops->cmpxchg(