render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
51d9a2
From 80eaa9617c886a6955d4752d90c82b807b572dca Mon Sep 17 00:00:00 2001
51d9a2
Message-Id: <80eaa9617c886a6955d4752d90c82b807b572dca@dist-git>
51d9a2
From: Erik Skultety <eskultet@redhat.com>
51d9a2
Date: Tue, 31 Jul 2018 10:38:54 +0200
51d9a2
Subject: [PATCH] qemu: Exempt video model 'none' from getting a PCI address on
51d9a2
 Q35
51d9a2
MIME-Version: 1.0
51d9a2
Content-Type: text/plain; charset=UTF-8
51d9a2
Content-Transfer-Encoding: 8bit
51d9a2
51d9a2
Commit d48813e8 made sure we wouldn't get one for i440fx, but not for Q35
51d9a2
machine type. If the primary video didn't get the assumed 0:0:1.0 PCI
51d9a2
address, the evaluation then failed with: "Cannot automatically add a
51d9a2
new PCI bus for a device with connect flags 00"
51d9a2
51d9a2
https: //bugzilla.redhat.com/show_bug.cgi?id=1609087
51d9a2
Signed-off-by: Erik Skultety <eskultet@redhat.com>
51d9a2
(cherry picked from commit e9024b0cec3a66ac11784034bb62abe8ec7b46a1)
51d9a2
Signed-off-by: Erik Skultety <eskultet@redhat.com>
51d9a2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
51d9a2
---
51d9a2
 src/qemu/qemu_domain_address.c | 5 +++--
51d9a2
 1 file changed, 3 insertions(+), 2 deletions(-)
51d9a2
51d9a2
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
51d9a2
index e6996934b8..0cb5af4a87 100644
51d9a2
--- a/src/qemu/qemu_domain_address.c
51d9a2
+++ b/src/qemu/qemu_domain_address.c
51d9a2
@@ -1723,10 +1723,11 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
51d9a2
            goto cleanup;
51d9a2
     }
51d9a2
 
51d9a2
-    if (def->nvideos > 0) {
51d9a2
+    if (def->nvideos > 0 &&
51d9a2
+        def->videos[0]->type != VIR_DOMAIN_VIDEO_TYPE_NONE) {
51d9a2
         /* NB: unlike the pc machinetypes, on q35 machinetypes the
51d9a2
          * integrated devices are at slot 0x1f, so when qemu looks for
51d9a2
-         * the first free lot for the first VGA, it will always be at
51d9a2
+         * the first free slot for the first VGA, it will always be at
51d9a2
          * slot 1 (which was used up by the integrated PIIX3 devices
51d9a2
          * on pc machinetypes).
51d9a2
          */
51d9a2
-- 
51d9a2
2.18.0
51d9a2