From: Andrew Cooper Date: Wed, 9 May 2018 17:06:46 +0000 (+0100) Subject: x86/emul: Fix emulator test harness build following a backport of 7c508612 X-Git-Tag: archive/raspbian/4.8.3+xsa262+shim4.10.0+comet3-1+deb9u7+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=18ce6a6f23f78cb14a8833f008342a892d8925f9;p=xen.git x86/emul: Fix emulator test harness build following a backport of 7c508612 The x86 emulator doesn't need to employ any Spectre v2 mitigations. Signed-off-by: Andrew Cooper (cherry picked from commit 44c709e6304b199352a8574738cb4a8c549491c2) Gbp-Pq: Name x86emul-fix-emulator-test-harness-build-.patch1 --- diff --git a/tools/tests/x86_emulator/x86_emulate.c b/tools/tests/x86_emulator/x86_emulate.c index 58cfd8ae7d..ed3280b9dc 100644 --- a/tools/tests/x86_emulator/x86_emulate.c +++ b/tools/tests/x86_emulator/x86_emulate.c @@ -53,4 +53,9 @@ typedef bool bool_t; #define likely(x) __builtin_expect(!!(x), true) #define unlikely(x) __builtin_expect(!!(x), false) +/* No Spectre mitigations needed for the test harness. */ +asm (".macro INDIRECT_CALL arg:req\n\t" + "call *\\arg\n\t" + ".endm"); + #include "x86_emulate/x86_emulate.c"