[PATCH v12 06/40] arm64/sme: Provide ABI documentation for SME

Mark Brown broonie at kernel.org
Fri Mar 11 10:42:57 PST 2022


On Fri, Mar 11, 2022 at 05:21:21PM +0000, Szabolcs Nagy wrote:
> The 02/25/2022 16:58, Mark Brown wrote:

> i would s/SVE vector/streaming mode SVE vector/

Done.

> > +* On creation fork() or clone() the newly created process will have PSTATE.SM
> > +  and PSTATE.ZA cleared.

> is there a reason why fork() clears ZA?

> i think this is a minor issue, but the usual expectation is that
> on thread creation thread local state is reset in the child, but
> in a forked child the state is the same as in the parent (where
> ZA is preserved according to the first rule).

It was partly consistency with SM and the SVE state (though that is also
covered by just being in a system call unlike ZA) and partly concerns
about what happens if the fork() happens in library code which isn't SME
aware - it would end up carrying around a copy of ZA with associated
power and performance impacts if it doesn't exec().  Overall it seemed
like there would to be less potential for unpleasant surprises if we
consistently discard the data.

That's not a *super* strongly held opinion though, we could switch to
preserving whenever we preserve TPIDR2.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220311/8fc13d95/attachment.sig>


More information about the linux-arm-kernel mailing list