Skip to content

Commit f261336

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Change CONFIG_KVM to a menuconfig entry
Changing CONFIG_KVM to be a 'menuconfig' entry in Kconfig mean that we can straightforwardly enumerate optional features, such as the virtual PMU device as dependent options. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Fuad Tabba <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bf7bc1d commit f261336

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

arch/arm64/kvm/Kconfig

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# KVM configuration
44
#
55

6-
source "virt/kvm/Kconfig"
76
source "virt/lib/Kconfig"
87

98
menuconfig VIRTUALIZATION
@@ -18,7 +17,7 @@ menuconfig VIRTUALIZATION
1817

1918
if VIRTUALIZATION
2019

21-
config KVM
20+
menuconfig KVM
2221
bool "Kernel-based Virtual Machine (KVM) support"
2322
depends on OF
2423
# for TASKSTATS/TASK_DELAY_ACCT:
@@ -33,7 +32,6 @@ config KVM
3332
select KVM_VFIO
3433
select HAVE_KVM_EVENTFD
3534
select HAVE_KVM_IRQFD
36-
select KVM_ARM_PMU if HW_PERF_EVENTS
3735
select HAVE_KVM_MSI
3836
select HAVE_KVM_IRQCHIP
3937
select HAVE_KVM_IRQ_ROUTING
@@ -47,13 +45,21 @@ config KVM
4745

4846
If unsure, say N.
4947

48+
if KVM
49+
50+
source "virt/kvm/Kconfig"
51+
5052
config KVM_ARM_PMU
51-
bool
53+
bool "Virtual Performance Monitoring Unit (PMU) support"
54+
depends on HW_PERF_EVENTS
55+
default y
5256
---help---
5357
Adds support for a virtual Performance Monitoring Unit (PMU) in
5458
virtual machines.
5559

5660
config KVM_INDIRECT_VECTORS
57-
def_bool KVM && (HARDEN_BRANCH_PREDICTOR || HARDEN_EL2_VECTORS)
61+
def_bool HARDEN_BRANCH_PREDICTOR || HARDEN_EL2_VECTORS
62+
63+
endif # KVM
5864

5965
endif # VIRTUALIZATION

0 commit comments

Comments
 (0)