mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-05 10:47:34 +00:00
Provide a set of IOCTLs for creating and managing child partitions when running as root partition on Hyper-V. The new driver is enabled via CONFIG_MSHV_ROOT. A brief overview of the interface: MSHV_CREATE_PARTITION is the entry point, returning a file descriptor representing a child partition. IOCTLs on this fd can be used to map memory, create VPs, etc. Creating a VP returns another file descriptor representing that VP which in turn has another set of corresponding IOCTLs for running the VP, getting/setting state, etc. MSHV_ROOT_HVCALL is a generic "passthrough" hypercall IOCTL which can be used for a number of partition or VP hypercalls. This is for hypercalls that do not affect any state in the kernel driver, such as getting and setting VP registers and partition properties, translating addresses, etc. It is "passthrough" because the binary input and output for the hypercall is only interpreted by the VMM - the kernel driver does nothing but insert the VP and partition id where necessary (which are always in the same place), and execute the hypercall. Co-developed-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com> Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com> Co-developed-by: Jinank Jain <jinankjain@microsoft.com> Signed-off-by: Jinank Jain <jinankjain@microsoft.com> Co-developed-by: Mukesh Rathor <mrathor@linux.microsoft.com> Signed-off-by: Mukesh Rathor <mrathor@linux.microsoft.com> Co-developed-by: Muminul Islam <muislam@microsoft.com> Signed-off-by: Muminul Islam <muislam@microsoft.com> Co-developed-by: Praveen K Paladugu <prapal@linux.microsoft.com> Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> Co-developed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Co-developed-by: Wei Liu <wei.liu@kernel.org> Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com> Reviewed-by: Roman Kisel <romank@linux.microsoft.com> Link: https://lore.kernel.org/r/1741980536-3865-11-git-send-email-nunodasneves@linux.microsoft.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <1741980536-3865-11-git-send-email-nunodasneves@linux.microsoft.com>
76 lines
2.4 KiB
Plaintext
76 lines
2.4 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menu "Microsoft Hyper-V guest support"
|
|
|
|
config HYPERV
|
|
tristate "Microsoft Hyper-V client drivers"
|
|
depends on (X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \
|
|
|| (ACPI && ARM64 && !CPU_BIG_ENDIAN)
|
|
select PARAVIRT
|
|
select X86_HV_CALLBACK_VECTOR if X86
|
|
select OF_EARLY_FLATTREE if OF
|
|
help
|
|
Select this option to run Linux as a Hyper-V client operating
|
|
system.
|
|
|
|
config HYPERV_VTL_MODE
|
|
bool "Enable Linux to boot in VTL context"
|
|
depends on X86_64 && HYPERV
|
|
depends on SMP
|
|
default n
|
|
help
|
|
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.
|
|
|
|
Select this option to build a Linux kernel to run at a VTL other than
|
|
the normal VTL0, which currently is only VTL2. This option
|
|
initializes the x86 platform for VTL2, and adds the ability to boot
|
|
secondary CPUs directly into 64-bit context as required for VTLs other
|
|
than 0. A kernel built with this option must run at VTL2, and will
|
|
not run as a normal guest.
|
|
|
|
If unsure, say N
|
|
|
|
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 MSHV_ROOT
|
|
tristate "Microsoft Hyper-V root partition support"
|
|
depends on HYPERV && (X86_64 || ARM64)
|
|
depends on !HYPERV_VTL_MODE
|
|
# The hypervisor interface operates on 4k pages. Enforcing it here
|
|
# simplifies many assumptions in the root partition code.
|
|
# e.g. When withdrawing memory, the hypervisor gives back 4k pages in
|
|
# no particular order, making it impossible to reassemble larger pages
|
|
depends on PAGE_SIZE_4KB
|
|
select EVENTFD
|
|
default n
|
|
help
|
|
Select this option to enable support for booting and running as root
|
|
partition on Microsoft Hyper-V.
|
|
|
|
If unsure, say N.
|
|
|
|
endmenu
|