xref: /linux/drivers/hv/Kconfig (revision feb06d2690bb826fd33798a99ce5cff8d07b38f9)
145ea83f0SStephen Hemminger# SPDX-License-Identifier: GPL-2.0
245ea83f0SStephen Hemminger
3124a6b4cSBart Van Asschemenu "Microsoft Hyper-V guest support"
4124a6b4cSBart Van Assche
546a97191SGreg Kroah-Hartmanconfig HYPERV
6e3ec97c3SMukesh Rathor	bool "Microsoft Hyper-V core hypervisor support"
7f83705a5SSaurabh Sengar	depends on (X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
8f41ceff1SRoman Kisel		|| (ARM64 && !CPU_BIG_ENDIAN)
92ffd9e33SVitaly Kuznetsov	select PARAVIRT
107aff79e2SMichael Kelley	select X86_HV_CALLBACK_VECTOR if X86
11f83705a5SSaurabh Sengar	select OF_EARLY_FLATTREE if OF
127b89a44bSMichael Kelley	select SYSFB if EFI && !HYPERV_VTL_MODE
134691db07SNam Cao	select IRQ_MSI_LIB if X86
1446a97191SGreg Kroah-Hartman	help
1546a97191SGreg Kroah-Hartman	  Select this option to run Linux as a Hyper-V client operating
1646a97191SGreg Kroah-Hartman	  system.
1746a97191SGreg Kroah-Hartman
18d01b9a9fSSaurabh Sengarconfig HYPERV_VTL_MODE
19d01b9a9fSSaurabh Sengar	bool "Enable Linux to boot in VTL context"
207bfe3b8eSNaman Jain	depends on (X86_64 && HAVE_STATIC_CALL) || ARM64
217bfe3b8eSNaman Jain	depends on HYPERV
222b4b90e0SSaurabh Sengar	depends on SMP
23d01b9a9fSSaurabh Sengar	default n
24d01b9a9fSSaurabh Sengar	help
25d01b9a9fSSaurabh Sengar	  Virtual Secure Mode (VSM) is a set of hypervisor capabilities and
26d01b9a9fSSaurabh Sengar	  enlightenments offered to host and guest partitions which enables
27d01b9a9fSSaurabh Sengar	  the creation and management of new security boundaries within
28d01b9a9fSSaurabh Sengar	  operating system software.
29d01b9a9fSSaurabh Sengar
30d01b9a9fSSaurabh Sengar	  VSM achieves and maintains isolation through Virtual Trust Levels
31d01b9a9fSSaurabh Sengar	  (VTLs). Virtual Trust Levels are hierarchical, with higher levels
32d01b9a9fSSaurabh Sengar	  being more privileged than lower levels. VTL0 is the least privileged
33d01b9a9fSSaurabh Sengar	  level, and currently only other level supported is VTL2.
34d01b9a9fSSaurabh Sengar
35d01b9a9fSSaurabh Sengar	  Select this option to build a Linux kernel to run at a VTL other than
36d01b9a9fSSaurabh Sengar	  the normal VTL0, which currently is only VTL2.  This option
37f41ceff1SRoman Kisel	  initializes the kernel to run in VTL2, and adds the ability to boot
38d01b9a9fSSaurabh Sengar	  secondary CPUs directly into 64-bit context as required for VTLs other
39d01b9a9fSSaurabh Sengar	  than 0.  A kernel built with this option must run at VTL2, and will
40d01b9a9fSSaurabh Sengar	  not run as a normal guest.
41d01b9a9fSSaurabh Sengar
42d01b9a9fSSaurabh Sengar	  If unsure, say N
43d01b9a9fSSaurabh Sengar
44fd1fea68SMichael Kelleyconfig HYPERV_TIMER
457aff79e2SMichael Kelley	def_bool HYPERV && X86
46fd1fea68SMichael Kelley
4746a97191SGreg Kroah-Hartmanconfig HYPERV_UTILS
4846a97191SGreg Kroah-Hartman	tristate "Microsoft Hyper-V Utilities driver"
4994b04355SMukesh Rathor	depends on HYPERV_VMBUS && CONNECTOR && NLS
501dc2f2b8SRandy Dunlap	depends on PTP_1588_CLOCK_OPTIONAL
5146a97191SGreg Kroah-Hartman	help
5246a97191SGreg Kroah-Hartman	  Select this option to enable the Hyper-V Utilities.
5346a97191SGreg Kroah-Hartman
549aa8b50bSK. Y. Srinivasanconfig HYPERV_BALLOON
559aa8b50bSK. Y. Srinivasan	tristate "Microsoft Hyper-V Balloon driver"
5694b04355SMukesh Rathor	depends on HYPERV_VMBUS
576dc2a774SSunil Muthuswamy	select PAGE_REPORTING
589aa8b50bSK. Y. Srinivasan	help
599aa8b50bSK. Y. Srinivasan	  Select this option to enable Hyper-V Balloon driver.
609aa8b50bSK. Y. Srinivasan
6194b04355SMukesh Rathorconfig HYPERV_VMBUS
6294b04355SMukesh Rathor	tristate "Microsoft Hyper-V VMBus driver"
6394b04355SMukesh Rathor	depends on HYPERV
6494b04355SMukesh Rathor	default HYPERV
6594b04355SMukesh Rathor	help
6694b04355SMukesh Rathor	  Select this option to enable Hyper-V Vmbus driver.
6794b04355SMukesh Rathor
68461fbbd0SNuno Das Nevesconfig MSHV_ROOT
69461fbbd0SNuno Das Neves	tristate "Microsoft Hyper-V root partition support"
70461fbbd0SNuno Das Neves	depends on HYPERV && (X86_64 || ARM64)
71461fbbd0SNuno Das Neves	depends on !HYPERV_VTL_MODE
72461fbbd0SNuno Das Neves	# The hypervisor interface operates on 4k pages. Enforcing it here
73461fbbd0SNuno Das Neves	# simplifies many assumptions in the root partition code.
74461fbbd0SNuno Das Neves	# e.g. When withdrawing memory, the hypervisor gives back 4k pages in
75461fbbd0SNuno Das Neves	# no particular order, making it impossible to reassemble larger pages
76461fbbd0SNuno Das Neves	depends on PAGE_SIZE_4KB
77621191d7SNuno Das Neves	select EVENTFD
78c5eebe07SSean Christopherson	select VIRT_XFER_TO_GUEST_WORK
79*b9a66cd5SStanislav Kinsburskii	select HMM_MIRROR
80*b9a66cd5SStanislav Kinsburskii	select MMU_NOTIFIER
81461fbbd0SNuno Das Neves	default n
82461fbbd0SNuno Das Neves	help
83461fbbd0SNuno Das Neves	  Select this option to enable support for booting and running as root
84461fbbd0SNuno Das Neves	  partition on Microsoft Hyper-V.
85461fbbd0SNuno Das Neves
86461fbbd0SNuno Das Neves	  If unsure, say N.
87461fbbd0SNuno Das Neves
887bfe3b8eSNaman Jainconfig MSHV_VTL
897bfe3b8eSNaman Jain	tristate "Microsoft Hyper-V VTL driver"
907bfe3b8eSNaman Jain	depends on X86_64 && HYPERV_VTL_MODE
917bfe3b8eSNaman Jain	depends on HYPERV_VMBUS
927bfe3b8eSNaman Jain	# Mapping VTL0 memory to a userspace process in VTL2 is supported in OpenHCL.
937bfe3b8eSNaman Jain	# VTL2 for OpenHCL makes use of Huge Pages to improve performance on VMs,
947bfe3b8eSNaman Jain	# specially with large memory requirements.
957bfe3b8eSNaman Jain	depends on TRANSPARENT_HUGEPAGE
967bfe3b8eSNaman Jain	# MTRRs are controlled by VTL0, and are not specific to individual VTLs.
977bfe3b8eSNaman Jain	# Therefore, do not attempt to access or modify MTRRs here.
987bfe3b8eSNaman Jain	depends on !MTRR
997bfe3b8eSNaman Jain	select CPUMASK_OFFSTACK
1007bfe3b8eSNaman Jain	select VIRT_XFER_TO_GUEST_WORK
1017bfe3b8eSNaman Jain	default n
1027bfe3b8eSNaman Jain	help
1037bfe3b8eSNaman Jain	  Select this option to enable Hyper-V VTL driver support.
1047bfe3b8eSNaman Jain	  This driver provides interfaces for Virtual Machine Manager (VMM) running in VTL2
1057bfe3b8eSNaman Jain	  userspace to create VTLs and partitions, setup and manage VTL0 memory and
1067bfe3b8eSNaman Jain	  allow userspace to make direct hypercalls. This also allows to map VTL0's address
1077bfe3b8eSNaman Jain	  space to a usermode process in VTL2 and supports getting new VMBus messages and channel
1087bfe3b8eSNaman Jain	  events in VTL2.
1097bfe3b8eSNaman Jain
1107bfe3b8eSNaman Jain	  If unsure, say N.
1117bfe3b8eSNaman Jain
112124a6b4cSBart Van Asscheendmenu
113