< snip thread > So I was looking at this accessor business. We already have them for PCI. PAPR VIO already has its own as well.
That leaves us with various devices such as OHCI that can exist on different bus types and use the lower-level "DMAContext" based variant... Now I'm keen to keep it (essentially, keep the series as-is really) and say let's just merge it for 1.2, unless you think you can come up with something better before that deadline. At the end of the day, DMAContext is a fine structure to hold the iommu ops and identify the top level DMA translation, we might just end up burying it elsewhere in the long run, but for now it's easy to keep as-is. There's few enough drivers who directly use the dma_* API, really. Mostly those who sit on multiple bus, and a bit of search/replace in there won't be hard if needed in the future. After the discussion we had with a few other folks on the list it looks like a "proper" model isn't something that we need today to fix a specific issue, the simpler DMAContext approach will work fine, unless I missed something. And we can always make DMAContext itself hierarchical or burry it in the MemoryRegion and leave the type itself as a handle for upstream transactions. Cheers, Ben.