[PATCH v3 05/11] KVM: arm64: Eagerly restore host fpsimd/sve state in pKVM
Mark Brown
broonie at kernel.org
Mon Jun 3 07:15:37 PDT 2024
On Mon, Jun 03, 2024 at 02:48:39PM +0100, Marc Zyngier wrote:
> Mark Brown <broonie at kernel.org> wrote:
> > On Mon, Jun 03, 2024 at 09:37:16AM +0100, Fuad Tabba wrote:
> > > Also, one of the concerns in terms of performance is now with
> > > nested-virt support being added, and the overhead of doing the
> > > conditional update when we know that it's unlikely that anyone is
> > > implementing vectors as big as the max.
> > I guess there's the option of doing a restore of a value fixed during
> > initialisation instead?
> And what do we gain from that?
Reducing the number of places that need updating.
> > programming what we think we're using to use to avoid surprises. For
> > example in this series we allocate the buffer used to store the host SVE
> > state based on the probed maximum usable VL for the system but here we
> > use whatever the PE has as the maximum VL. This means that in the
> > (hopefully unlikely) case where the probed value is lower than the PE
> > value we'll overflow the buffer.
> In that case, we need the *real* maximum across all CPUs, not the
> maximum usable.
If we stick with setting all the bits then yes, we'd need that. It'd
also be more robust than trusting that the host won't set a higher
length.
-------------- 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/20240603/3ad38690/attachment.sig>
More information about the linux-arm-kernel
mailing list