提交 cfdceb97 编写于 作者: J Jiri Denemark

qemu: Pass migratable=on|off property for -cpu host

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 201bd5db
......@@ -6254,6 +6254,21 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver,
}
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;
case VIR_CPU_MODE_HOST_MODEL:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册