]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
cpu: Improve error reporting on incompatible CPUs
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Apr 2012 13:24:47 +0000 (15:24 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 23 Apr 2012 08:59:51 +0000 (10:59 +0200)
commita2ba53cf18a9ad252a74a39f45ec3577923f50de
tree787c7c0cb97dc81cda9199137b597615934f4be8
parent28ae4f0cbb938a99101f6f8ad20b6bb304628c4b
cpu: Improve error reporting on incompatible CPUs

This patch modifies the CPU comparrison function to report the
incompatibilities in more detail to ease identification of problems.

* src/cpu/cpu.h:
    cpuGuestData(): Add argument to return detailed error message.
* src/cpu/cpu.c:
    cpuGuestData(): Add passthrough for error argument.
* src/cpu/cpu_x86.c
    x86FeatureNames(): Add function to convert a CPU definition to flag
                       names.
    x86Compute(): - Add error message parameter
                  - Add macro for reporting detailed error messages.
                  - Improve error reporting.
                  - Simplify calculation of forbidden flags.
    x86DataIteratorInit():
    x86cpuidMatchAny(): Remove functions that are no longer needed.
* src/qemu/qemu_command.c:
    qemuBuildCpuArgStr(): - Modify for new function prototype
                          - Add detailed error reports
                          - Change error code on incompatible processors
                            to VIR_ERR_CONFIG_UNSUPPORTED instead of
                            internal error
* tests/cputest.c:
    cpuTestGuestData(): Modify for new function prototype
src/cpu/cpu.c
src/cpu/cpu.h
src/cpu/cpu_x86.c
src/qemu/qemu_command.c
tests/cputest.c