From: Andrea Bolognani Date: Mon, 12 Jun 2017 09:57:31 +0000 (+0800) Subject: qemu: Explain why mdevs are assumed to be PCI Express X-Git-Tag: v3.5.0-rc1~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2feb2fe2512771763000930b68b689750c124454;p=thirdparty%2Flibvirt.git qemu: Explain why mdevs are assumed to be PCI Express Signed-off-by: Andrea Bolognani --- diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 2106b344ea..b5b863fe4d 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -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;