diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-02-21 14:50:27 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-02-21 14:50:27 +0000 |
commit | 2bd0e7b9652a975f6dc89faf4eba904cf27f4d3b (patch) | |
tree | c3b9214647c19576097af59d2c02bd77a0d76ad7 /xen/arch/x86/x86_emulate.c | |
parent | 219c37ca95a548a36434f382e5c47f15f93954f4 (diff) | |
download | xen-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.c | 4 |
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( |