[RFC PATCH v6 03/35] KVM: arm64: Add CONFIG_KVM_ARM_SPE Kconfig option

Alexandru Elisei
2025-11-14T16:07:42Z

Add a new configuration option that will be used for KVM SPE emulation.
CONFIG_KVM_ARM_SPE depends on the SPE driver being builtin 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.

2. KVM will rely on the SPE driver enabling the SPE interrupt at the GIC
level.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
arch/arm64/kvm/Kconfig | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 4f803fd1c99a..31388b5b2655 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -83,4 +83,12 @@ config PTDUMP_STAGE2_DEBUGFS

If in doubt, say N.

+config KVM_ARM_SPE
+ bool
+ depends on KVM && ARM_SPE_PMU=y
+ default n
+ help
+ Adds support for Statistical Profiling Extension (SPE) in virtual
+ machines.
+
endif # VIRTUALIZATION
--
2.51.2