# SPDX-License-Identifier: GPL-2.0

menu "Microsoft Hyper-V guest support"

config HYPERV
	tristate "Microsoft Hyper-V client drivers"
	depends on ACPI && ((X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
		|| (ARM64 && !CPU_BIG_ENDIAN))
	select PARAVIRT
	select X86_HV_CALLBACK_VECTOR if X86
	help
	  Select this option to run Linux as a Hyper-V client operating
	  system.

config HYPERV_TIMER
	def_bool HYPERV && X86

config HYPERV_UTILS
	tristate "Microsoft Hyper-V Utilities driver"
	depends on HYPERV && CONNECTOR && NLS
	depends on PTP_1588_CLOCK_OPTIONAL
	help
	  Select this option to enable the Hyper-V Utilities.

config HYPERV_BALLOON
	tristate "Microsoft Hyper-V Balloon driver"
	depends on HYPERV
	select PAGE_REPORTING
	help
	  Select this option to enable Hyper-V Balloon driver.

config HYPERV_NONTLFS_HEADERS
	bool "Use hv*dk version of headers instead of hyperv-tlfs.h"
	default n
	depends on HYPERV
	help
	  This options specifies whether the kernel will be built
	  with hyper-tlfs.h or not. If unsure, say N.

config MSHV
	tristate "Microsoft Hypervisor root partition interfaces: /dev/mshv"
	depends on HYPERV
	select EVENTFD
	select MSHV_VFIO
	select MSHV_XFER_TO_GUEST_WORK
	help
	  Select this option to enable core functionality for managing guest
	  virtual machines running under the Microsoft Hypervisor.

	  The interfaces are provided via a device named /dev/mshv.

	  To compile this as a module, choose M here.

	  If unsure, say N.

config MSHV_ROOT
	tristate "Microsoft Hyper-V root partition APIs driver"
	depends on MSHV
	select HYPERV_NONTLFS_HEADERS
	help
	  Select this option to provide /dev/mshv interfaces specific to
	  running as the root partition on Microsoft Hypervisor.

	  To compile this as a module, choose M here.

	  If unsure, say N.

config MSHV_VTL
	tristate "Microsoft Hyper-V VTL driver"
	depends on MSHV && X86
	help
	  Select this option to enable Hyper-V VTL driver.
	  Virtual Secure Mode (VSM) is a set of hypervisor capabilities and
	  enlightenments offered to host and guest partitions which enables
	  the creation and management of new security boundaries within
	  operating system software.

	  VSM achieves and maintains isolation through Virtual Trust Levels
	  (VTLs). Virtual Trust Levels are hierarchical, with higher levels
	  being more privileged than lower levels. VTL0 is the least privileged
	  level, and currently only other level supported is VTL2.

	  To compile this as a module, choose M here.

	  If unsure, say N.

config MSHV_DIAG
	tristate "Interface to get diagnostic logs from Microsoft Hypervisor: /dev/mshv_diag"
	depends on HYPERV
	help
	  Grants access to Diagnostic(error) logs from Microsoft Hypervisor via char
	  device interface.

	  To compile this as a module, choose M here.

	  If unsure, say N.

config MSHV_VFIO
	bool

config MSHV_XFER_TO_GUEST_WORK
	bool

source "drivers/hv/dxgkrnl/Kconfig"
source "drivers/hv/diag/Kconfig"

endmenu
