diff --git a/hw/pci.c b/hw/pci.c
index 1d297d6..679e976 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1692,7 +1692,7 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
     return 0;
 }
 
-static int pci_unplug_device(DeviceState *qdev)
+int pci_unplug_device(DeviceState *qdev)
 {
     PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
     PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
diff --git a/hw/pci.h b/hw/pci.h
index 0d288ce..868f793 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -452,6 +452,7 @@ typedef struct {
 
 void pci_qdev_register(PCIDeviceInfo *info);
 void pci_qdev_register_many(PCIDeviceInfo *info);
+int pci_unplug_device(DeviceState *qdev);
 
 PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunction,
                                     const char *name);
