From: "tip-bot2 for Uros Bizjak" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Juergen Gross <jgross@suse.com>, "H. Peter Anvin" <hpa@zytor.com>,
Alexey Makhalov <alexey.makhalov@broadcom.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/paravirt] x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted()
Date: Thu, 15 Jan 2026 11:11:25 -0000 [thread overview]
Message-ID: <176847548563.510.8833320214622078587.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260114211948.74774-2-ubizjak@gmail.com>
The following commit has been merged into the x86/paravirt branch of tip:
Commit-ID: 31911d3c394d6556a67ff63cf0093049ef6dcdd7
Gitweb: https://git.kernel.org/tip/31911d3c394d6556a67ff63cf0093049ef6dcdd7
Author: Uros Bizjak <ubizjak@gmail.com>
AuthorDate: Wed, 14 Jan 2026 22:18:15 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Thu, 15 Jan 2026 11:44:29 +01:00
x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted()
x86_64 zero extends 32bit operations, so for 64bit operands, XOR r32,r32 is
functionally equal to XOR r64,r64, but avoids a REX prefix byte when legacy
registers are used.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Alexey Makhalov <alexey.makhalov@broadcom.com>
Link: https://patch.msgid.link/20260114211948.74774-2-ubizjak@gmail.com
---
arch/x86/include/asm/paravirt-spinlock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/paravirt-spinlock.h b/arch/x86/include/asm/paravirt-spinlock.h
index 458b888..7beffcb 100644
--- a/arch/x86/include/asm/paravirt-spinlock.h
+++ b/arch/x86/include/asm/paravirt-spinlock.h
@@ -45,7 +45,7 @@ static __always_inline void pv_queued_spin_unlock(struct qspinlock *lock)
static __always_inline bool pv_vcpu_is_preempted(long cpu)
{
return PVOP_ALT_CALLEE1(bool, pv_ops_lock, vcpu_is_preempted, cpu,
- "xor %%" _ASM_AX ", %%" _ASM_AX,
+ "xor %%eax, %%eax",
ALT_NOT(X86_FEATURE_VCPUPREEMPT));
}
next prev parent reply other threads:[~2026-01-15 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 21:18 [PATCH RESEND 1/2] x86/paravirt: Remove trailing semicolons from alternative asm templates Uros Bizjak
2026-01-14 21:18 ` [PATCH RESEND 2/2] x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted() Uros Bizjak
2026-01-15 11:11 ` tip-bot2 for Uros Bizjak [this message]
2026-01-15 11:11 ` [tip: x86/paravirt] x86/paravirt: Remove trailing semicolons from alternative asm templates tip-bot2 for Uros Bizjak
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=176847548563.510.8833320214622078587.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=alexey.makhalov@broadcom.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=ubizjak@gmail.com \
--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
all inboxes | Powered by JetHome®