mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-04 20:15:19 +00:00
qemu: Do not fail virConnectCompareCPU if host CPU is not known
When host CPU could not be properly detected, virConnectCompareCPU will
just report that any CPU is incompatible with host CPU instead of
failing.
(cherry picked from commit 87c8623161
)
This commit is contained in:
parent
a69e46813f
commit
cba63bbc22
@ -9322,9 +9322,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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user