mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
mshv: Add SMT_ENABLED_GUEST partition creation flag
Add support for HV_PARTITION_CREATION_FLAG_SMT_ENABLED_GUEST to allow userspace VMMs to enable SMT for guest partitions. Expose this via new MSHV_PT_BIT_SMT_ENABLED_GUEST flag in the UAPI. Without this flag, the hypervisor schedules guest VPs incorrectly, causing SMT unusable. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
This commit is contained in:
parent
a284dbc96a
commit
8927a108a7
3 changed files with 4 additions and 0 deletions
|
|
@ -1949,6 +1949,8 @@ static long mshv_ioctl_process_pt_flags(void __user *user_arg, u64 *pt_flags,
|
|||
*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;
|
||||
if (args.pt_flags & BIT(MSHV_PT_BIT_SMT_ENABLED_GUEST))
|
||||
*pt_flags |= HV_PARTITION_CREATION_FLAG_SMT_ENABLED_GUEST;
|
||||
|
||||
isol_props->as_uint64 = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -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_SMT_ENABLED_GUEST BIT(0)
|
||||
#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)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ enum {
|
|||
MSHV_PT_BIT_GPA_SUPER_PAGES,
|
||||
MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES,
|
||||
MSHV_PT_BIT_NESTED_VIRTUALIZATION,
|
||||
MSHV_PT_BIT_SMT_ENABLED_GUEST,
|
||||
MSHV_PT_BIT_COUNT,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue