Re: [PATCH v2 2/5] KVM: arm64: Get rid of host SVE tracking/saving

Marc Zyngier
2021-11-23T10:11:37Z

On Mon, 22 Nov 2021 18:30:16 +0000,
Mark Brown <broonie@kernel.org> wrote:
>
> On Mon, Nov 22, 2021 at 06:10:25PM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
>
> > > While we're on the subject of potential future work we might in future
> > > want to not disable SVE on every syscall if (as seems likely) it turns
> > > out that that's more performant for small vector lengths
>
> > How are you going to retrofit that into userspace? This would be an
> > ABI change, and I'm not sure how you'd want to deal with that
> > transition...
>
> We don't need to change the ABI, the ABI just says we zero the registers
> that aren't shared with FPSIMD. Instead of doing that on taking a SVE
> access trap to reenable SVE after having disabled TIF_SVE we could do
> that during the syscall, userspace can't tell the difference other than
> via the different formats we use to report the SVE register set via
> ptrace if it single steps over a syscall. Even then I'm struggling to
> think of a scenario where userspace would be relying on that.

That's not the point I'm trying to make.

Userspace expects to have lost SVE information over a syscall (even if
the VL is 128, it expects to have lost P0..P15 and FFR). How do you
plan to tell userspace that this behaviour has changed?

M.

--
Without deviation from the norm, progress is not possible.