diff options
author | Igor Mammedov <imammedo@redhat.com> | 2023-03-02 17:15:41 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-03-07 12:39:00 -0500 |
commit | 02c106139a5c01a5668246c748939b5a4bb0c467 (patch) | |
tree | 41a4ccde6fdbc308674cfaf4a13840dc7d43e70c /hw/acpi | |
parent | 62dd55fcf736994958eb5706cee5806480acfe25 (diff) | |
download | qemu-02c106139a5c01a5668246c748939b5a4bb0c467.zip qemu-02c106139a5c01a5668246c748939b5a4bb0c467.tar.gz qemu-02c106139a5c01a5668246c748939b5a4bb0c467.tar.bz2 |
acpi: pci: move out ACPI PCI hotplug generator from generic slot generator build_append_pci_bus_devices()
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230302161543.286002-33-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/acpi')
-rw-r--r-- | hw/acpi/pci-bridge.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/acpi/pci-bridge.c b/hw/acpi/pci-bridge.c index 4fbf6da..7baa703 100644 --- a/hw/acpi/pci-bridge.c +++ b/hw/acpi/pci-bridge.c @@ -22,6 +22,16 @@ void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope) PCIBridge *br = PCI_BRIDGE(adev); if (!DEVICE(br)->hotplugged) { - build_append_pci_bus_devices(scope, pci_bridge_get_sec_bus(br)); + PCIBus *sec_bus = pci_bridge_get_sec_bus(br); + + build_append_pci_bus_devices(scope, sec_bus); + + /* + * generate hotplug slots descriptors if + * bridge has ACPI PCI hotplug attached, + */ + if (object_property_find(OBJECT(sec_bus), ACPI_PCIHP_PROP_BSEL)) { + build_append_pcihp_slots(scope, sec_bus); + } } } |