hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port
commit226263fb5cdaa4a4a95f1680fabbc9dd2123fd67
authorAleksandr Bezzubikov <zuban32s@gmail.com>
Thu, 17 Aug 2017 23:36:49 +0000 (18 02:36 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 8 Sep 2017 13:15:17 +0000 (8 16:15 +0300)
tree0f6cb5ffb56205bc2a73f85362c53bd2ac77a6a4
parent70e1ee59bb9490d9ac529e96820a03b346086ca1
hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port

To enable hotplugging of a newly created pcie-pci-bridge,
we need to tell firmware (e.g. SeaBIOS) to reserve
additional buses or IO/MEM/PREF space for pcie-root-port.
Additional bus reservation allows us to hotplug pcie-pci-bridge into this root port.
The number of buses and IO/MEM/PREF space to reserve are provided to the device via
a corresponding property, and to the firmware via new PCI capability.
The properties' default values are -1 to keep default behavior unchanged.

Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Tested-by: Marcel Apfelbaum <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
include/hw/pci/pcie_port.h