]> git.ipfire.org Git - thirdparty/linux.git/commit
mshv: Extend create partition ioctl to support cpu features
authorMuminul Islam <muislam@microsoft.com>
Thu, 13 Nov 2025 19:45:33 +0000 (11:45 -0800)
committerWei Liu <wei.liu@kernel.org>
Sat, 15 Nov 2025 06:18:17 +0000 (06:18 +0000)
commitc91fe5f162f278d4aa960d06d2dbc42f9857593a
treeec67f4a9ab1a984e160d2ff528ee7dbb3d43ede5
parentf91bc8f61abf0e1d23108ae9871c60d7612a09b2
mshv: Extend create partition ioctl to support cpu features

The existing mshv create partition ioctl does not provide a way to
specify which cpu features are enabled in the guest. Instead, it
attempts to enable all features and those that are not supported are
silently disabled by the hypervisor.

This was done to reduce unnecessary complexity and is sufficient for
many cases. However, new scenarios require fine-grained control over
these features.

Define a new mshv_create_partition_v2 structure which supports
passing the disabled processor and xsave feature bits through to the
create partition hypercall directly.

Introduce a new flag MSHV_PT_BIT_CPU_AND_XSAVE_FEATURES which enables
the new structure. If unset, the original mshv_create_partition struct
is used, with the old behavior of enabling all features.

Co-developed-by: Jinank Jain <jinankjain@microsoft.com>
Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
Signed-off-by: Muminul Islam <muislam@microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_root_main.c
include/uapi/linux/mshv.h