[PATCH v4 3/4] KVM: arm64: Fix FFR offset calculation for pKVM host state save and restore
Mark Brown
broonie at kernel.org
Fri Jul 5 10:25:30 PDT 2024
On Fri, Jul 05, 2024 at 02:27:01PM +0100, Marc Zyngier wrote:
> On Thu, 04 Jul 2024 18:28:18 +0100,
> Mark Brown <broonie at kernel.org> wrote:
> > When saving and restoring the SVE state for the host we configure the
> > hardware for the maximum VL it supports, but when calculating offsets in
> > memory we use the maximum usable VL for the host. Since these two values
> > may not be the same this may result in data corruption. We can just
> > read the current VL from the hardware with an instruction so do that
> > instead of a saved value, we need to correct the value and this makes
> > the consistency obvious.
> Which value are we correcting?
The vector length used when laying out the storage, especially in the
case where the hardware VL is larger than the largest VL used by Linux.
-------------- 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/20240705/b2dc7af4/attachment.sig>
More information about the linux-arm-kernel
mailing list