From: Mike Qiu <[email protected]> Currently, autotest support amd and intel's X86 cpu type, IBM Power cpus will be configure as 'unknown'.
For cpu_model also has this problem. To solve the problem, use the new API to get hardware platform so that can figure out the vendor IBM, and the exactly model. Signed-off-by: Mike Qiu <[email protected]> --- virttest/utils_misc.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/virttest/utils_misc.py b/virttest/utils_misc.py index fa6e4a3..f32f335 100644 --- a/virttest/utils_misc.py +++ b/virttest/utils_misc.py @@ -584,6 +584,8 @@ def get_cpu_vendor(cpu_flags=[], verbose=True): vendor = 'intel' elif 'svm' in cpu_flags: vendor = 'amd' + elif get_hardware_platform() == 'ppc64': + verdor = 'ibm' else: vendor = 'unknown' @@ -1138,6 +1140,10 @@ def get_host_cpu_models(): pattern += r".+(\b%s\b)" % i return pattern + platform = get_hardware_platform() + if platform == 'ppc64': + return 'POWER7' + vendor_re = "vendor_id\s+:\s+(\w+)" cpu_flags_re = "flags\s+:\s+([\w\s]+)\n" -- 1.7.7.6 _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
