aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-12-16 15:45:40 +0100
committerJan Beulich <jbeulich@suse.com>2011-12-16 15:45:40 +0100
commita1b22e625dee30b9ca572e5b7fe66f1aebd44d7d (patch)
tree3284bfa225b3b7e5716d3aede98720684e1f46f0 /tools/tests
parent6e359548a1c9afdaee765ccd8b9635424acdb1bd (diff)
downloadxen-a1b22e625dee30b9ca572e5b7fe66f1aebd44d7d.tar.gz
xen-a1b22e625dee30b9ca572e5b7fe66f1aebd44d7d.tar.bz2
xen-a1b22e625dee30b9ca572e5b7fe66f1aebd44d7d.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>
Diffstat (limited to 'tools/tests')
-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 9e1b124410..0306f8ebc6 100644
--- a/tools/tests/x86_emulator/x86_emulate.c
+++ b/tools/tests/x86_emulator/x86_emulate.c
@@ -9,5 +9,7 @@ typedef bool bool_t;
#define BUG() abort()
+#define cpu_has_amd_erratum(nr) 0
+
#include "x86_emulate/x86_emulate.h"
#include "x86_emulate/x86_emulate.c"