From: Ben Horgan <ben.horgan@arm.com>
To: Mark Brown <broonie@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Shuah Khan <shuah@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 3/3] kselftest/arm64: Add lsfe to the hwcaps test
Date: Mon, 30 Jun 2025 11:08:15 +0100 [thread overview]
Message-ID: <1d825680-4275-42cb-9e3c-dc49f828f7a8@arm.com> (raw)
In-Reply-To: <20250627-arm64-lsfe-v1-3-68351c4bf741@kernel.org>
Hi Mark,
On 6/27/25 18:20, Mark Brown wrote:
> This feature has no traps associated with it so the SIGILL is not reliable.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> tools/testing/selftests/arm64/abi/hwcap.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
> index 35f521e5f41c..9dfca2eb7c41 100644
> --- a/tools/testing/selftests/arm64/abi/hwcap.c
> +++ b/tools/testing/selftests/arm64/abi/hwcap.c
> @@ -17,6 +17,8 @@
> #include <asm/sigcontext.h>
> #include <asm/unistd.h>
>
> +#include <linux/auxvec.h>
> +
> #include "../../kselftest.h"
>
> #define TESTS_PER_HWCAP 3
> @@ -165,6 +167,18 @@ static void lse128_sigill(void)
> : "cc", "memory");
> }
>
> +static void lsfe_sigill(void)
> +{
> + float __attribute__ ((aligned (16))) mem = 0;
> + register float *memp asm ("x0") = &mem;
> +
> + /* LDFADD H0, H0, [X0] */
> + asm volatile(".inst 0x7c600000"
Same effect, but isn't this the release variant, LDFADDL?
> + : "+r" (memp)
> + :
> + : "cc", "memory");
> +}
> +
> static void lut_sigill(void)
> {
> /* LUTI2 V0.16B, { V0.16B }, V[0] */
> @@ -758,6 +772,13 @@ static const struct hwcap_data {
> .cpuinfo = "lse128",
> .sigill_fn = lse128_sigill,
> },
> + {
> + .name = "LSFE",
> + .at_hwcap = AT_HWCAP3,
> + .hwcap_bit = HWCAP3_LSFE,
> + .cpuinfo = "lsfe",
> + .sigill_fn = lsfe_sigill,
> + },
> {
> .name = "LUT",
> .at_hwcap = AT_HWCAP2,
>
Thanks,
Ben
next prev parent reply other threads:[~2025-06-30 10:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 17:20 [PATCH 0/3] arm64: Support FEAT_LSFE (Large System Float Extension) Mark Brown
2025-06-27 17:20 ` [PATCH 1/3] arm64/hwcap: Add hwcap for FEAT_LSFE Mark Brown
2025-06-30 10:05 ` Ben Horgan
2025-06-27 17:20 ` [PATCH 2/3] KVM: arm64: Expose FEAT_LSFE to guests Mark Brown
2025-06-27 17:20 ` [PATCH 3/3] kselftest/arm64: Add lsfe to the hwcaps test Mark Brown
2025-06-30 10:08 ` Ben Horgan [this message]
2025-06-30 10:21 ` [PATCH 0/3] arm64: Support FEAT_LSFE (Large System Float Extension) Ben Horgan
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=1d825680-4275-42cb-9e3c-dc49f828f7a8@arm.com \
--to=ben.horgan@arm.com \
--cc=broonie@kernel.org \
--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-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=will@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®