lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v10 04/12] iommu: Add attach/detach_dev_pasid iommu interface
From
On 2022/7/29 10:56, Tian, Kevin wrote:
>> +static bool iommu_group_device_pasid_viable(struct iommu_group *group,
>> + struct device *dev)
>> +{
>> + int count;
>> +
>> + count = iommu_group_device_count(group);
>> + if (count != 1)
>> + return false;
>> +
>> + /*
>> + * Block PASID attachment in cases where the PCI fabric is
>> + * routing based on address. PCI/ACS disables that.
>> + */
>> + if (dev_is_pci(dev))
>> + return pci_acs_path_enabled(to_pci_dev(dev), NULL,
>> + REQ_ACS_FLAGS);
> I think we are leaning toward doing above check in pci_enable_pasid().
> Then no singleton check inside iommu core.

The iommu grouping also considers other things, like PCI alias. There
are many calls of pci_add_dma_alias() in drivers/pci/quirks.c.
Therefore, I believe that pci_acs_path_enabled() returning true doesn't
guarantees a singleton group.

>
> Presumably similar check can be done in DT/ACPI path of enabling pasid?
>

I can't find the pasid (or anything similar) enabling interfaces for
DT or ACPI. They are device specific?

Best regards,
baolu

\
 
 \ /
  Last update: 2022-07-29 05:21    [W:0.103 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site