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:
...
  <cpu mode='host-model'>
    <model fallback='allow'/>
  </cpu>
...

will not generate a '-cpu host,compat=(null)' command line with qemu-system-ppc64.

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
This commit is contained in:
Prerna Saxena
2015-02-17 12:20:40 +01:00
committed by Ján Tomko
parent bdbe723fcd
commit 5e4f49ab8a
+2 -1
View File
@@ -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;