Re: [PATCH v5] mshv: Extend create partition ioctl to support cpu features

From: Wei Liu

Date: Thu Nov 13 2025 - 14:47:55 EST


On Thu, Nov 13, 2025 at 11:45:33AM -0800, Nuno Das Neves wrote:
> From: Muminul Islam <muislam@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> Signed-off-by: Jinank Jain <jinankjain@xxxxxxxxxxxxx>
> Signed-off-by: Muminul Islam <muislam@xxxxxxxxxxxxx>
> Signed-off-by: Nuno Das Neves <nunodasneves@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Michael Kelley <mhklinux@xxxxxxxxxxx>

Queued to hyperv-next. Thanks!

Wei