aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-03-07 08:17:44 +0000
committerJan Beulich <jbeulich@suse.com>2012-03-07 08:17:44 +0000
commit6f8145eee37cdb6b4af2f33fbe80970608227dc3 (patch)
tree93eff710546ddd7687874e04b7b7a01309bd96bd /tools
parente62931be21ed3e36766048e0878ddf58a56f50cb (diff)
downloadxen-6f8145eee37cdb6b4af2f33fbe80970608227dc3.tar.gz
xen-6f8145eee37cdb6b4af2f33fbe80970608227dc3.tar.bz2
xen-6f8145eee37cdb6b4af2f33fbe80970608227dc3.zip
x86/emulator: workaround for AMD erratum 573
The only cases where we might end up emulating fsincos (as any other x87 operations without memory operands) are - when a HVM guest is in real mode (not applicable on AMD) - between two half page table updates in PAE mode (unlikely, and not doing the emulation here does affect only performance, not correctness) - when a guest maliciously (or erroneously) modifies an (MMIO or page table update) instruction under emulation (unspecified behavior) Hence, in order to avoid the erratum to cause harm to the entire host, don't emulate fsincos on the affected AMD CPU families. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> xen-unstable changeset: 24417:1452fb248cd5 xen-unstable date: Fri Dec 16 15:45:40 2011 +0100
Diffstat (limited to 'tools')
-rw-r--r--tools/tests/x86_emulator/x86_emulate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/tests/x86_emulator/x86_emulate.c b/tools/tests/x86_emulator/x86_emulate.c
index a58a7b8178..95e9ff603d 100644
--- a/tools/tests/x86_emulator/x86_emulate.c
+++ b/tools/tests/x86_emulator/x86_emulate.c
@@ -3,5 +3,7 @@
#include <string.h>
#include <public/xen.h>
+#define cpu_has_amd_erratum(nr) 0
+
#include "x86_emulate/x86_emulate.h"
#include "x86_emulate/x86_emulate.c"