u16 control, supported;
int pos;
+ /*
+ * VFs must not implement the PASID Capability, but if a PF
+ * supports PASID, its VFs share the PF PASID configuration.
+ */
+ if (pdev->is_virtfn) {
+ if (pci_physfn(pdev)->pasid_enabled)
+ return 0;
+ return -EINVAL;
+ }
+
if (WARN_ON(pdev->pasid_enabled))
return -EBUSY;
u16 control = 0;
int pos;
+ /* VFs share the PF PASID configuration */
+ if (pdev->is_virtfn)
+ return;
+
if (WARN_ON(!pdev->pasid_enabled))
return;
u16 control;
int pos;
+ if (pdev->is_virtfn)
+ return;
+
if (!pdev->pasid_enabled)
return;
u16 supported;
int pos;
+ if (pdev->is_virtfn)
+ pdev = pci_physfn(pdev);
+
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
if (!pos)
return -EINVAL;
u16 supported;
int pos;
+ if (pdev->is_virtfn)
+ pdev = pci_physfn(pdev);
+
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
if (!pos)
return -EINVAL;