From 5e4f49ab8aa2dc7e71b8482e2f15f2a7de1c1006 Mon Sep 17 00:00:00 2001 From: Prerna Saxena Date: Sun, 15 Feb 2015 09:54:15 +0530 Subject: [PATCH] PowerPC : Forbid NULL CPU model with 'host-model' mode. PowerPC : Forbid NULL CPU model with 'host-model' mode in qemu command line. This ensures that an XML such as following: ... ... will not generate a '-cpu host,compat=(null)' command line with qemu-system-ppc64. Signed-off-by: Prerna Saxena --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8e864abd5e..743d6f01c3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6691,7 +6691,8 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, virBufferAddLit(buf, "host"); if (ARCH_IS_PPC64(def->os.arch) && - cpu->mode == VIR_CPU_MODE_HOST_MODEL) { + cpu->mode == VIR_CPU_MODE_HOST_MODEL && + def->cpu->model != NULL) { virBufferAsprintf(buf, ",compat=%s", def->cpu->model); } else { featCpu = cpu; -- GitLab