[PATCH v2] KVM: arm64: Allocate for maximum vector length for pKVM host sve state
Mark Brown
broonie at kernel.org
Thu Jun 6 05:55:05 PDT 2024
On Thu, Jun 06, 2024 at 10:26:23AM +0100, Fuad Tabba wrote:
> @@ -1031,7 +1032,12 @@ static void vec_probe_vqs(struct vl_info *info,
>
> vq = sve_vq_from_vl(vl); /* skip intervening lengths */
> set_bit(__vq_to_bit(vq), map);
> +
> + if (!max_vl)
> + max_vl = vl;
> }
> +
> + info->max_cpu_vl = max((int) max_vl, info->max_cpu_vl);
> }
>
> /*
As discussed I'm much more comfortable doing this in line with the rest
of the discovery and not having vec_probe_vqs() modify global state. We
also really ought to have some validation that late CPUs aren't doing
anything funky too, even if we don't actually need it now.
-------------- 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/20240606/bbc22e10/attachment.sig>
More information about the linux-arm-kernel
mailing list