qemu: Fix CPU model fallback in domain capabilities

Our documentation of the domain capabilities XML says that the fallback
attribute of a CPU model is used to indicate whether the CPU model was
detected by libvirt itself (fallback="allow") or by asking the
hypervisor (fallback="forbid"). We need to properly set
fallback="forbid" when CPU model comes from QEMU to match the
documentation.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2017-01-10 21:07:23 +01:00
parent bd440735e3
commit 390a1e2bfd
2 changed files with 4 additions and 1 deletions

View File

@ -3105,6 +3105,9 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
if (ARCH_IS_S390(qemuCaps->arch))
ret = virQEMUCapsInitCPUModelS390(qemuCaps, cpu);
if (ret == 0)
cpu->fallback = VIR_CPU_FALLBACK_FORBID;
return ret;
}

View File

@ -21,7 +21,7 @@
<cpu>
<mode name='host-passthrough' supported='yes'/>
<mode name='host-model' supported='yes'>
<model fallback='allow'>zEC12.2-base</model>
<model fallback='forbid'>zEC12.2-base</model>
<feature policy='require' name='aefsi'/>
<feature policy='require' name='msa5'/>
<feature policy='require' name='msa4'/>