On Thu, Apr 28, 2011 at 02:57:14PM -0700, Richard Henderson wrote: > On 04/21/2011 02:39 AM, Alexander Graf wrote: > > How exactly is this going to be used? Also, in the end I think that > > most devices should just go through a PCI specific interface that > > then calls the DMA helpers: > > > > pci_memory_rw(PCIDevice *d, ...) > > > > even if it's only as simple as calling > > > > dma_memory_rw(d->iommu, ...) > > I've had a read through the patches posted in January. It all does > seem relatively sane. At least, I can readily see how I would apply > these interfaces to my Alpha port without trouble. > > I'll agree with Alex though that the raw dma_memory_rw functions > should not be exposed to the drivers for any given bus. They should > always go through {pci,isa}_memory_rw. And these should almost > certainly be inline functions that just pass on &device->bus.mmu.
I don't really see the point of having per-bus helpers. This is going to be widespread enough that we can have an iommu pointer in the core qdev, then everything can use the same helpers. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson