From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64/fpsimd: Only provide the length to cpufeature for xCR registers
Date: Fri, 4 Aug 2023 17:20:21 +0100 [thread overview]
Message-ID: <ZM0lRWTAE/b88V6U@arm.com> (raw)
In-Reply-To: <3ccab5cb-9d19-40a2-ae9c-99d37996da9c@sirena.org.uk>
On Thu, Aug 03, 2023 at 06:44:24PM +0100, Mark Brown wrote:
> On Thu, Aug 03, 2023 at 05:39:38PM +0100, Catalin Marinas wrote:
> > On Mon, Jul 31, 2023 at 02:58:48PM +0100, Mark Brown wrote:
> > > Since the only field we are interested in having the cpufeature code
> > > handle is the length field and we use a custom read function to obtain
> > > the value we can avoid these warnings by filtering out all other bits
> > > when we return the register value, if we're doing that we don't need to
> > > bother reading the register at all and can simply use the RDVL/RDSVL
> > > value we were filling in instead.
>
> > Maybe that's the simplest fix, especially if you want it in stable, but
>
> Yeah, it's definitely the sort of change we want as a fix - anything
> more invasive would be inappropriate.
I'd say it's still ok if we can just rip come code out safely (the fake
ID reg).
> > I wonder why we even bother with with treating ZCR_EL1 and SMCR_EL1 as
> > feature registers. We already have verify_sme_features() to check for
> > the mismatch. BTW, is vec_verify_vq_map() sufficient so that we can skip
> > the maximum vector length check?
>
> Both enumeration mechanisms were added in the initial series supporting
> SVE for reasons that are not entirely obvious to me. The changelogs
> explain what we're doing with the pseudo ID register stuff but do not
> comment on why. There is a cross check between the answers the two give
> which appears to be geared towards detecting systems with asymmetric
> maximum VLs for some reason but I'm not sure why that's done given that
> we can't cope if *any* VL in the committed set is missing, not just the
> maximum.
We can cope with different VLs if the committed map is built during boot
(early secondary CPU bring-up). For any late/hotplugged CPUs, if they
don't fit the map, they'll be rejected. Not sure where the actual
maximum length matters in this process though (or later for user space).
I assume the user will only be allowed to set the common VLs across all
the early CPUs.
> The whole thing is very suspect but given that we don't currently have
> any ability to emulate systems with asymmetric vector lengths I'm a bit
> reluctant to poke at it.
The Arm fast models should allow such configuration, though I haven't
tried.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64/fpsimd: Only provide the length to cpufeature for xCR registers
Date: Fri, 4 Aug 2023 17:20:21 +0100 [thread overview]
Message-ID: <ZM0lRWTAE/b88V6U@arm.com> (raw)
In-Reply-To: <3ccab5cb-9d19-40a2-ae9c-99d37996da9c@sirena.org.uk>
On Thu, Aug 03, 2023 at 06:44:24PM +0100, Mark Brown wrote:
> On Thu, Aug 03, 2023 at 05:39:38PM +0100, Catalin Marinas wrote:
> > On Mon, Jul 31, 2023 at 02:58:48PM +0100, Mark Brown wrote:
> > > Since the only field we are interested in having the cpufeature code
> > > handle is the length field and we use a custom read function to obtain
> > > the value we can avoid these warnings by filtering out all other bits
> > > when we return the register value, if we're doing that we don't need to
> > > bother reading the register at all and can simply use the RDVL/RDSVL
> > > value we were filling in instead.
>
> > Maybe that's the simplest fix, especially if you want it in stable, but
>
> Yeah, it's definitely the sort of change we want as a fix - anything
> more invasive would be inappropriate.
I'd say it's still ok if we can just rip come code out safely (the fake
ID reg).
> > I wonder why we even bother with with treating ZCR_EL1 and SMCR_EL1 as
> > feature registers. We already have verify_sme_features() to check for
> > the mismatch. BTW, is vec_verify_vq_map() sufficient so that we can skip
> > the maximum vector length check?
>
> Both enumeration mechanisms were added in the initial series supporting
> SVE for reasons that are not entirely obvious to me. The changelogs
> explain what we're doing with the pseudo ID register stuff but do not
> comment on why. There is a cross check between the answers the two give
> which appears to be geared towards detecting systems with asymmetric
> maximum VLs for some reason but I'm not sure why that's done given that
> we can't cope if *any* VL in the committed set is missing, not just the
> maximum.
We can cope with different VLs if the committed map is built during boot
(early secondary CPU bring-up). For any late/hotplugged CPUs, if they
don't fit the map, they'll be rejected. Not sure where the actual
maximum length matters in this process though (or later for user space).
I assume the user will only be allowed to set the common VLs across all
the early CPUs.
> The whole thing is very suspect but given that we don't currently have
> any ability to emulate systems with asymmetric vector lengths I'm a bit
> reluctant to poke at it.
The Arm fast models should allow such configuration, though I haven't
tried.
--
Catalin
next prev parent reply other threads:[~2023-08-04 16:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 13:58 [PATCH v2] arm64/fpsimd: Only provide the length to cpufeature for xCR registers Mark Brown
2023-07-31 13:58 ` Mark Brown
2023-08-03 16:39 ` Catalin Marinas
2023-08-03 16:39 ` Catalin Marinas
2023-08-03 17:44 ` Mark Brown
2023-08-03 17:44 ` Mark Brown
2023-08-04 16:20 ` Catalin Marinas [this message]
2023-08-04 16:20 ` Catalin Marinas
2023-08-04 16:37 ` Mark Brown
2023-08-04 16:37 ` Mark Brown
2023-08-09 16:11 ` Catalin Marinas
2023-08-09 16:11 ` Catalin Marinas
2023-08-11 11:44 ` Will Deacon
2023-08-11 11:44 ` Will Deacon
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=ZM0lRWTAE/b88V6U@arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.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 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.