Re: [PATCH] Validate required CPU features even for host-passthrough

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

 



On Mon, Jan 30, 2017 at 04:19:24PM +0100, Ján Tomko wrote:
Commit adff345 allowed enabling features with -cpu host
without ajdusting the validity checks on domain startup
and migration.
---
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_process.c   | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


We should add qemuProcessVerifyGuestCPU() to the tests somehow.

ACK

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 0f4a6cf..0db1616 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -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];

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 184440d..2ad6451 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -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];

--
2.10.2

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

Attachment: signature.asc
Description: Digital signature

--
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]
  Powered by Linux