hw/pcie-root-port: Fix hotplug for PCI devices requiring IO
commite2a6290aab578b2170c1f5909fa556385dc0d820
authorMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
Mon, 2 Aug 2021 09:00:57 +0000 (2 12:00 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 3 Aug 2021 20:31:07 +0000 (3 16:31 -0400)
tree84a41ad38b67a0bb418aa9e4c3162d0bdc4437c5
parentf2da205cb4142259d9bc6b9d4596ebbe2426fe49
hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

Q35 has now ACPI hotplug enabled by default for PCI(e) devices.
As opposed to native PCIe hotplug, guests like Fedora 34
will not assign IO range to pcie-root-ports not supporting
native hotplug, resulting into a regression.

Reproduce by:
    qemu-bin -M q35 -device pcie-root-port,id=p1 -monitor stdio
    device_add e1000,bus=p1
In the Guest OS the respective pcie-root-port will have the IO range
disabled.

Fix it by setting the "reserve-io" hint capability of the
pcie-root-ports so the firmware will allocate the IO range instead.

Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Message-Id: <20210802090057.1709775-1-marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci-bridge/gen_pcie_root_port.c