Re: [PATCH v10 11/30] KVM: arm64: Store vector lengths in an array

From: Jean-Philippe Brucker

Date: Wed Mar 18 2026 - 14:19:04 EST


On Fri, Mar 06, 2026 at 05:01:03PM +0000, Mark Brown wrote:
> SME adds a second vector length configured in a very similar way to the
> SVE vector length, in order to facilitate future code sharing for SME
> refactor our storage of vector lengths to use an array like the host does.
> We do not yet take much advantage of this so the intermediate code is not
> as clean as might be.
>
> No functional change.
>
> Reviewed-by: Fuad Tabba <tabba@xxxxxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
> ---
> arch/arm64/include/asm/kvm_host.h | 17 +++++++++++------
> arch/arm64/include/asm/kvm_hyp.h | 2 +-
> arch/arm64/include/asm/kvm_pkvm.h | 2 +-
> arch/arm64/kvm/fpsimd.c | 2 +-
> arch/arm64/kvm/guest.c | 6 +++---
> arch/arm64/kvm/hyp/include/hyp/switch.h | 6 +++---
> arch/arm64/kvm/hyp/nvhe/hyp-main.c | 6 +++---
> arch/arm64/kvm/hyp/nvhe/pkvm.c | 7 ++++---
> arch/arm64/kvm/reset.c | 22 +++++++++++-----------
> 9 files changed, 38 insertions(+), 32 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
> index 906dbefc5b33..3c30c1a70429 100644
> --- a/arch/arm64/include/asm/kvm_host.h
> +++ b/arch/arm64/include/asm/kvm_host.h
> @@ -77,8 +77,10 @@ enum kvm_mode kvm_get_mode(void);
> static inline enum kvm_mode kvm_get_mode(void) { return KVM_MODE_NONE; };
> #endif
>
> -extern unsigned int __ro_after_init kvm_sve_max_vl;
> -extern unsigned int __ro_after_init kvm_host_sve_max_vl;
> +extern unsigned int __ro_after_init kvm_max_vl[ARM64_VEC_MAX];
> +extern unsigned int __ro_after_init kvm_host_max_vl[ARM64_VEC_MAX];
> +DECLARE_STATIC_KEY_FALSE(userspace_irqchip_in_use);

A rebase issue here, rest looks good

Thanks,
Jean