• P
    cpu: Improve error reporting on incompatible CPUs · a2ba53cf
    Peter Krempa 提交于
    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
    a2ba53cf
cputest.c 18.7 KB