From: Alexey Makhalov <alexey.makhalov@broadcom.com>
To: Uros Bizjak <ubizjak@gmail.com>,
bcm-kernel-feedback-list@broadcom.com,
virtualization@lists.linux.dev, x86@kernel.org,
linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Ajay Kaher <ajay.kaher@broadcom.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH RESEND 2/2] x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted()
Date: Wed, 7 Jan 2026 12:24:53 -0800 [thread overview]
Message-ID: <75651326-1d18-4db0-8995-ff4dd6dc1da3@broadcom.com> (raw)
In-Reply-To: <20260105093944.52387-2-ubizjak@gmail.com>
On 1/5/26 1:39 AM, Uros Bizjak wrote:
> 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>
> Reviewed-by: Juergen Gross <jgross@suse.com>
> Cc: Ajay Kaher <ajay.kaher@broadcom.com>
> Cc: Alexey Makhalov <alexey.makhalov@broadcom.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> 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/include/asm/paravirt.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
> index 4f6ec60b4cb3..59aec695ae5f 100644
> --- a/arch/x86/include/asm/paravirt.h
> +++ b/arch/x86/include/asm/paravirt.h
> @@ -577,7 +577,7 @@ static __always_inline void pv_kick(int cpu)
> static __always_inline bool pv_vcpu_is_preempted(long cpu)
> {
> return PVOP_ALT_CALLEE1(bool, lock.vcpu_is_preempted, cpu,
> - "xor %%" _ASM_AX ", %%" _ASM_AX,
> + "xor %%eax, %%eax",
> ALT_NOT(X86_FEATURE_VCPUPREEMPT));
> }
>
Acked-by: Alexey Makhalov <alexey.makhalov@broadcom.com>
next prev parent reply other threads:[~2026-01-07 20:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 9:39 [PATCH RESEND 1/2] x86/paravirt: Remove trailing semicolons from alternative asm templates Uros Bizjak
2026-01-05 9:39 ` [PATCH RESEND 2/2] x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted() Uros Bizjak
2026-01-07 9:54 ` H. Peter Anvin
2026-01-07 20:24 ` Alexey Makhalov [this message]
2026-01-07 20:19 ` [PATCH RESEND 1/2] x86/paravirt: Remove trailing semicolons from alternative asm templates Alexey Makhalov
2026-01-14 20:28 ` Borislav Petkov
2026-01-14 21:28 ` Uros Bizjak
-- strict thread matches above, loose matches on Subject: below --
2026-01-14 21:18 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
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=75651326-1d18-4db0-8995-ff4dd6dc1da3@broadcom.com \
--to=alexey.makhalov@broadcom.com \
--cc=ajay.kaher@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=ubizjak@gmail.com \
--cc=virtualization@lists.linux.dev \
--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