]> git.droids-corp.org - dpdk.git/blobdiff - drivers/bus/pci/pci_common.c
vfio: handle hotplug request notifier
[dpdk.git] / drivers / bus / pci / pci_common.c
index 66b633051e4d3e41914985653df0b71e5ff51e21..5085c344ae7150095d8f6d5bb832037759ffdfbf 100644 (file)
@@ -444,6 +444,16 @@ pci_hot_unplug_handler(struct rte_device *dev)
                return -1;
 
        switch (pdev->kdrv) {
+       case RTE_KDRV_VFIO:
+               /*
+                * vfio kernel module guaranty the pci device would not be
+                * deleted until the user space release the resource, so no
+                * need to remap BARs resource here, just directly notify
+                * the req event to the user space to handle it.
+                */
+               rte_dev_event_callback_process(dev->name,
+                                              RTE_DEV_EVENT_REMOVE);
+               break;
        case RTE_KDRV_IGB_UIO:
        case RTE_KDRV_UIO_GENERIC:
        case RTE_KDRV_NIC_UIO: