[xen staging-4.8] x86/emul: Fix emulator test harness build following a backport of 7c508612

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging-4.8] x86/emul: Fix emulator test harness build following a backport of 7c508612

patchbot
commit 44c709e6304b199352a8574738cb4a8c549491c2
Author:     Andrew Cooper <[hidden email]>
AuthorDate: Wed May 9 18:06:46 2018 +0100
Commit:     Andrew Cooper <[hidden email]>
CommitDate: Wed May 9 18:06:49 2018 +0100

    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 <[hidden email]>
---
 tools/tests/x86_emulator/x86_emulate.c | 5 +++++
 1 file changed, 5 insertions(+)

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"
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.8

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog