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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 22, 2021 at 06:10:25PM +0000, Marc Zyngier wrote:
> Mark Brown <broonie@xxxxxxxxxx> 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.

You could also implement a similar optimisation by forcing on TIF_SVE
whenever we return to userspace but that would create a cost for
userspace tasks that don't use SVE on SVE capable hardware so doesn't
seem as good.  In any case it's not an issue for now since anything here
will need benchmarking on a reasonable range of hardware.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux