1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-10 05:17:59 +03:00

qemu: Assume QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT

All QEMU versions we support have this feature.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Andrea Bolognani 2022-04-15 15:09:48 +02:00
parent 4b3b14138b
commit 9f1925d718

View File

@ -6542,11 +6542,6 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver,
*/
if (ARCH_IS_PPC64(def->os.arch)) {
virBufferAddLit(buf, "host");
if (cpu->model &&
!(qemuDomainIsPSeries(def) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT))) {
virBufferAsprintf(buf, ",compat=%s", cpu->model);
}
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unexpected host-model CPU for %s architecture"),
@ -7118,8 +7113,7 @@ qemuBuildMachineCommandLine(virCommand *cmd,
if (cpu && cpu->model &&
cpu->mode == VIR_CPU_MODE_HOST_MODEL &&
qemuDomainIsPSeries(def) &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT)) {
qemuDomainIsPSeries(def)) {
virBufferAsprintf(&buf, ",max-cpu-compat=%s", cpu->model);
}