Revert "x86/retpoline/hyperv: Convert assembler indirect jumps"
authorSasha Levin <alexander.levin@microsoft.com>
Tue, 20 Mar 2018 20:44:17 +0000 (16:44 -0400)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 21 Mar 2018 03:49:54 +0000 (23:49 -0400)
This reverts commit db8171fb71e4af877f400406d8f114c4021d2ef2.

Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/hv/hv.c

index 4d075535038710fea9b24f05ea8c74c0b1ffe130..eab3a88efca5c638a4637a58413af914f962bc38 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/clockchips.h>
 #include <asm/hyperv.h>
 #include <asm/mshyperv.h>
-#include <asm/nospec-branch.h>
 #include "hyperv_vmbus.h"
 
 /* The one and only */
@@ -101,10 +100,9 @@ static u64 do_hypercall(u64 control, void *input, void *output)
        void *hypercall_page = hv_context.hypercall_page;
 
        __asm__ __volatile__("mov %0, %%r8" : : "r" (output_address) : "r8");
-       __asm__ __volatile__(CALL_NOSPEC :
-                            "=a" (hv_status) :
+       __asm__ __volatile__("call *%3" : "=a" (hv_status) :
                             "c" (control), "d" (input_address),
-                            THUNK_TARGET(hypercall_page));
+                            "m" (hypercall_page));
 
        return hv_status;
 
@@ -122,12 +120,11 @@ static u64 do_hypercall(u64 control, void *input, void *output)
        u32 output_address_lo = output_address & 0xFFFFFFFF;
        void *hypercall_page = hv_context.hypercall_page;
 
-       __asm__ __volatile__ (CALL_NOSPEC : "=d"(hv_status_hi),
+       __asm__ __volatile__ ("call *%8" : "=d"(hv_status_hi),
                              "=a"(hv_status_lo) : "d" (control_hi),
                              "a" (control_lo), "b" (input_address_hi),
                              "c" (input_address_lo), "D"(output_address_hi),
-                             "S"(output_address_lo),
-                             THUNK_TARGET(hypercall_page));
+                             "S"(output_address_lo), "m" (hypercall_page));
 
        return hv_status_lo | ((u64)hv_status_hi << 32);
 #endif /* !x86_64 */