mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-04 02:13:01 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user