From: Will Deacon <will@kernel.org>
To: Yicong Yang <yangyicong@huawei.com>
Cc: 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, jonathan.cameron@huawei.com,
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: Thu, 11 Sep 2025 16:50:14 +0100 [thread overview]
Message-ID: <aMLvtpaCgRqPAU2Z@willie-the-truck> (raw)
In-Reply-To: <5d2ba565-715b-9b17-951b-f805dde5988b@huawei.com>
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.
Will
next prev parent reply other threads:[~2025-09-11 15:50 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 [this message]
2025-09-12 13:47 ` Jonathan Cameron
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=aMLvtpaCgRqPAU2Z@willie-the-truck \
--to=will@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=joey.gouly@arm.com \
--cc=jonathan.cameron@huawei.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox