On 06/25/14 14:34, Jiri Denemark wrote:
When CPU comparison APIs return VIR_CPU_COMPARE_INCOMPATIBLE, the
caller
has no clue why the CPU is considered incompatible with host CPU. And in
some cases, it would be nice to be able to get such info in a client
rather than having to look in logs.
To achieve this, the APIs can be told to return VIR_ERR_CPU_INCOMPATIBLE
error for incompatible CPUs and the reason will be described in the
associated error message.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
include/libvirt/virterror.h | 2 ++
src/bhyve/bhyve_driver.c | 2 +-
src/cpu/cpu.c | 10 ++++++----
src/cpu/cpu.h | 9 ++++++---
src/cpu/cpu_aarch64.c | 3 ++-
src/cpu/cpu_arm.c | 3 ++-
src/cpu/cpu_generic.c | 15 +++++++++++----
src/cpu/cpu_powerpc.c | 10 ++++++++--
src/cpu/cpu_x86.c | 20 ++++++++++++++++++--
src/qemu/qemu_driver.c | 2 +-
src/util/virerror.c | 6 ++++++
tests/cputest.c | 4 ++--
12 files changed, 65 insertions(+), 21 deletions(-)
ACK,
Peter