summaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 21:42:44 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:49 -0500
commitee995ffbf7b2b190b17d65bbd8f85218679156ad (patch)
tree6fa62b4d62df3bf12d2032758de6eba10d7612a5 /hw/pci.h
parentcb23117be707ea805dec1ab06b3bae06b9fc38c1 (diff)
downloadqemu-ee995ffbf7b2b190b17d65bbd8f85218679156ad.tar.gz
qemu-ee995ffbf7b2b190b17d65bbd8f85218679156ad.tar.bz2
qemu-ee995ffbf7b2b190b17d65bbd8f85218679156ad.zip
pci: hotplug windup
Create qdev infrastructure for pci hotplug. PCI bus implementations must register a handler for hotplug. Creating a new PCI device will automagically hot-plug it in case the PCI bus in question supports this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 24de8eb2a4..c54146c92e 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -246,11 +246,13 @@ int pci_device_load(PCIDevice *s, QEMUFile *f);
typedef void (*pci_set_irq_fn)(void *opaque, int irq_num, int level);
typedef int (*pci_map_irq_fn)(PCIDevice *pci_dev, int irq_num);
+typedef int (*pci_hotplug_fn)(PCIDevice *pci_dev, int state);
void pci_bus_new_inplace(PCIBus *bus, DeviceState *parent,
const char *name, int devfn_min);
PCIBus *pci_bus_new(DeviceState *parent, const char *name, int devfn_min);
void pci_bus_irqs(PCIBus *bus, pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
void *irq_opaque, int nirq);
+void pci_bus_hotplug(PCIBus *bus, pci_hotplug_fn hotplug);
PCIBus *pci_register_bus(DeviceState *parent, const char *name,
pci_set_irq_fn set_irq, pci_map_irq_fn map_irq,
void *irq_opaque, int devfn_min, int nirq);