x86/retpoline/xen: Convert Xen hypercall indirect jumps

Convert indirect call in Xen hypercall to use non-speculative sequence,
when CONFIG_RETPOLINE is enabled.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: thomas.lendacky@amd.com
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Kees Cook <keescook@google.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Link: https://lkml.kernel.org/r/1515707194-20531-10-git-send-email-dwmw@amazon.co.uk

authored by David Woodhouse and committed by Thomas Gleixner ea08816d e70e5892

+3 -2
+3 -2
arch/x86/include/asm/xen/hypercall.h
··· 44 44 #include <asm/page.h> 45 45 #include <asm/pgtable.h> 46 46 #include <asm/smap.h> 47 + #include <asm/nospec-branch.h> 47 48 48 49 #include <xen/interface/xen.h> 49 50 #include <xen/interface/sched.h> ··· 218 217 __HYPERCALL_5ARG(a1, a2, a3, a4, a5); 219 218 220 219 stac(); 221 - asm volatile("call *%[call]" 220 + asm volatile(CALL_NOSPEC 222 221 : __HYPERCALL_5PARAM 223 - : [call] "a" (&hypercall_page[call]) 222 + : [thunk_target] "a" (&hypercall_page[call]) 224 223 : __HYPERCALL_CLOBBER5); 225 224 clac(); 226 225