Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/qemu/qemu_migration.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index f5711bcf7..1e052a197 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2324,19 +2324,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; } } -- 2.12.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list