libvirt/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
Tim Wiederhake fa54595178 cpu_map: Drop 'mpx' from x86 cpu models
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>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2024-05-02 19:56:45 +02:00

15 lines
570 B
XML

<cpu mode='custom' match='exact'>
<model fallback='allow'>Skylake-Server-IBRS</model>
<vendor>Intel</vendor>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='mpx'/>
<feature policy='require' name='clflushopt'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pku'/>
<feature policy='require' name='ssbd'/>
<feature policy='require' name='xsaves'/>
<feature policy='require' name='skip-l1dfl-vmentry'/>
</cpu>