If user set this feature in vm xml:
<cpu mode='host-passthrough'>
<feature policy='require' name='invtsc'/>
</cpu>
we won't report error when do migrate.
So remove def->cpu->mode check, because we can set feature for
host-passthrough model now.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index d34bb02..9c76e79 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2004,7 +2004,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm,
return false;
}
- if (def->cpu && def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) {
+ if (def->cpu) {
for (i = 0; i < def->cpu->nfeatures; i++) {
virCPUFeatureDefPtr feature = &def->cpu->features[i];
--
1.8.3.1