mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 20:02:21 +00:00
qemu: Pass migratable=on|off property for -cpu host
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
201bd5db63
commit
cfdceb9754
@ -6254,6 +6254,21 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
virBufferAddLit(buf, ",aarch64=off");
|
virBufferAddLit(buf, ",aarch64=off");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cpu->migratable) {
|
||||||
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_MIGRATABLE)) {
|
||||||
|
virBufferAsprintf(buf, ",migratable=%s",
|
||||||
|
virTristateSwitchTypeToString(cpu->migratable));
|
||||||
|
} else if (ARCH_IS_X86(def->os.arch) &&
|
||||||
|
cpu->migratable == VIR_TRISTATE_SWITCH_OFF) {
|
||||||
|
/* This is the default on x86 */
|
||||||
|
} else {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("Migratable attribute for host-passthrough "
|
||||||
|
"CPU is not supported by QEMU binary"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_CPU_MODE_HOST_MODEL:
|
case VIR_CPU_MODE_HOST_MODEL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user