]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Validate required CPU features even for host-passthrough
authorJán Tomko <jtomko@redhat.com>
Sat, 28 Jan 2017 10:32:13 +0000 (11:32 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 16 Feb 2017 14:22:49 +0000 (15:22 +0100)
Commit adff345 allowed enabling features with -cpu host
without ajdusting the validity checks on domain startup
and migration.

src/qemu/qemu_migration.c
src/qemu/qemu_process.c

index 0f4a6cf212f181e67cef6b06df17bb1a1ff25153..0db1616aa72821aec68b5bdd642136eae0ac7d08 100644 (file)
@@ -2322,7 +2322,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver,
         if (!qemuMigrationIsAllowedHostdev(vm->def))
             return false;
 
-        if (vm->def->cpu && vm->def->cpu->mode != VIR_CPU_MODE_HOST_PASSTHROUGH) {
+        if (vm->def->cpu) {
             for (i = 0; i < vm->def->cpu->nfeatures; i++) {
                 virCPUFeatureDefPtr feature = &vm->def->cpu->features[i];
 
index 92fa69b3ccd8a304a0c15c274f8b912043f98e5c..76f132bc8fc74c68a74824c956a66e93d5ec0d63 100644 (file)
@@ -3819,7 +3819,7 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver,
             }
         }
 
-        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];