From: Luca Di Maio <luca@edera.dev>
To: Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/5] xen/arm64: detect the LSE atomic instructions
Date: Tue, 1 Dec 2026 16:53:47 +0100 [thread overview]
Message-ID: <aw7sOItN98l1Q7PZ@framework13.tail696c1.ts.net> (raw)
In-Reply-To: <92037524-9d94-447a-8066-8c4e9f496124@suse.com>
On Thu, Nov 26, 2026 at 08:58:21AM +0100, Jan Beulich wrote:
> On 25.11.2026 18:55, Luca Di Maio wrote:
> > Load/store exclusive loops give no forward-progress guarantee, so many
> > CPUs contending on one cache line can livelock. Add the
> > ARM64_HAS_LSE_ATOMICS capability and system_uses_lse_atomics(), patched
> > at boot like Linux's alternative_has_cap_likely(), for the next patches.
> > Assemblers older than binutils 2.26 lack .arch_extension, so Xen built
> > with one keeps the exclusive loops.
> >
> > Assisted-by: Claude:claude-opus-5-5
> > Signed-off-by: Luca Di Maio <luca@edera.dev>
> > ---
> > xen/arch/arm/arch.mk | 3 +++
> > xen/arch/arm/cpufeature.c | 10 +++++++++
> > xen/arch/arm/include/asm/arm64/lse.h | 31 +++++++++++++++++++++++++++
> > xen/arch/arm/include/asm/cpufeature.h | 3 ++-
> > 4 files changed, 46 insertions(+), 1 deletion(-)
> > create mode 100644 xen/arch/arm/include/asm/arm64/lse.h
> >
> > diff --git a/xen/arch/arm/arch.mk b/xen/arch/arm/arch.mk
> > index dea8dbd18a..fe8e02229f 100644
> > --- a/xen/arch/arm/arch.mk
> > +++ b/xen/arch/arm/arch.mk
> > @@ -19,6 +19,9 @@ endif
> > CFLAGS-$(CONFIG_ARM_64) += -mgeneral-regs-only # No fp registers etc
> > $(call cc-option-add,CFLAGS-$(CONFIG_ARM_64),CC,-mno-outline-atomics)
> >
> > +# Binutils >= 2.26
> > +$(call as-option-add,CFLAGS-$(CONFIG_ARM_64),CC,".arch_extension lse",-DHAVE_AS_LSE)
>
> Wouldn't this better be done in Kconfig nowadays?
>
> Jan
Hi Jan, thanks for the review.
I'll do that in V2
thanks
L.
next prev parent reply other threads:[~2026-12-01 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 17:55 [PATCH 0/5] xen/arm64: use LSE atomics when the CPU has them Luca Di Maio
2026-11-25 17:55 ` [PATCH 1/5] xen/arm64: detect the LSE atomic instructions Luca Di Maio
2026-11-26 7:58 ` Jan Beulich
2026-12-01 15:53 ` Luca Di Maio [this message]
2026-11-25 17:55 ` [PATCH 2/5] xen/arm64: use LSE in the atomic_t operations Luca Di Maio
2026-11-25 17:55 ` [PATCH 3/5] xen/arm64: use LSE in xchg() and cmpxchg() Luca Di Maio
2026-11-25 17:55 ` [PATCH 4/5] xen/arm64: use LSE in the bitops Luca Di Maio
2026-11-25 17:55 ` [PATCH 5/5] xen/arm64: use LSE for arch_fetch_and_add() Luca Di Maio
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=aw7sOItN98l1Q7PZ@framework13.tail696c1.ts.net \
--to=luca@edera.dev \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.