>+Ok, that is indeed an issue. >+I found some patches exposing this capability with vfio-pci but I am not sure >what is the latest work on the topic.
That's right, some kernels may expose the capability some not. We realized it when Bruce reported my earlier patch with the api rte_pci_find_ext_capability() did not work for him but it was working for me. We had different versions/flavors of kernel. >+Do you have pointers to the latest kernel patches? I don’t have any pointers to the latest kernel patches, though I have come across some internet search that was submitted to expose the capability but I am not sure what's the latest status on those patches. We can ask people involved there and get feedback. For example below: https://lists.linuxfoundation.org/pipermail/iommu/2020-June/045531.html >+In any case, even if, in the future, the kernel exposes this capability, we >need to live with the current behavior (and probably for a long time). >+As the discovery of pasid offset is not possible, the common API merit is >low, but at least it shows what is being done by the driver. >+Can we make a change so that this new API takes only the offset to the pasid >*structure* and not to the exact register controlling the feature? >+It should be something like: We can change it the way you described. The patch is already merged though 😊.