This patch is based on Aviv Ben-David (<address@hidden>)'s patch
upstream:
"IOMMU: enable intel_iommu map and unmap notifiers"
https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg01453.html
However I removed/fixed some content, and added my own codes.
Instead of translate() every page for iotlb invalidations (which is
slower), we walk the pages when needed and notify in a hook function.
This patch enables vfio devices for VT-d emulation.
Signed-off-by: Peter Xu<address@hidden>
---
hw/i386/intel_iommu.c | 66 +++++++++++++++++++++++++++++++++++++------
include/hw/i386/intel_iommu.h | 8 ++++++
2 files changed, 65 insertions(+), 9 deletions(-)