提交 6cb8bf6a 编写于 作者: J Jiri Denemark

qemu: Use virCPUCheckFeature in qemuMigrationIsAllowed

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 7373c4e4
......@@ -2473,19 +2473,12 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
return false;
if (vm->def->cpu) {
for (i = 0; i < vm->def->cpu->nfeatures; i++) {
virCPUFeatureDefPtr feature = &vm->def->cpu->features[i];
if (feature->policy != VIR_CPU_FEATURE_REQUIRE)
continue;
/* QEMU blocks migration and save with invariant TSC enabled */
if (STREQ(feature->name, "invtsc")) {
virReportError(VIR_ERR_OPERATION_INVALID,
_("domain has CPU feature: %s"),
feature->name);
return false;
}
/* QEMU blocks migration and save with invariant TSC enabled */
if (virCPUCheckFeature(vm->def->os.arch, vm->def->cpu,
"invtsc") == 1) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain has 'invtsc' CPU feature"));
return false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册