162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# KVM configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ci
662306a36Sopenharmony_cisource "virt/lib/Kconfig"
762306a36Sopenharmony_cisource "virt/kvm/Kconfig"
862306a36Sopenharmony_ci
962306a36Sopenharmony_cimenuconfig VIRTUALIZATION
1062306a36Sopenharmony_ci	bool "Virtualization"
1162306a36Sopenharmony_ci	help
1262306a36Sopenharmony_ci	  Say Y here to get to see options for using your Linux host to run
1362306a36Sopenharmony_ci	  other operating systems inside virtual machines (guests).
1462306a36Sopenharmony_ci	  This option alone does not add any kernel code.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	  If you say N, all options in this submenu will be skipped and
1762306a36Sopenharmony_ci	  disabled.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciif VIRTUALIZATION
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cimenuconfig KVM
2262306a36Sopenharmony_ci	bool "Kernel-based Virtual Machine (KVM) support"
2362306a36Sopenharmony_ci	depends on HAVE_KVM
2462306a36Sopenharmony_ci	select KVM_GENERIC_HARDWARE_ENABLING
2562306a36Sopenharmony_ci	select MMU_NOTIFIER
2662306a36Sopenharmony_ci	select PREEMPT_NOTIFIERS
2762306a36Sopenharmony_ci	select HAVE_KVM_CPU_RELAX_INTERCEPT
2862306a36Sopenharmony_ci	select KVM_MMIO
2962306a36Sopenharmony_ci	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
3062306a36Sopenharmony_ci	select KVM_XFER_TO_GUEST_WORK
3162306a36Sopenharmony_ci	select KVM_VFIO
3262306a36Sopenharmony_ci	select HAVE_KVM_EVENTFD
3362306a36Sopenharmony_ci	select HAVE_KVM_IRQFD
3462306a36Sopenharmony_ci	select HAVE_KVM_DIRTY_RING_ACQ_REL
3562306a36Sopenharmony_ci	select NEED_KVM_DIRTY_RING_WITH_BITMAP
3662306a36Sopenharmony_ci	select HAVE_KVM_MSI
3762306a36Sopenharmony_ci	select HAVE_KVM_IRQCHIP
3862306a36Sopenharmony_ci	select HAVE_KVM_IRQ_ROUTING
3962306a36Sopenharmony_ci	select IRQ_BYPASS_MANAGER
4062306a36Sopenharmony_ci	select HAVE_KVM_IRQ_BYPASS
4162306a36Sopenharmony_ci	select HAVE_KVM_VCPU_RUN_PID_CHANGE
4262306a36Sopenharmony_ci	select SCHED_INFO
4362306a36Sopenharmony_ci	select GUEST_PERF_EVENTS if PERF_EVENTS
4462306a36Sopenharmony_ci	select INTERVAL_TREE
4562306a36Sopenharmony_ci	select XARRAY_MULTI
4662306a36Sopenharmony_ci	help
4762306a36Sopenharmony_ci	  Support hosting virtualized guest machines.
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci	  If unsure, say N.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciconfig NVHE_EL2_DEBUG
5262306a36Sopenharmony_ci	bool "Debug mode for non-VHE EL2 object"
5362306a36Sopenharmony_ci	depends on KVM
5462306a36Sopenharmony_ci	help
5562306a36Sopenharmony_ci	  Say Y here to enable the debug mode for the non-VHE KVM EL2 object.
5662306a36Sopenharmony_ci	  Failure reports will BUG() in the hypervisor. This is intended for
5762306a36Sopenharmony_ci	  local EL2 hypervisor development.
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci	  If unsure, say N.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciconfig PROTECTED_NVHE_STACKTRACE
6262306a36Sopenharmony_ci	bool "Protected KVM hypervisor stacktraces"
6362306a36Sopenharmony_ci	depends on NVHE_EL2_DEBUG
6462306a36Sopenharmony_ci	default n
6562306a36Sopenharmony_ci	help
6662306a36Sopenharmony_ci	  Say Y here to enable pKVM hypervisor stacktraces on hyp_panic()
6762306a36Sopenharmony_ci
6862306a36Sopenharmony_ci	  If using protected nVHE mode, but cannot afford the associated
6962306a36Sopenharmony_ci	  memory cost (less than 0.75 page per CPU) of pKVM stacktraces,
7062306a36Sopenharmony_ci	  say N.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci	  If unsure, or not using protected nVHE (pKVM), say N.
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ciendif # VIRTUALIZATION
75