mirror of https://gitee.com/openkylin/libvirt.git
qemu: do not compare missing cpu data
For x86, we invalidate qemu caps cache if the host CPUID changed.
However other cpu drivers do not have the 'getHostData' function
implemented.
Skip the comparison if we do not have host CPUData available,
since virCPUDataIsIdentical always returns an error in that case.
https://bugzilla.redhat.com/show_bug.cgi?id=2030119
Fixes: 3bc6f46d30
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
4cc91f26d0
commit
33538bc46b
|
@ -4943,8 +4943,8 @@ virQEMUCapsIsValid(void *data,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (virCPUDataIsIdentical(priv->cpuData, qemuCaps->cpuData) !=
|
||||
VIR_CPU_COMPARE_IDENTICAL) {
|
||||
if (priv->cpuData &&
|
||||
virCPUDataIsIdentical(priv->cpuData, qemuCaps->cpuData) != VIR_CPU_COMPARE_IDENTICAL) {
|
||||
VIR_DEBUG("Outdated capabilities for '%s': host cpuid changed",
|
||||
qemuCaps->binary);
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue