Message ID | 20250404174435.3288106-1-mark.rutland@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | arm64: Preparatory FPSIMD/SVE/SME fixes | expand |
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.