Loading drivers/vfio/vfio.c +7 −6 Original line number Diff line number Diff line Loading @@ -627,9 +627,10 @@ static struct vfio_device *vfio_group_get_device(struct vfio_group *group, * that error notification via MSI can be affected for platforms that handle * MSI within the same IOVA space as DMA. */ static const char * const vfio_driver_whitelist[] = { "pci-stub" }; static const char * const vfio_driver_allowed[] = { "pci-stub" }; static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) static bool vfio_dev_driver_allowed(struct device *dev, struct device_driver *drv) { if (dev_is_pci(dev)) { struct pci_dev *pdev = to_pci_dev(dev); Loading @@ -638,8 +639,8 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) return true; } return match_string(vfio_driver_whitelist, ARRAY_SIZE(vfio_driver_whitelist), return match_string(vfio_driver_allowed, ARRAY_SIZE(vfio_driver_allowed), drv->name) >= 0; } Loading @@ -648,7 +649,7 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) * one of the following states: * - driver-less * - bound to a vfio driver * - bound to a whitelisted driver * - bound to an otherwise allowed driver * - a PCI interconnect device * * We use two methods to determine whether a device is bound to a vfio Loading @@ -674,7 +675,7 @@ static int vfio_dev_viable(struct device *dev, void *data) } mutex_unlock(&group->unbound_lock); if (!ret || !drv || vfio_dev_whitelisted(dev, drv)) if (!ret || !drv || vfio_dev_driver_allowed(dev, drv)) return 0; device = vfio_group_get_device(group, dev); Loading Loading
drivers/vfio/vfio.c +7 −6 Original line number Diff line number Diff line Loading @@ -627,9 +627,10 @@ static struct vfio_device *vfio_group_get_device(struct vfio_group *group, * that error notification via MSI can be affected for platforms that handle * MSI within the same IOVA space as DMA. */ static const char * const vfio_driver_whitelist[] = { "pci-stub" }; static const char * const vfio_driver_allowed[] = { "pci-stub" }; static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) static bool vfio_dev_driver_allowed(struct device *dev, struct device_driver *drv) { if (dev_is_pci(dev)) { struct pci_dev *pdev = to_pci_dev(dev); Loading @@ -638,8 +639,8 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) return true; } return match_string(vfio_driver_whitelist, ARRAY_SIZE(vfio_driver_whitelist), return match_string(vfio_driver_allowed, ARRAY_SIZE(vfio_driver_allowed), drv->name) >= 0; } Loading @@ -648,7 +649,7 @@ static bool vfio_dev_whitelisted(struct device *dev, struct device_driver *drv) * one of the following states: * - driver-less * - bound to a vfio driver * - bound to a whitelisted driver * - bound to an otherwise allowed driver * - a PCI interconnect device * * We use two methods to determine whether a device is bound to a vfio Loading @@ -674,7 +675,7 @@ static int vfio_dev_viable(struct device *dev, void *data) } mutex_unlock(&group->unbound_lock); if (!ret || !drv || vfio_dev_whitelisted(dev, drv)) if (!ret || !drv || vfio_dev_driver_allowed(dev, drv)) return 0; device = vfio_group_get_device(group, dev); Loading