On Fri, Mar 09, 2012 at 11:23:58AM +0100, Paolo Bonzini wrote: > Il 09/03/2012 06:01, David Gibson ha scritto: > > Currently the pseries machine emulation does not support DMA for emulated > > PCI devices, because the PAPR spec always requires a (guest visible, > > paravirtualized) IOMMU which was not implemented. Now that we have > > infrastructure for IOMMU emulation, we can correct this and allow PCI DMA > > for pseries. > > > > With the existing PAPR IOMMU code used for VIO devices, this is almost > > trivial. We use a single DMAContext for each (virtual) PCI host bridge, > > which is the usual configuration on real PAPR machines (which often have > > _many_ PCI host bridges). > > What about virtio?
virtio doesn't use virtualized PCI DMA, it uses direct hypervisor access to guest memory, by guest physical address. It *shouldn't*, but it does - that's the way it's specced and that's the way the guest kernel expects it to be. It could be fixed with a new feature bit, but that's a project for another day. -- 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