mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
f128cf8cfb
Convert KVM_ARCH_WANT_MMU_NOTIFIER into a Kconfig and select it where appropriate to effectively maintain existing behavior. Using a proper Kconfig will simplify building more functionality on top of KVM's mmu_notifier infrastructure. Add a forward declaration of kvm_gfn_range to kvm_types.h so that including arch/powerpc/include/asm/kvm_ppc.h's with CONFIG_KVM=n doesn't generate warnings due to kvm_gfn_range being undeclared. PPC defines hooks for PR vs. HV without guarding them via #ifdeffery, e.g. bool (*unmap_gfn_range)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*age_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*test_age_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*set_spte_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); Alternatively, PPC could forward declare kvm_gfn_range, but there's no good reason not to define it in common KVM. Acked-by: Anup Patel <anup@brainfault.org> Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fuad Tabba <tabba@google.com> Tested-by: Fuad Tabba <tabba@google.com> Message-Id: <20231027182217.3615211-8-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
41 lines
975 B
Plaintext
41 lines
975 B
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# KVM configuration
|
|
#
|
|
|
|
source "virt/kvm/Kconfig"
|
|
|
|
menuconfig VIRTUALIZATION
|
|
bool "Virtualization"
|
|
help
|
|
Say Y here to get to see options for using your Linux host to run
|
|
other operating systems inside virtual machines (guests).
|
|
This option alone does not add any kernel code.
|
|
|
|
If you say N, all options in this submenu will be skipped and
|
|
disabled.
|
|
|
|
if VIRTUALIZATION
|
|
|
|
config KVM
|
|
tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)"
|
|
depends on RISCV_SBI && MMU
|
|
select HAVE_KVM_EVENTFD
|
|
select HAVE_KVM_IRQCHIP
|
|
select HAVE_KVM_IRQFD
|
|
select HAVE_KVM_IRQ_ROUTING
|
|
select HAVE_KVM_MSI
|
|
select HAVE_KVM_VCPU_ASYNC_IOCTL
|
|
select KVM_GENERIC_DIRTYLOG_READ_PROTECT
|
|
select KVM_GENERIC_HARDWARE_ENABLING
|
|
select KVM_MMIO
|
|
select KVM_XFER_TO_GUEST_WORK
|
|
select KVM_GENERIC_MMU_NOTIFIER
|
|
select PREEMPT_NOTIFIERS
|
|
help
|
|
Support hosting virtualized guest machines.
|
|
|
|
If unsure, say N.
|
|
|
|
endif # VIRTUALIZATION
|