From: Prerna Saxena Date: Sun, 15 Feb 2015 04:24:15 +0000 (+0530) Subject: PowerPC : Forbid NULL CPU model with 'host-model' mode. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5e4f49ab8aa2dc7e71b8482e2f15f2a7de1c1006;p=libvirt.git 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 --- 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;