Message ID | 20200515104359.1178606-1-jean-philippe@linaro.org (mailing list archive) |
---|---|
Headers | show |
Series | PCI, iommu: Factor 'untrusted' check for ATS enablement | expand |
Can you please lift the untrusted flag into struct device? It really isn't a PCI specific concept, and we should not have code poking into pci_dev all over the iommu code.
Hi Christoph On Fri, May 15, 2020 at 08:43:51AM -0700, Christoph Hellwig wrote: > Can you please lift the untrusted flag into struct device? It really > isn't a PCI specific concept, and we should not have code poking into > pci_dev all over the iommu code. Just for clarification: All IOMMU's today mostly pertain to only PCI devices and for devices that aren't PCI like HPET for instance we give a PCI identifier. Facilities like ATS for instance require the platform to have an IOMMU. what additional problems does moving this to struct device solve? Cheers, Ashok
Hi, On Fri, May 15, 2020 at 10:19:49AM -0700, Raj, Ashok wrote: > On Fri, May 15, 2020 at 08:43:51AM -0700, Christoph Hellwig wrote: > > Can you please lift the untrusted flag into struct device? It really > > isn't a PCI specific concept, and we should not have code poking into > > pci_dev all over the iommu code. > > Just for clarification: All IOMMU's today mostly pertain to only PCI devices > and for devices that aren't PCI like HPET for instance we give a PCI > identifier. Facilities like ATS for instance require the platform to have > an IOMMU. > > what additional problems does moving this to struct device solve? ATS is PCI specific, but IOMMUs certainly aren't! The vast majority of IOMMUs deployed in arm/arm64 SoCs are /not/ using any sort of PCI. Will
On Fri, 2020-05-15 at 10:19 -0700, Raj, Ashok wrote: > Hi Christoph > > On Fri, May 15, 2020 at 08:43:51AM -0700, Christoph Hellwig wrote: > > Can you please lift the untrusted flag into struct device? It really > > isn't a PCI specific concept, and we should not have code poking into > > pci_dev all over the iommu code. > > Just for clarification: All IOMMU's today mostly pertain to only PCI devices > and for devices that aren't PCI like HPET for instance we give a PCI > identifier. Facilities like ATS for instance require the platform to have > an IOMMU. > > what additional problems does moving this to struct device solve? Even the Intel IOMMU supports ACPI devices for which there is no struct pci_dev; only a B/D/F in the ANDD record indicating which entry in the context table to use.
On Mon, May 18, 2020 at 04:47:17PM +0100, David Woodhouse wrote: > On Fri, 2020-05-15 at 10:19 -0700, Raj, Ashok wrote: > > Hi Christoph > > > > On Fri, May 15, 2020 at 08:43:51AM -0700, Christoph Hellwig wrote: > > > Can you please lift the untrusted flag into struct device? It really > > > isn't a PCI specific concept, and we should not have code poking into > > > pci_dev all over the iommu code. > > > > Just for clarification: All IOMMU's today mostly pertain to only PCI devices > > and for devices that aren't PCI like HPET for instance we give a PCI > > identifier. Facilities like ATS for instance require the platform to have > > an IOMMU. > > > > what additional problems does moving this to struct device solve? > > Even the Intel IOMMU supports ACPI devices for which there is no struct > pci_dev; only a B/D/F in the ANDD record indicating which entry in the > context table to use. Yes, spaced out :-).. just don't work on those platforms on a daily basis and its easy to forget :-(
On Fri, May 15, 2020 at 08:43:51AM -0700, Christoph Hellwig wrote: > Can you please lift the untrusted flag into struct device? It really > isn't a PCI specific concept, and we should not have code poking into > pci_dev all over the iommu code. I suppose that could go in a separate series once other buses need it? The only methods for setting this bit at the moment apply to PCI ports. (ACPI ExternalFacingPort and dt external-facing properties declared by firmware). Thanks, Jean