mirror of
https://github.com/mii443/qemu.git
synced 2025-08-28 09:59:34 +00:00
pci/pcie: convert PCIE hotplug to use hotplug-handler API
Split pcie_cap_slot_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PCIE_SLOT device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PCI_BRIDGE_DEV device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
5d268704d7
commit
a66e657e18
@ -25,6 +25,7 @@
|
||||
#include "hw/pci/pci_regs.h"
|
||||
#include "hw/pci/pcie_regs.h"
|
||||
#include "hw/pci/pcie_aer.h"
|
||||
#include "hw/hotplug.h"
|
||||
|
||||
typedef enum {
|
||||
/* for attention and power indicator */
|
||||
@ -122,4 +123,8 @@ extern const VMStateDescription vmstate_pcie_device;
|
||||
.offset = vmstate_offset_value(_state, _field, PCIDevice), \
|
||||
}
|
||||
|
||||
void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
|
||||
Error **errp);
|
||||
void pcie_cap_slot_hot_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
|
||||
Error **errp);
|
||||
#endif /* QEMU_PCIE_H */
|
||||
|
Reference in New Issue
Block a user