On Wed, Aug 27, 2025 at 12:29:25PM +0100, Daniel P. Berrangé wrote:
> QEMU supports a variety of CPU models. '-cpu host' is intended to
> expose every possible feature that the underlying hypervisor can
> support, while '-cpu $NAME' exposes certain named CPU models.
> 
> Also KVM will force enable certain features that it can either
> unconditionally emulate, or requires to always be present.
> 
> Are you aware if there any noteworthy differences /  restrictions
> in the use of CPU models for MSHV that would not be present for
> KVM, or vica-verca ?  I'm particularly wondering if there is
> anything special libvirt needs to be aware of - most of what
> libvirt does it gets via the QMP query-cpu-XXXX commands.
> 

The current cpuid impl is rather simple/unopionated at this point. We
will probably iterate on it in the future (e.g. include synthetic
responses). In principle it should behave similar to the KVM accel:

-cpu host is reflecting the cpuid of the host CPU (i.e. dom0/root
 partition running on Hyper‑V). We are gathering those values from
 QEMU and register them with the hypervisor.

-cpu $MODEL should works similar. The QEMU-supplied model definitions
 CPUID/MSR values are registered with HyperV. In case of an unsupported
 feature the registration would fail.

What the MSHV driver currently doesn't provide is something similar to
KVM's KVM_GET_SUPPORTED_CPUID ioctl, so we do not currently force-enable
or silently mask cpuid bits beyond what the CPU model requests.

I'm not aware of any implications for libvirt and QMP that we would need
to take into account wrt cpuid.

Reply via email to