Skip to content

Commit 687d8f4

Browse files
committed
Merge branch 'kvm-kconfig'
Cleanups to Kconfig definitions for KVM * replace HAVE_KVM with an architecture-dependent symbol, when CONFIG_KVM may or may not be available depending on CPU capabilities (MIPS) * replace HAVE_KVM with IS_ENABLED(CONFIG_KVM) for host-side code that is not part of the KVM module, so that it is completely compiled out * factor common "select" statements in common code instead of requiring each architecture to specify it
2 parents 6932704 + f48212e commit 687d8f4

File tree

23 files changed

+28
-38
lines changed

23 files changed

+28
-38
lines changed

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ config ARM64
216216
select HAVE_HW_BREAKPOINT if PERF_EVENTS
217217
select HAVE_IOREMAP_PROT
218218
select HAVE_IRQ_TIME_ACCOUNTING
219-
select HAVE_KVM
220219
select HAVE_MOD_ARCH_SPECIFIC
221220
select HAVE_NMI
222221
select HAVE_PERF_EVENTS

arch/arm64/kvm/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ if VIRTUALIZATION
2020

2121
menuconfig KVM
2222
bool "Kernel-based Virtual Machine (KVM) support"
23-
depends on HAVE_KVM
2423
select KVM_COMMON
2524
select KVM_GENERIC_HARDWARE_ENABLING
2625
select KVM_GENERIC_MMU_NOTIFIER
@@ -34,7 +33,6 @@ menuconfig KVM
3433
select HAVE_KVM_MSI
3534
select HAVE_KVM_IRQCHIP
3635
select HAVE_KVM_IRQ_ROUTING
37-
select IRQ_BYPASS_MANAGER
3836
select HAVE_KVM_IRQ_BYPASS
3937
select HAVE_KVM_READONLY_MEM
4038
select HAVE_KVM_VCPU_RUN_PID_CHANGE

arch/loongarch/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ config LOONGARCH
133133
select HAVE_KPROBES
134134
select HAVE_KPROBES_ON_FTRACE
135135
select HAVE_KRETPROBES
136-
select HAVE_KVM
137136
select HAVE_MOD_ARCH_SPECIFIC
138137
select HAVE_NMI
139138
select HAVE_PCI

arch/loongarch/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ if VIRTUALIZATION
2020
config KVM
2121
tristate "Kernel-based Virtual Machine (KVM) support"
2222
depends on AS_HAS_LVZ_EXTENSION
23-
depends on HAVE_KVM
2423
select HAVE_KVM_DIRTY_RING_ACQ_REL
2524
select HAVE_KVM_VCPU_ASYNC_IOCTL
2625
select KVM_COMMON

arch/mips/Kconfig

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ config CPU_LOONGSON64
12501250
select CPU_SUPPORTS_HIGHMEM
12511251
select CPU_SUPPORTS_HUGEPAGES
12521252
select CPU_SUPPORTS_MSA
1253+
select CPU_SUPPORTS_VZ
12531254
select CPU_DIEI_BROKEN if !LOONGSON3_ENHANCEMENT
12541255
select CPU_MIPSR2_IRQ_VI
12551256
select DMA_NONCOHERENT
@@ -1261,7 +1262,6 @@ config CPU_LOONGSON64
12611262
select MIPS_FP_SUPPORT
12621263
select GPIOLIB
12631264
select SWIOTLB
1264-
select HAVE_KVM
12651265
help
12661266
The Loongson GSx64(GS264/GS464/GS464E/GS464V) series of processor
12671267
cores implements the MIPS64R2 instruction set with many extensions,
@@ -1374,7 +1374,6 @@ config CPU_MIPS32_R2
13741374
select CPU_SUPPORTS_32BIT_KERNEL
13751375
select CPU_SUPPORTS_HIGHMEM
13761376
select CPU_SUPPORTS_MSA
1377-
select HAVE_KVM
13781377
help
13791378
Choose this option to build a kernel for release 2 or later of the
13801379
MIPS32 architecture. Most modern embedded systems with a 32-bit
@@ -1389,7 +1388,7 @@ config CPU_MIPS32_R5
13891388
select CPU_SUPPORTS_32BIT_KERNEL
13901389
select CPU_SUPPORTS_HIGHMEM
13911390
select CPU_SUPPORTS_MSA
1392-
select HAVE_KVM
1391+
select CPU_SUPPORTS_VZ
13931392
select MIPS_O32_FP64_SUPPORT
13941393
help
13951394
Choose this option to build a kernel for release 5 or later of the
@@ -1405,7 +1404,7 @@ config CPU_MIPS32_R6
14051404
select CPU_SUPPORTS_32BIT_KERNEL
14061405
select CPU_SUPPORTS_HIGHMEM
14071406
select CPU_SUPPORTS_MSA
1408-
select HAVE_KVM
1407+
select CPU_SUPPORTS_VZ
14091408
select MIPS_O32_FP64_SUPPORT
14101409
help
14111410
Choose this option to build a kernel for release 6 or later of the
@@ -1441,7 +1440,6 @@ config CPU_MIPS64_R2
14411440
select CPU_SUPPORTS_HIGHMEM
14421441
select CPU_SUPPORTS_HUGEPAGES
14431442
select CPU_SUPPORTS_MSA
1444-
select HAVE_KVM
14451443
help
14461444
Choose this option to build a kernel for release 2 or later of the
14471445
MIPS64 architecture. Many modern embedded systems with a 64-bit
@@ -1459,7 +1457,7 @@ config CPU_MIPS64_R5
14591457
select CPU_SUPPORTS_HUGEPAGES
14601458
select CPU_SUPPORTS_MSA
14611459
select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32
1462-
select HAVE_KVM
1460+
select CPU_SUPPORTS_VZ
14631461
help
14641462
Choose this option to build a kernel for release 5 or later of the
14651463
MIPS64 architecture. This is a intermediate MIPS architecture
@@ -1477,7 +1475,7 @@ config CPU_MIPS64_R6
14771475
select CPU_SUPPORTS_HUGEPAGES
14781476
select CPU_SUPPORTS_MSA
14791477
select MIPS_O32_FP64_SUPPORT if 32BIT || MIPS32_O32
1480-
select HAVE_KVM
1478+
select CPU_SUPPORTS_VZ
14811479
help
14821480
Choose this option to build a kernel for release 6 or later of the
14831481
MIPS64 architecture. New MIPS processors, starting with the Warrior
@@ -1492,9 +1490,9 @@ config CPU_P5600
14921490
select CPU_SUPPORTS_HIGHMEM
14931491
select CPU_SUPPORTS_MSA
14941492
select CPU_SUPPORTS_CPUFREQ
1493+
select CPU_SUPPORTS_VZ
14951494
select CPU_MIPSR2_IRQ_VI
14961495
select CPU_MIPSR2_IRQ_EI
1497-
select HAVE_KVM
14981496
select MIPS_O32_FP64_SUPPORT
14991497
help
15001498
Choose this option to build a kernel for MIPS Warrior P5600 CPU.
@@ -1614,7 +1612,7 @@ config CPU_CAVIUM_OCTEON
16141612
select USB_EHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
16151613
select USB_OHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
16161614
select MIPS_L1_CACHE_SHIFT_7
1617-
select HAVE_KVM
1615+
select CPU_SUPPORTS_VZ
16181616
help
16191617
The Cavium Octeon processor is a highly integrated chip containing
16201618
many ethernet hardware widgets for networking tasks. The processor
@@ -1969,6 +1967,8 @@ config CPU_SUPPORTS_ADDRWINCFG
19691967
config CPU_SUPPORTS_HUGEPAGES
19701968
bool
19711969
depends on !(32BIT && (PHYS_ADDR_T_64BIT || EVA))
1970+
config CPU_SUPPORTS_VZ
1971+
bool
19721972
config MIPS_PGD_C0_CONTEXT
19731973
bool
19741974
depends on 64BIT

arch/mips/kvm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if VIRTUALIZATION
1717

1818
config KVM
1919
tristate "Kernel-based Virtual Machine (KVM) support"
20-
depends on HAVE_KVM
20+
depends on CPU_SUPPORTS_VZ
2121
depends on MIPS_FP_SUPPORT
2222
select EXPORT_UASM
2323
select KVM_COMMON

arch/powerpc/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ config KVM
2222
select KVM_COMMON
2323
select HAVE_KVM_VCPU_ASYNC_IOCTL
2424
select KVM_VFIO
25-
select IRQ_BYPASS_MANAGER
2625
select HAVE_KVM_IRQ_BYPASS
2726

2827
config KVM_BOOK3S_HANDLER

arch/s390/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ config S390
193193
select HAVE_KPROBES
194194
select HAVE_KPROBES_ON_FTRACE
195195
select HAVE_KRETPROBES
196-
select HAVE_KVM
197196
select HAVE_LIVEPATCH
198197
select HAVE_MEMBLOCK_PHYS_MAP
199198
select HAVE_MOD_ARCH_SPECIFIC

arch/s390/kvm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ if VIRTUALIZATION
1919
config KVM
2020
def_tristate y
2121
prompt "Kernel-based Virtual Machine (KVM) support"
22-
depends on HAVE_KVM
2322
select HAVE_KVM_CPU_RELAX_INTERCEPT
2423
select HAVE_KVM_VCPU_ASYNC_IOCTL
2524
select KVM_ASYNC_PF

arch/x86/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ config X86
244244
select HAVE_FUNCTION_ERROR_INJECTION
245245
select HAVE_KRETPROBES
246246
select HAVE_RETHOOK
247-
select HAVE_KVM
248247
select HAVE_LIVEPATCH if X86_64
249248
select HAVE_MIXED_BREAKPOINTS_REGS
250249
select HAVE_MOD_ARCH_SPECIFIC

0 commit comments

Comments
 (0)