
On 06/02/2014 06:35 PM, Daniel P. Berrange wrote:
On Thu, May 15, 2014 at 10:31:05AM +0200, Ján Tomko wrote:
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index f0df1a6..7504a38 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1513,6 +1513,20 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm, return false; }
+ for (i = 0; i < def->cpu->nfeatures; i++) { + virCPUFeatureDefPtr feature = &def->cpu->features[i]; + + if (feature->policy != VIR_CPU_FEATURE_REQUIRE) + continue; + + if (STREQ(feature->name, "invtsc")) { + virReportError(VIR_ERR_OPERATION_INVALID, + _("domain has CPU feature: %s"), + feature->name); + return false; + } + }
Could you add a comment describing why we forbid migration with this feature set. It probably isn't obvious to some random person reading this in the future :-)
I've added this comment locally: diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3857c09..36ee718 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1519,6 +1519,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm, 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"),
ACK
As Eric pointed out, QEMU support is only merged in the maintainer's qom-cpu branch: https://github.com/afaerber/qemu-cpu/tree/qom-cpu I'll push this after it gets merged in qemu.git master. Thanks for the review. Jan