From: Uros Bizjak <ubizjak@gmail.com>
To: kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>,
Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH 2/2] KVM: VMX: Use ASM_INPUT_RM in __vmcs_writel
Date: Wed, 11 Feb 2026 11:28:50 +0100 [thread overview]
Message-ID: <20260211102928.100944-2-ubizjak@gmail.com> (raw)
In-Reply-To: <20260211102928.100944-1-ubizjak@gmail.com>
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 <ubizjak@gmail.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/kvm/vmx/vmx_ops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h
index 1000d37f5b0c..81784befaaf4 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)
--
2.53.0
next prev parent reply other threads:[~2026-02-11 10:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 10:28 [PATCH 1/2] KVM: VMX: Drop obsolete branch hint prefixes from inline asm Uros Bizjak
2026-02-11 10:28 ` Uros Bizjak [this message]
2026-02-25 19:02 ` [PATCH 2/2] KVM: VMX: Use ASM_INPUT_RM in __vmcs_writel Nathan Chancellor
2026-02-11 10:57 ` [PATCH 1/2] KVM: VMX: Drop obsolete branch hint prefixes from inline asm Andrew Cooper
2026-02-11 13:36 ` Sean Christopherson
2026-02-11 13:43 ` David Laight
2026-02-11 13:55 ` Andrew Cooper
2026-02-11 15:44 ` Sean Christopherson
2026-02-11 16:11 ` Andrew Cooper
2026-02-11 16:17 ` Sean Christopherson
2026-02-11 16:46 ` Andrew Cooper
2026-02-11 16:49 ` Sean Christopherson
2026-02-11 21:35 ` David Laight
2026-03-05 17:08 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260211102928.100944-2-ubizjak@gmail.com \
--to=ubizjak@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox