Lines Matching +full:vendor +full:- +full:id

1 // SPDX-License-Identifier: GPL-2.0-only
31 #define DRIVER_DESC "VFIO PCI - User Level meta-driver"
35 MODULE_PARM_DESC(ids, "Initial PCI IDs to add to the vfio driver, format is \"vendor:device[:subven…
40 …king. If this resolves problems for specific devices, report lspci -vvvxxx to linux-pci@vger.kern…
45 MODULE_PARM_DESC(disable_vga, "Disable VGA resource access through vfio-pci");
56-IOV configuration. Enabling SR-IOV on a PF typically requires support of the userspace PF driver…
65 switch (pdev->vendor) { in vfio_pci_dev_in_denylist()
67 switch (pdev->device) { in vfio_pci_dev_in_denylist()
90 "device denylist disabled - allowing device %04x:%04x.\n", in vfio_pci_is_denylisted()
91 pdev->vendor, pdev->device); in vfio_pci_is_denylisted()
95 pci_warn(pdev, "%04x:%04x exists in vfio-pci device denylist, driver probing disallowed.\n", in vfio_pci_is_denylisted()
96 pdev->vendor, pdev->device); in vfio_pci_is_denylisted()
105 struct pci_dev *pdev = vdev->pdev; in vfio_pci_open_device()
113 pdev->vendor == PCI_VENDOR_ID_INTEL && in vfio_pci_open_device()
116 if (ret && ret != -ENODEV) { in vfio_pci_open_device()
129 .name = "vfio-pci",
147 static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) in vfio_pci_probe() argument
153 return -EINVAL; in vfio_pci_probe()
155 vdev = vfio_alloc_device(vfio_pci_core_device, vdev, &pdev->dev, in vfio_pci_probe()
160 dev_set_drvdata(&pdev->dev, vdev); in vfio_pci_probe()
167 vfio_put_device(&vdev->vdev); in vfio_pci_probe()
173 struct vfio_pci_core_device *vdev = dev_get_drvdata(&pdev->dev); in vfio_pci_remove()
176 vfio_put_device(&vdev->vdev); in vfio_pci_remove()
181 struct vfio_pci_core_device *vdev = dev_get_drvdata(&pdev->dev); in vfio_pci_sriov_configure()
184 return -ENOENT; in vfio_pci_sriov_configure()
197 .name = "vfio-pci",
208 char *p, *id; in vfio_pci_fill_ids() local
217 while ((id = strsep(&p, ","))) { in vfio_pci_fill_ids()
218 unsigned int vendor, device, subvendor = PCI_ANY_ID, in vfio_pci_fill_ids() local
222 if (!strlen(id)) in vfio_pci_fill_ids()
225 fields = sscanf(id, "%x:%x:%x:%x:%x:%x", in vfio_pci_fill_ids()
226 &vendor, &device, &subvendor, &subdevice, in vfio_pci_fill_ids()
230 pr_warn("invalid id string \"%s\"\n", id); in vfio_pci_fill_ids()
234 rc = pci_add_dynid(&vfio_pci_driver, vendor, device, in vfio_pci_fill_ids()
237 pr_warn("failed to add dynamic id [%04x:%04x[%04x:%04x]] class %#08x/%08x (%d)\n", in vfio_pci_fill_ids()
238 vendor, device, subvendor, subdevice, in vfio_pci_fill_ids()
242 vendor, device, subvendor, subdevice, in vfio_pci_fill_ids()