[PATCH v1] KVM: arm64: Allocate for maximum vector length for pKVM host sve state
Mark Brown
broonie at kernel.org
Thu Jun 6 04:45:22 PDT 2024
On Thu, Jun 06, 2024 at 10:25:05AM +0100, Fuad Tabba wrote:
> On Wed, Jun 5, 2024 at 5:52 PM Mark Brown <broonie at kernel.org> wrote:
> > On Wed, Jun 05, 2024 at 05:14:23PM +0100, Fuad Tabba wrote:
> > That was the start of the thought path that lead me to implement based
> > on splitting it out of vec_probe_vqs() like the rest of the code does,
> > the logic doesn't really fit in here for multiple reasons.
> The alternative entails duplicating code in vec_init_vq_map() and
> vec_update_vq_map().
> To me at least, it's straightforward to understand how max_vl is
> computed if we set it as soon as we find it. This as opposed to first
> having the vq bits set in a map, then in two different functions find
> the first set bit in the map, which really corresponds to the vq, to
> then convert it back to a vl.
We need handling in multiple places in part because we do actually want
to treat late CPUs differently to CPUs that come up during normal boot,
even if we can get away with it for now with pKVM due to it rejecting
late CPUs entirely. The bouncing between VQ and VL is I agree a little
annoying, if you're looking at this code you're familiar with it though.
TBH not having it is a bit of a "did we miss something?" flag.
-------------- 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/cc345373/attachment.sig>
More information about the linux-arm-kernel
mailing list