[RFC PATCH v7 03/28] KVM: arm64: Add CONFIG_KVM_ARM_SPE Kconfig option

Lorenzo Stoakes (ARM) ljs at kernel.org
Thu Oct 15 07:15:18 PDT 2026


On Thu, Sep 03, 2026 at 05:05:58PM +0100, Alexandru Elisei wrote:
> Add a new configuration option that will be used for KVM SPE emulation.
> CONFIG_KVM_ARM_SPE depends on the SPE driver being loaded because:
>
> 1. The SPE driver maintains a cpumask of physical CPUs that support SPE,
>    and that will be used by KVM to emulate SPE on heterogeneous systems.

I guess e.g. big.LITTLE?

>
> 2. KVM will rely on the SPE driver enabling the SPE interrupt at the GIC
>    level.
>
> The option will become user selectable after SPE support in KVM is
> implemented.
>
> Signed-off-by: Alexandru Elisei <alexandru.elisei at arm.com>

With nit addressed the redundant dependency removed (both noted below),
LGTM and:

Reviewed-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>

> ---
>  arch/arm64/kvm/Kconfig | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
> index 449154f9a485..fece4c02b97c 100644
> --- a/arch/arm64/kvm/Kconfig
> +++ b/arch/arm64/kvm/Kconfig
> @@ -103,5 +103,14 @@ config PKVM_STACKTRACE
>  	  If unsure, or not using protected nVHE (pKVM), say N.
>
>  endif # NVHE_EL2_DEBUG
> +
> +config KVM_ARM_SPE

NIT: Nothing else in the file has the _ARM_ prefix, so is that redundant
here?

> +	bool
> +	depends on KVM && ARM_SPE_PMU

I think KVM should be removed here, this is within an 'if KVM' block
already, and nothing else here depends on it either so not a convention.

> +	default n
> +	help
> +	  Adds support for Statistical Profiling Extension (SPE) in virtual
> +	  machines.
> +
>  endif # KVM
>  endif # VIRTUALIZATION
> --
> 2.43.0
>
>

--
Cheers, Lorenzo



More information about the linux-arm-kernel mailing list