在 2022/6/20 16:17, Lu Baolu 写道:
The IOMMU driver shares the pasid table for PCI alias devices. When theWe have two customers reported the issue "DMAR: Setup RID2PASID failed",
RID2PASID entry of the shared pasid table has been filled by the first
device, the subsequent devices will encounter the "DMAR: Setup RID2PASID
failed" failure as the pasid entry has already been marke as present. As
the result, the IOMMU probing process will be aborted.
This fixes it by skipping RID2PASID setting if the pasid entry has been
populated. This works because the IOMMU core ensures that only the same
IOMMU domain can be attached to all PCI alias devices at the same time.
Therefore the subsequent devices just try to setup the RID2PASID entry
with the same domain, which is negligible.
Two ASPEED devices locate behind one PCIe-PCI bridge and iommu SM, PT mode is enabled. Most
Interesting thing is the second device is only used by BIOS, and BIOS left it to OS without shutting down,
and it is useless for OS.
Is there practical case multi devices behind PCIe-PCI bridge share the same
PASID entry without any security concern ? these two customer's case is not.