mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Add debug messages for CPU incompatibility
When comparing incompatible CPUs, the reason for this incompatibility is logged as a debug message. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
5e13b7ab5e
commit
16a4d22b4b
@ -804,9 +804,11 @@ x86Compute(virCPUDefPtr host,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found) {
|
||||||
|
VIR_DEBUG("CPU arch %s does not match host arch", cpu->arch);
|
||||||
return VIR_CPU_COMPARE_INCOMPATIBLE;
|
return VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((map = x86LoadMap()) == NULL)
|
if ((map = x86LoadMap()) == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
@ -848,6 +850,8 @@ x86Compute(virCPUDefPtr host,
|
|||||||
cpuid1->function);
|
cpuid1->function);
|
||||||
|
|
||||||
if (cpuid2 != NULL && x86cpuidMatchAny(cpuid2, cpuid1)) {
|
if (cpuid2 != NULL && x86cpuidMatchAny(cpuid2, cpuid1)) {
|
||||||
|
VIR_DEBUG("Host CPU provides forbidden features in CPUID function 0x%x",
|
||||||
|
cpuid1->function);
|
||||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -855,6 +859,7 @@ x86Compute(virCPUDefPtr host,
|
|||||||
|
|
||||||
result = x86ModelCompare(host_model, cpu_require);
|
result = x86ModelCompare(host_model, cpu_require);
|
||||||
if (result == SUBSET || result == UNRELATED) {
|
if (result == SUBSET || result == UNRELATED) {
|
||||||
|
VIR_DEBUG0("Host CPU does not provide all required features");
|
||||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -871,6 +876,7 @@ x86Compute(virCPUDefPtr host,
|
|||||||
if (ret == VIR_CPU_COMPARE_SUPERSET
|
if (ret == VIR_CPU_COMPARE_SUPERSET
|
||||||
&& cpu->type == VIR_CPU_TYPE_GUEST
|
&& cpu->type == VIR_CPU_TYPE_GUEST
|
||||||
&& cpu->match == VIR_CPU_MATCH_STRICT) {
|
&& cpu->match == VIR_CPU_MATCH_STRICT) {
|
||||||
|
VIR_DEBUG0("Host CPU does not strictly match guest CPU");
|
||||||
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user