[PATCH v5 1/2] arm64/sve: Don't disable SVE on syscalls return

Mark Brown broonie at kernel.org
Mon Nov 16 14:45:51 EST 2020


On Mon, Nov 16, 2020 at 05:59:39PM +0000, Dave Martin wrote:

> So far as I can see, TIF_SVE_NEEDS_FLUSH is a special state in which SVE
> is half-enabled and the SVE regs half-loaded, so it's not an orthogonal
> flag, but a distinct state that sits between the others.

> In this state the regs are neither fully saved nor fully loaded, and we
> haven't committed to either enabling or disabling SVE for userspace.
> It's an intermediate state which we can choose our path out of based on
> policy or performance concerns.

When I say orthogonal I mean to TIF_SVE only - to me that's essentially
unrelated while we're in the kernel.  It's true that we'll have to
decide if we want to transition on return to userspace but for the time
we're in the kernel it doesn't need to interact and we don't need to pay
attention to TIF_SVE when we're returning.

TIF_FOREIGN_FPSTATE is more tied up, it's definitely can't be thought of
as orthogonal.  I think of that more like what Catalin was suggesting
where it's a flag about where the data is stored rather than about the
state we want to go into, which I found makes it fairly easy to reason
about.
-------------- 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/20201116/a9eaa942/attachment-0001.sig>


More information about the linux-arm-kernel mailing list