summaryrefslogtreecommitdiffstats
path: root/include/hw/acpi
diff options
context:
space:
mode:
authorDavid Hildenbrand2018-12-12 10:16:17 +0100
committerMichael S. Tsirkin2018-12-20 17:19:12 +0100
commitec266f408882fd38475f72c4e864ed576228643b (patch)
treee8efc68e8fbffaec5279c8484908b1e10cbb8d3c /include/hw/acpi
parents390x/pci: rename hotplug handler callbacks (diff)
downloadqemu-ec266f408882fd38475f72c4e864ed576228643b.tar.gz
qemu-ec266f408882fd38475f72c4e864ed576228643b.tar.xz
qemu-ec266f408882fd38475f72c4e864ed576228643b.zip
pci/pcihp: perform check for bus capability in pre_plug handler
Perform the check in the pre_plug handler. In addition, we need the capability only if the device is actually hotplugged (and not created during machine initialization). This is a preparation for coldplugging pci devices via that hotplug handler. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/acpi')
-rw-r--r--include/hw/acpi/pcihp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h
index 8a65f99fc8..ce31625850 100644
--- a/include/hw/acpi/pcihp.h
+++ b/include/hw/acpi/pcihp.h
@@ -56,6 +56,8 @@ typedef struct AcpiPciHpState {
void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root,
MemoryRegion *address_space_io, bool bridges_enabled);
+void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev,
+ DeviceState *dev, Error **errp);
void acpi_pcihp_device_plug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,
DeviceState *dev, Error **errp);
void acpi_pcihp_device_unplug_cb(HotplugHandler *hotplug_dev, AcpiPciHpState *s,