[PATCH v4 0/4] KVM: arm64: Fix underallocation of storage for SVE state

Mark Brown broonie at kernel.org
Wed Sep 4 08:48:57 PDT 2024


On Mon, Jul 08, 2024 at 04:30:30PM +0100, Dave Martin wrote:
> On Fri, Jul 05, 2024 at 06:18:50PM +0100, Mark Brown wrote:
> > On Fri, Jul 05, 2024 at 02:20:05PM +0100, Marc Zyngier wrote:
> > > Mark Brown <broonie at kernel.org> wrote:

> > > > As observed during review the pKVM support for saving host SVE state is
> > > > broken if an asymmetric system has VLs larger than the maximum shared
> > > > VL, fix this by discovering then using the maximum VL for allocations
> > > > and using RDVL during the save/restore process.

> > > I really don't see why we need such complexity here.

> The first patch is orthogonal cleanup, and the rest doesn't really add
> complexity IIUC.

...

> > Basically it's maintainability concerns, especially with the enumeration
> > code.

> I tend to agree here.

Did anyone have any further thoughts on this?  It's been roughly a
release cycle since I originally posted this, and there's been no
changes requested since -rc1 (which was itself just a rebase).

> The host could never use over-max VLs except in non-preemptible kernel
> code, since code doing that would be non-migratable to other physical
> CPUs.  This is done to probe SVE only, and the extra bits in the vector
> registers are never used at all.

> Can't pKVM just hide the non symmetrically supported VLs using ZCR_EL2,
> just as regular KVM does for the guest?

> (I may be making bad assumptions about pKVM's relationship with the host
> kernel.)

That's one for the pKVM people.
-------------- 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/20240904/fc381fbe/attachment.sig>


More information about the linux-arm-kernel mailing list