Commit a284dbc9 authored by Muminul Islam's avatar Muminul Islam Committed by Wei Liu
Browse files

mshv: Add nested virtualization creation flag



Introduce HV_PARTITION_CREATION_FLAG_NESTED_VIRTUALIZATION_CAPABLE to
indicate support for nested virtualization during partition creation.

This enables clearer configuration and capability checks for nested
virtualization scenarios.

Signed-off-by: default avatarStanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: default avatarMuminul Islam <muislam@microsoft.com>
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 30d25a8f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1947,6 +1947,8 @@ static long mshv_ioctl_process_pt_flags(void __user *user_arg, u64 *pt_flags,
		*pt_flags |= HV_PARTITION_CREATION_FLAG_X2APIC_CAPABLE;
	if (args.pt_flags & BIT_ULL(MSHV_PT_BIT_GPA_SUPER_PAGES))
		*pt_flags |= HV_PARTITION_CREATION_FLAG_GPA_SUPER_PAGES_ENABLED;
	if (args.pt_flags & BIT(MSHV_PT_BIT_NESTED_VIRTUALIZATION))
		*pt_flags |= HV_PARTITION_CREATION_FLAG_NESTED_VIRTUALIZATION_CAPABLE;

	isol_props->as_uint64 = 0;

+1 −0
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ union hv_partition_isolation_properties {
#define HV_PARTITION_ISOLATION_HOST_TYPE_RESERVED   0x2

/* Note: Exo partition is enabled by default */
#define HV_PARTITION_CREATION_FLAG_NESTED_VIRTUALIZATION_CAPABLE	BIT(1)
#define HV_PARTITION_CREATION_FLAG_GPA_SUPER_PAGES_ENABLED		BIT(4)
#define HV_PARTITION_CREATION_FLAG_EXO_PARTITION			BIT(8)
#define HV_PARTITION_CREATION_FLAG_LAPIC_ENABLED			BIT(13)
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ enum {
	MSHV_PT_BIT_X2APIC,
	MSHV_PT_BIT_GPA_SUPER_PAGES,
	MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
	MSHV_PT_BIT_NESTED_VIRTUALIZATION,
	MSHV_PT_BIT_COUNT,
};