From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Will Deacon <will@kernel.org>
Cc: Yicong Yang <yangyicong@huawei.com>, <yangyicong@hisilicon.com>,
<catalin.marinas@arm.com>, <maz@kernel.org>,
<oliver.upton@linux.dev>, <corbet@lwn.net>,
<linux-arm-kernel@lists.infradead.org>, <kvmarm@lists.linux.dev>,
<linux-kselftest@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<joey.gouly@arm.com>, <suzuki.poulose@arm.com>,
<yuzenghui@huawei.com>, <shuah@kernel.org>,
<shameerali.kolothum.thodi@huawei.com>, <linuxarm@huawei.com>,
<prime.zeng@hisilicon.com>, <xuwei5@huawei.com>,
<tangchengchang@huawei.com>, <wangzhou1@hisilicon.com>
Subject: Re: [PATCH v4 5/7] arm64: Add support for FEAT_{LS64, LS64_V}
Date: Fri, 12 Sep 2025 14:47:36 +0100 [thread overview]
Message-ID: <20250912144736.00007673@huawei.com> (raw)
In-Reply-To: <aMLvtpaCgRqPAU2Z@willie-the-truck>
On Thu, 11 Sep 2025 16:50:14 +0100
Will Deacon <will@kernel.org> wrote:
> On Tue, Sep 09, 2025 at 09:48:04AM +0800, Yicong Yang wrote:
> > On 2025/9/8 20:01, Will Deacon wrote:
> > > On Tue, Jul 15, 2025 at 04:13:54PM +0800, Yicong Yang wrote:
> > >> diff --git a/Documentation/arch/arm64/elf_hwcaps.rst b/Documentation/arch/arm64/elf_hwcaps.rst
> > >> index 69d7afe56853..9e6db258ff48 100644
> > >> --- a/Documentation/arch/arm64/elf_hwcaps.rst
> > >> +++ b/Documentation/arch/arm64/elf_hwcaps.rst
> > >> @@ -435,6 +435,12 @@ HWCAP2_SME_SF8DP4
> > >> HWCAP2_POE
> > >> Functionality implied by ID_AA64MMFR3_EL1.S1POE == 0b0001.
> > >>
> > >> +HWCAP3_LS64
> > >> + Functionality implied by ID_AA64ISAR1_EL1.LS64 == 0b0001.
> > >> +
> > >> +HWCAP3_LS64_V
> > >> + Functionality implied by ID_AA64ISAR1_EL1.LS64 == 0b0010.
> > >
> > > Given that these instructions only work on IMPLEMENTATION DEFINED memory
> > > locations and aren't guaranteed to generate an abort if used elsewhere,
> > > how is userspace supposed to know what to do with them?
> > >
> >
> > per ARM DDI0487 L.b section C3.2.6,
> >
> > When the instructions access a memory type that is not one of the following,
> > a data abort for unsupported Exclusive or atomic access is generated...
>
> That's about the memory _type_. I'm talking about a supported memory type
> (e.g. writeback cacheable) but when the physical location doesn't support
> the instruction. That's captured a little later in the same section:
>
> | If the target memory location does not support the LD64B or ST64B
> | instructions, then one of the following behaviors occurs:
> | * A stage 1 Data Abort, reported using the DFSC code of 0b110101,
> | is generated.
> | * The instruction performs the memory accesses, but the accesses
> | are not single-copy atomic above the byte level
>
> and I think that's a bad interface to expose blindly to userspace solely
> as a boolean hwcap.
Hi Will,
Nasty, so now I'm curious. Any thoughts on how to expose what regions it is appropriate
for? I can think of various heavy weight options but wondering if there is a simple
solution.
Jonathan
>
> Will
>
next prev parent reply other threads:[~2025-09-12 14:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 8:13 [PATCH v4 0/7] Add support for FEAT_{LS64, LS64_V} and related tests Yicong Yang
2025-07-15 8:13 ` [PATCH v4 1/7] KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots Yicong Yang
2025-07-15 8:13 ` [PATCH v4 2/7] KVM: arm64: Add documentation for KVM_EXIT_ARM_LDST64B Yicong Yang
2025-07-15 8:13 ` [PATCH v4 3/7] KVM: arm64: Handle DABT caused by LS64* instructions on unsupported memory Yicong Yang
2025-07-15 8:13 ` [PATCH v4 4/7] arm64: Provide basic EL2 setup for FEAT_{LS64, LS64_V} usage at EL0/1 Yicong Yang
2025-09-08 11:48 ` Will Deacon
2025-07-15 8:13 ` [PATCH v4 5/7] arm64: Add support for FEAT_{LS64, LS64_V} Yicong Yang
2025-09-08 12:01 ` Will Deacon
2025-09-09 1:48 ` Yicong Yang
2025-09-11 15:50 ` Will Deacon
2025-09-12 13:47 ` Jonathan Cameron [this message]
2025-09-15 8:29 ` Yicong Yang
2025-09-16 14:56 ` Catalin Marinas
2025-09-17 3:51 ` Yicong Yang
2025-09-17 4:00 ` Yicong Yang
2025-09-17 14:20 ` Catalin Marinas
2025-09-18 9:09 ` Yicong Yang
2025-07-15 8:13 ` [PATCH v4 6/7] KVM: arm64: Enable FEAT_{LS64, LS64_V} in the supported guest Yicong Yang
2025-07-15 8:13 ` [PATCH v4 7/7] kselftest/arm64: Add HWCAP test for FEAT_{LS64, LS64_V} Yicong Yang
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=20250912144736.00007673@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=prime.zeng@hisilicon.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tangchengchang@huawei.com \
--cc=wangzhou1@hisilicon.com \
--cc=will@kernel.org \
--cc=xuwei5@huawei.com \
--cc=yangyicong@hisilicon.com \
--cc=yangyicong@huawei.com \
--cc=yuzenghui@huawei.com \
/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.