migration/rdma: Fix or document problematic uses of errno
[qemu/armbru.git] / hw / acpi / pci-bridge.c
blob7baa7034a16d819a56b7d60d2a335e7c76df506c
1 /*
2 * QEMU ACPI PCI bridge
4 * Copyright (c) 2023 Red Hat, Inc.
6 * Author:
7 * Igor Mammedov <imammedo@redhat.com>
9 * SPDX-License-Identifier: GPL-2.0-or-later
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
15 #include "qemu/osdep.h"
16 #include "hw/acpi/pci.h"
17 #include "hw/pci/pci_bridge.h"
18 #include "hw/acpi/pcihp.h"
20 void build_pci_bridge_aml(AcpiDevAmlIf *adev, Aml *scope)
22 PCIBridge *br = PCI_BRIDGE(adev);
24 if (!DEVICE(br)->hotplugged) {
25 PCIBus *sec_bus = pci_bridge_get_sec_bus(br);
27 build_append_pci_bus_devices(scope, sec_bus);
30 * generate hotplug slots descriptors if
31 * bridge has ACPI PCI hotplug attached,
33 if (object_property_find(OBJECT(sec_bus), ACPI_PCIHP_PROP_BSEL)) {
34 build_append_pcihp_slots(scope, sec_bus);