mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00: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:
parent
bdbe723fcd
commit
5e4f49ab8a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user