x86/emul: Fix emulator test harness build following a backport of 7c508612
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 9 May 2018 17:06:46 +0000 (18:06 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 10 May 2018 15:50:52 +0000 (16:50 +0100)
The x86 emulator doesn't need to employ any Spectre v2 mitigations.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
(cherry picked from commit 44c709e6304b199352a8574738cb4a8c549491c2)

Gbp-Pq: Name x86emul-fix-emulator-test-harness-build-.patch1

tools/tests/x86_emulator/x86_emulate.c

index 58cfd8ae7d291f75d358d37ce5f45da2c4059143..ed3280b9dca07a9a7eb85d1bd7048b04d2219e44 100644 (file)
@@ -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"