On Fri, 18 Oct 2024 at 10:45, Zhangfei Gao<zhangfei.gao@xxxxxxxxxx> wrote:
Hi, BaoluWill you send this patch?
On Fri, 18 Oct 2024 at 09:58, Baolu Lu<baolu.lu@xxxxxxxxxxxxxxx> wrote:
On 2024/10/17 21:08, Jason Gunthorpe wrote:#include <linux/pci-ats.h>
On Thu, Oct 17, 2024 at 08:35:24PM +0800, Zhangfei Gao wrote:This limitation applies to PRI on PCI/SRIOV VFs because the PRI might be
Yes, you are rightI see, so that is more complicated.
I am using SRIOV vf and stall feature, so is_virtfn == true
Our ACC devices are fake pci endpoint devices which supports stall,
And they also supports sriov
So I have to ignore the limitation.
Lu, what do you think about also checking if the PCI function has PRI
? If not PRI assume the fault is special and doesn't follow PRI rules?
Or maybe we can have the iommu driver tag the event as a PRI/not-PRI
fault?
a shared resource and current iommu subsystem is not ready to support
enabling/disabling PRI on a VF without any impact on others.
In my understanding, it's fine to remove this limitation from the use
case of non-PRI on SRIOV VFs. Perhaps something like below?
if (dev_is_pci(dev)) {Yes, this works on our platform.
struct pci_dev *pdev = to_pci_dev(dev);
if (pdev->is_virtfn && pci_pri_supported(pdev))
return -EINVAL;
}
Tested-by: Zhangfei Gao<zhangfei.gao@xxxxxxxxxx>