Blame SOURCES/libvirt-qemu-Exempt-video-model-none-from-getting-a-PCI-address-on-Q35.patch

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