
On 2/9/24 11:52, Tim Wiederhake wrote:
The mpx feature was removed from the corresponding qemu cpu models. With mpx in the libvirt cpu models, libvirt believes the feature to be implicitly enabled when creating qemu VMs, while in fact it is disabled.
This became an issue when commit 94eacd5a5f introduced new vmx-* features, of which some are dependent on mpx (see "feature_dependencies" table in qemu target/i386/cpu.c), e.g. vmx-exit-clear-bndcfgs and vmx-entry-load-bndcfgs. These features cannot be enabled by qemu without also mpx being enabled, leading to the error message
error: Failed to create domain from testdomain.xml error: operation failed: guest CPU doesn't match specification: missing features: mpx,vmx-exit-clear-bndcfgs, vmx-entry-load-bndcfgs
when trying to create a VM with a "host-model" cpu on a host that does support mpx and the mentioned vmx-* features:
<domain> ... <cpu mode='host-model' check='full' /> ... </domain>
Resolve the issue by removing mpx from libvirt's cpu models as well.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> --- src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 2 +- src/cpu_map/x86_Cascadelake-Server.xml | 2 +- src/cpu_map/x86_Icelake-Server-noTSX.xml | 2 +- src/cpu_map/x86_Icelake-Server.xml | 2 +- src/cpu_map/x86_Skylake-Client-IBRS.xml | 2 +- src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 2 +- src/cpu_map/x86_Skylake-Client.xml | 2 +- src/cpu_map/x86_Skylake-Server-IBRS.xml | 2 +- src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 2 +- src/cpu_map/x86_Skylake-Server.xml | 2 +- tests/cputestdata/x86_64-cpuid-Core-i5-6600-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-6600-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i5-6600-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7600U-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7600U-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7600U-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7700-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7700-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-7700-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8700-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8700-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8700-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1225-v5-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-E3-1245-v5-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-5115-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6130-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6130-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6130-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Gold-6148-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-8268-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml | 1 + tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml | 1 + .../x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml | 1 + tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml | 1 + .../x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml | 1 + tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml | 1 + .../cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml | 1 + tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 + .../cpu-Icelake-Server-pconfig.x86_64-latest.args | 2 +- .../cpu-host-model-fallback-kvm.x86_64-4.2.0.args | 2 +- .../cpu-host-model-fallback-kvm.x86_64-5.0.0.args | 2 +- tests/qemuxmlconfdata/cpu-host-model-kvm.x86_64-4.2.0.args | 2 +- tests/qemuxmlconfdata/cpu-host-model-kvm.x86_64-5.0.0.args | 2 +- .../cpu-host-model-nofallback-kvm.x86_64-4.2.0.args | 2 +- .../cpu-host-model-nofallback-kvm.x86_64-5.0.0.args | 2 +- 66 files changed, 66 insertions(+), 17 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal