From: Uros Bizjak Date: Wed, 11 Feb 2026 10:28:50 +0000 (+0100) Subject: KVM: VMX: Use ASM_INPUT_RM in __vmcs_writel X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=192f777b3af084d2073037b13ed0c2457e563d39;p=thirdparty%2Fkernel%2Flinux.git KVM: VMX: Use ASM_INPUT_RM in __vmcs_writel Use the ASM_INPUT_RM macro for VMCS write operation in vmx_ops.h to work around clang problems with "rm" asm constraint. clang seems to always chose the memory input, while it is almost always the worst choice. Signed-off-by: Uros Bizjak Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Acked-by: Nathan Chancellor Link: https://patch.msgid.link/20260211102928.100944-2-ubizjak@gmail.com Signed-off-by: Sean Christopherson --- diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h index 1000d37f5b0c2..81784befaaf49 100644 --- a/arch/x86/kvm/vmx/vmx_ops.h +++ b/arch/x86/kvm/vmx/vmx_ops.h @@ -221,7 +221,7 @@ fault: \ static __always_inline void __vmcs_writel(unsigned long field, unsigned long value) { - vmx_asm2(vmwrite, "r"(field), "rm"(value), field, value); + vmx_asm2(vmwrite, "r" (field), ASM_INPUT_RM (value), field, value); } static __always_inline void vmcs_write16(unsigned long field, u16 value)