On Fri, May 29, 2026 at 16:12:21 +0200, Jiri Denemark via Devel wrote:
From: Jiri Denemark <jdenemar@redhat.com>
The arch-capabilities MSR is not defined on AMD CPUs, but KVM has always been emulating them. Unfortunately, this may cause Windows to crash so QEMU (since 10.1, commit d3a24134e37d57abd3e7445842cda2717f49e96d) decided to mask the MSR by default with some additional compatibility code for older machine types.
This is all mostly transparent except for probing when we run QEMU without a machine type and expand the "host" CPU model. With QEMU 10.1 and newer none of the arch-capabilities features will be shown as enabled, which may cause unexpected issues for users (such as KubeVirt) that get the list of all supported features from the host-model CPU definition in domain capabilities to select possible target nodes for migration. As a result of the change, no AMD host with new QEMU will be shown as available for incoming migration from older hosts.
Since the features are supported on the host (it's possible to explicitly enable them), but they should not be enabled by default in host-model CPU, we only add the to domain capabilities when VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag is set.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 2: - the features from arch-capabilities MSR are added only when the new VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag is set (previously they were enabled for *_EXPAND_CPU_FEATURES) - the functionality is tested so the appropriate tests are affected by this change
Reviewed-by: Peter Krempa <pkrempa@redhat.com>