18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# KVM configuration
48c2ecf20Sopenharmony_ci#
58c2ecf20Sopenharmony_cisource "virt/kvm/Kconfig"
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cimenuconfig VIRTUALIZATION
88c2ecf20Sopenharmony_ci	bool "Virtualization"
98c2ecf20Sopenharmony_ci	help
108c2ecf20Sopenharmony_ci	  Say Y here to get to see options for using your Linux host to run
118c2ecf20Sopenharmony_ci	  other operating systems inside virtual machines (guests).
128c2ecf20Sopenharmony_ci	  This option alone does not add any kernel code.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci	  If you say N, all options in this submenu will be skipped and disabled.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciif VIRTUALIZATION
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciconfig KVM
198c2ecf20Sopenharmony_ci	tristate "Kernel-based Virtual Machine (KVM) support"
208c2ecf20Sopenharmony_ci	depends on HAVE_KVM
218c2ecf20Sopenharmony_ci	depends on MIPS_FP_SUPPORT
228c2ecf20Sopenharmony_ci	select EXPORT_UASM
238c2ecf20Sopenharmony_ci	select PREEMPT_NOTIFIERS
248c2ecf20Sopenharmony_ci	select KVM_GENERIC_DIRTYLOG_READ_PROTECT
258c2ecf20Sopenharmony_ci	select HAVE_KVM_EVENTFD
268c2ecf20Sopenharmony_ci	select HAVE_KVM_VCPU_ASYNC_IOCTL
278c2ecf20Sopenharmony_ci	select KVM_MMIO
288c2ecf20Sopenharmony_ci	select MMU_NOTIFIER
298c2ecf20Sopenharmony_ci	select SRCU
308c2ecf20Sopenharmony_ci	help
318c2ecf20Sopenharmony_ci	  Support for hosting Guest kernels.
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_cichoice
348c2ecf20Sopenharmony_ci	prompt "Virtualization mode"
358c2ecf20Sopenharmony_ci	depends on KVM
368c2ecf20Sopenharmony_ci	default KVM_MIPS_TE
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ciconfig KVM_MIPS_TE
398c2ecf20Sopenharmony_ci	bool "Trap & Emulate"
408c2ecf20Sopenharmony_ci	depends on CPU_MIPS32_R2
418c2ecf20Sopenharmony_ci	help
428c2ecf20Sopenharmony_ci	  Use trap and emulate to virtualize 32-bit guests in user mode. This
438c2ecf20Sopenharmony_ci	  does not require any special hardware Virtualization support beyond
448c2ecf20Sopenharmony_ci	  standard MIPS32 r2 or later, but it does require the guest kernel
458c2ecf20Sopenharmony_ci	  to be configured with CONFIG_KVM_GUEST=y so that it resides in the
468c2ecf20Sopenharmony_ci	  user address segment.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciconfig KVM_MIPS_VZ
498c2ecf20Sopenharmony_ci	bool "MIPS Virtualization (VZ) ASE"
508c2ecf20Sopenharmony_ci	help
518c2ecf20Sopenharmony_ci	  Use the MIPS Virtualization (VZ) ASE to virtualize guests. This
528c2ecf20Sopenharmony_ci	  supports running unmodified guest kernels (with CONFIG_KVM_GUEST=n),
538c2ecf20Sopenharmony_ci	  but requires hardware support.
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ciendchoice
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ciconfig KVM_MIPS_DYN_TRANS
588c2ecf20Sopenharmony_ci	bool "KVM/MIPS: Dynamic binary translation to reduce traps"
598c2ecf20Sopenharmony_ci	depends on KVM_MIPS_TE
608c2ecf20Sopenharmony_ci	default y
618c2ecf20Sopenharmony_ci	help
628c2ecf20Sopenharmony_ci	  When running in Trap & Emulate mode patch privileged
638c2ecf20Sopenharmony_ci	  instructions to reduce the number of traps.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci	  If unsure, say Y.
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciconfig KVM_MIPS_DEBUG_COP0_COUNTERS
688c2ecf20Sopenharmony_ci	bool "Maintain counters for COP0 accesses"
698c2ecf20Sopenharmony_ci	depends on KVM
708c2ecf20Sopenharmony_ci	help
718c2ecf20Sopenharmony_ci	  Maintain statistics for Guest COP0 accesses.
728c2ecf20Sopenharmony_ci	  A histogram of COP0 accesses is printed when the VM is
738c2ecf20Sopenharmony_ci	  shutdown.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci	  If unsure, say N.
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciendif # VIRTUALIZATION
78