[PATCH 2/3] qemu: add a check for non-migratable cpu flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]