[PATCH 00/14] arm64: Preparatory FPSIMD/SVE/SME fixes
Mark Brown
broonie at kernel.org
Fri Apr 4 11:06:50 PDT 2025
On Fri, Apr 04, 2025 at 06:44:21PM +0100, Mark Rutland wrote:
> * The ptrace ABI for SME is written around the assumption that
> SVE_PT_REGS_FPSIMD and SVE_PT_REGS_SVE are separate bit flags, whereas
> in reality these are different values (0 and 1 respectively) for
> bit 0 of the user_sve_header flags.
The documentation definitely doesn't reflect what actually got
implemented, IIRC the errors are more around returning the header only
rather than the assumption that they're separate flags but at this point
it doesn't really matter given that the documentation is clearly wrong.
> I haven't yet worked through all of the implications of this, but
> AFAICT we can't reliably indicate the value of PSTATE.SM, and
> userspace cannot reliably save/restore a task's state in all cases.
Userspace should be able to read by looking the SSVE registers, if you
get SVE format register state back you're in streaming mode. Streaming
mode state will always be saved in SVE format so a read of streaming SVE
vector state will come out with the SVE bit set, if we're not in
streaming mode it won't be set.
For writes writing to the SVE register set will disable streaming mode,
writes to the streaming SVE register set will enable it.
-------------- 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/20250404/dc3eaff3/attachment.sig>
More information about the linux-arm-kernel
mailing list