Skip to contentSkip to conversation

s390 PCI dma ops

DISCUSSION Christoph Hellwig 2 participants 2 messages Sep 11, 2020 s390

lore
Share & tools
lore
#0 lore raw

Hi S/390 PCI and IOMMU maintainers,

We've recently tried to convert all implementations of the IOMMU API to use drivers/iommu/dma-iommu.c instead of their local IOMMU ops. I've looked at S/390 and while some comments mention things about the iommu API the implementation looks quite separate. Do arch/s390/pci/pci_dma.c and drivers/iommu/s390-iommu.c driver the same hardware? If so would a switch to drivers/iommu/dma-iommu.c be feasibel?

#1 lore raw
Quoted 7 lines · Christoph Hellwig

Hi S/390 PCI and IOMMU maintainers,

We've recently tried to convert all implementations of the IOMMU API to use drivers/iommu/dma-iommu.c instead of their local IOMMU ops. I've looked at S/390 and while some comments mention things about the iommu API the implementation looks quite separate. Do arch/s390/pci/pci_dma.c and drivers/iommu/s390-iommu.c driver the same hardware? If so would a

Yes, these drivers are dealing with the same hardware.

Quoted 2 lines

switch to drivers/iommu/dma-iommu.c be feasibel?

Hmm... s390 does some particular things that are arch-specific, largely as forms of optimization. One such example is a case where we avoid reusing IO TLB Page Table Entries until we have to do a global flush.

I'd need to take a closer look at what AMD did / what intel is doing. Fundamentally we are open to the idea as the maintenance benefit is clear, but I don't think it's a trivial swap - I think we would need extensions to dma-iommu to accommodate some of our special cases / optimizations.