|
@@ -179,7 +179,6 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
|
|
u64 input_address = input ? virt_to_phys(input) : 0;
|
|
u64 input_address = input ? virt_to_phys(input) : 0;
|
|
u64 output_address = output ? virt_to_phys(output) : 0;
|
|
u64 output_address = output ? virt_to_phys(output) : 0;
|
|
u64 hv_status;
|
|
u64 hv_status;
|
|
- register void *__sp asm(_ASM_SP);
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#ifdef CONFIG_X86_64
|
|
if (!hv_hypercall_pg)
|
|
if (!hv_hypercall_pg)
|
|
@@ -187,7 +186,7 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
|
|
|
|
|
|
__asm__ __volatile__("mov %4, %%r8\n"
|
|
__asm__ __volatile__("mov %4, %%r8\n"
|
|
"call *%5"
|
|
"call *%5"
|
|
- : "=a" (hv_status), "+r" (__sp),
|
|
|
|
|
|
+ : "=a" (hv_status), ASM_CALL_CONSTRAINT,
|
|
"+c" (control), "+d" (input_address)
|
|
"+c" (control), "+d" (input_address)
|
|
: "r" (output_address), "m" (hv_hypercall_pg)
|
|
: "r" (output_address), "m" (hv_hypercall_pg)
|
|
: "cc", "memory", "r8", "r9", "r10", "r11");
|
|
: "cc", "memory", "r8", "r9", "r10", "r11");
|
|
@@ -202,7 +201,7 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
|
|
|
|
|
|
__asm__ __volatile__("call *%7"
|
|
__asm__ __volatile__("call *%7"
|
|
: "=A" (hv_status),
|
|
: "=A" (hv_status),
|
|
- "+c" (input_address_lo), "+r" (__sp)
|
|
|
|
|
|
+ "+c" (input_address_lo), ASM_CALL_CONSTRAINT
|
|
: "A" (control),
|
|
: "A" (control),
|
|
"b" (input_address_hi),
|
|
"b" (input_address_hi),
|
|
"D"(output_address_hi), "S"(output_address_lo),
|
|
"D"(output_address_hi), "S"(output_address_lo),
|
|
@@ -224,12 +223,11 @@ static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
|
|
static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
|
|
static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
|
|
{
|
|
{
|
|
u64 hv_status, control = (u64)code | HV_HYPERCALL_FAST_BIT;
|
|
u64 hv_status, control = (u64)code | HV_HYPERCALL_FAST_BIT;
|
|
- register void *__sp asm(_ASM_SP);
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
|
#ifdef CONFIG_X86_64
|
|
{
|
|
{
|
|
__asm__ __volatile__("call *%4"
|
|
__asm__ __volatile__("call *%4"
|
|
- : "=a" (hv_status), "+r" (__sp),
|
|
|
|
|
|
+ : "=a" (hv_status), ASM_CALL_CONSTRAINT,
|
|
"+c" (control), "+d" (input1)
|
|
"+c" (control), "+d" (input1)
|
|
: "m" (hv_hypercall_pg)
|
|
: "m" (hv_hypercall_pg)
|
|
: "cc", "r8", "r9", "r10", "r11");
|
|
: "cc", "r8", "r9", "r10", "r11");
|
|
@@ -242,7 +240,7 @@ static inline u64 hv_do_fast_hypercall8(u16 code, u64 input1)
|
|
__asm__ __volatile__ ("call *%5"
|
|
__asm__ __volatile__ ("call *%5"
|
|
: "=A"(hv_status),
|
|
: "=A"(hv_status),
|
|
"+c"(input1_lo),
|
|
"+c"(input1_lo),
|
|
- "+r"(__sp)
|
|
|
|
|
|
+ ASM_CALL_CONSTRAINT
|
|
: "A" (control),
|
|
: "A" (control),
|
|
"b" (input1_hi),
|
|
"b" (input1_hi),
|
|
"m" (hv_hypercall_pg)
|
|
"m" (hv_hypercall_pg)
|