Here are few patches to prepare an existing listener for handling memory preregistration for SPAPR guests running on POWER8.
This used to be a part of DDW patchset but now is separated as requested. I left versions in changelog of 5/5 for convenience. Regarding 1/5, there is a question - in reality DMA windows are always a lot bigger than a single 4K page and aligned to 32/64MB, may be only use there qemu_real_host_page_mask? Please comment. Thanks! Alexey Kardashevskiy (5): vfio: Switch from TARGET_PAGE_MASK to qemu_real_host_page_mask vfio: Skip PCI BARs in memory listener vfio: Store IOMMU type in container vfio: Refactor memory listener to accommodate more IOMMU types vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering) hw/vfio/common.c | 164 ++++++++++++++++++++++++++++-------------- hw/vfio/pci.c | 30 ++++---- include/hw/vfio/vfio-common.h | 1 + trace-events | 2 + 4 files changed, 129 insertions(+), 68 deletions(-) -- 2.4.0.rc3.8.gfb3e7d5