Description of problem: For the majority of device types, libvirt assumes that the device is conventional PCI and requires hotplug, which currently makes is so they can only be attached behind a pci-to-pci bridge in a q35 machine. The user should be able to override this and attach endpoint devices nearly wherever they please. If the user specifies an address which is not hotplug capable, let them do so. If they want to attach a conventional PCI device to a PCIe bus, do it. libvirt should only be so restrictive when it is in charge of assigning devices to buses. Version-Release number of selected component (if applicable): 1.2.8 How reproducible: 100% Steps to Reproduce: 1. Attempt to assign a hostdev device to either the root complex (bus=0x0) or even directly behind the dmi bridge (bus=0x1) 2. 3. Actual results: libvirt enforces that a PCI device cannot be attached to a PCIe bus (even though my hostdev device very well might be PCIe) and requires the bus support hotplug (even though I've made no such requirement). Expected results: Let me do it Additional info:
Yep, this is the feedback I've been waiting for. I purposefully made the rules about plugging PCI devices into PCIe slots (and vice versa) and assigning to slots that aren't hot-pluggable restrictive to 1) avoid future problems in case qemu decided to start requiring that pci devices only be plugged into pci slots, and 2) avoid surprises when someon was unable to unplug a device. I had *thought* that I already allowed manual assignment to a non-hotpluggable slot, but it sounds like not.
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Patches have been pushed upstream (and will be in libvirt 1.2.17) to loosen the restrictions. libvirt will still attempt to auto-assign an address that is on a hotpluggable PCI bus, but youo can manually configure any address you want and libvirt will allow PCI<->PCIe as well as ignoring hotpluggability. (Unfortunately I forgot to reference this BZ in the commit log :-( ): commit 1e15be1bbcbb0b43348aaabfb41b7a3a0fb51c43 Author: Laine Stump <laine> Date: Tue Jun 9 13:33:36 2015 -0400 qemu: always permit PCI devices to be manually assigned to a PCIe bus commit 9a12b6cd8c09df8328eac03c089a4f7302a71f11 Author: Laine Stump <laine> Date: Wed Jun 10 14:15:25 2015 -0400 qemu: ignore assumptions about hotplug requirement when address is from config I haven't pulled these patches back to the 1.2.13-maint branch just in case they were to cause some strange regression with auto-assign behaviour (I don't think they will, I'm just being extra cautious), but I have checked and both patches backport with a simple cherry-pick, so it could be done if requested.