+static bool iommu_group_device_pasid_viable(struct iommu_group *group,I think we are leaning toward doing above check in pci_enable_pasid().
+ 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);
Then no singleton check inside iommu core.
Presumably similar check can be done in DT/ACPI path of enabling pasid?