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

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