This patch series represents my attempt at better integration of the vfio code with qemu's DMAContext and other guest IOMMU handling code, as discussed by Alex Williamson and myself on IRC. It opens the way for using VFIO with a guest system containing an IOMMU by passing guest IOMMU operations through to the host IOMMU via VFIO. That's opposed to the present model of having no IOMMU in the guest, and simply mapping all guest RAM into the host IOMMU.
I hit some complications with some changes in the guest iommu infrastructure since it went in. Patches 1 & 2 clean that up, patches 3-5 do the necessary VFIO infrastructure changes.