From: Uros Bizjak Date: Fri, 21 Nov 2025 14:14:11 +0000 (+0100) Subject: x86/hyperv: Remove ASM_CALL_CONSTRAINT with VMMCALL insn X-Git-Tag: v7.0-rc1~43^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=885e78d71f772dd4c83f83530814870062115f85;p=thirdparty%2Fkernel%2Flinux.git x86/hyperv: Remove ASM_CALL_CONSTRAINT with VMMCALL insn Unlike CALL instruction, VMMCALL does not push to the stack, so it's OK to allow the compiler to insert it before the frame pointer gets set up by the containing function. ASM_CALL_CONSTRAINT is for CALLs that must be inserted after the frame pointer is set up, so it is over-constraining here and can be removed. Signed-off-by: Uros Bizjak Tested-by: Michael Kelley Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Wei Liu Cc: Dexuan Cui Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Signed-off-by: Wei Liu --- diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c index 7365d8f43181..be7fad43a88d 100644 --- a/arch/x86/hyperv/ivm.c +++ b/arch/x86/hyperv/ivm.c @@ -392,7 +392,7 @@ u64 hv_snp_hypercall(u64 control, u64 param1, u64 param2) register u64 __r8 asm("r8") = param2; asm volatile("vmmcall" - : "=a" (hv_status), ASM_CALL_CONSTRAINT, + : "=a" (hv_status), "+c" (control), "+d" (param1), "+r" (__r8) : : "cc", "memory", "r9", "r10", "r11");