]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Explain why mdevs are assumed to be PCI Express
authorAndrea Bolognani <abologna@redhat.com>
Mon, 12 Jun 2017 09:57:31 +0000 (17:57 +0800)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 13 Jun 2017 02:48:49 +0000 (10:48 +0800)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_domain_address.c

index 2106b344eaa30e745a5ef5259fe9a28c7bcc508f..b5b863fe4d50bb5de352c4c0fa38e9e063f291a9 100644 (file)
@@ -645,6 +645,11 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
             return pcieFlags;
         }
 
+        /* mdevs don't have corresponding files in /sys that we can poke to
+         * try and figure out whether they are legacy PCI or PCI Express, so
+         * the logic below would never work; instead, we just go ahead and
+         * assume they're PCI Express. This is a very reasonable assumption,
+         * as all current mdev-capable devices are indeed PCI Express */
         if (hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV)
             return pcieFlags;