diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 29ebb4c5402c20dd49ceb92e71928ede7c38a3fa..451159abd81c30806003c3cbe1051a38214dc5d3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9423,9 +9423,12 @@ qemuCPUCompare(virConnectPtr conn, qemuDriverLock(driver); - if (!driver->caps || !driver->caps->host.cpu) { - qemuReportError(VIR_ERR_OPERATION_INVALID, - "%s", _("cannot get host CPU capabilities")); + if (!driver->caps) { + qemuReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("cannot get host capabilities")); + } else if (!driver->caps->host.cpu) { + VIR_WARN("cannot get host CPU capabilities"); + ret = VIR_CPU_COMPARE_INCOMPATIBLE; } else { ret = cpuCompareXML(driver->caps->host.cpu, xmlDesc); }