qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

intel-iommu: pass in address space when page walk

We pass in the VTDAddressSpace too. It'll be used in the follow up
patches.

CC: QEMU Stable <qemu-stable@nongnu.org>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2f764fa87d2a81812b313dd6d998e10126292653)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>

authored by

Peter Xu and committed by
Michael Roth
78b85a98 28048f7b

+4
+4
hw/i386/intel_iommu.c
··· 754 754 * @hook_fn: hook func to be called when detected page 755 755 * @private: private data to be passed into hook func 756 756 * @notify_unmap: whether we should notify invalid entries 757 + * @as: VT-d address space of the device 757 758 * @aw: maximum address width 758 759 */ 759 760 typedef struct { 761 + VTDAddressSpace *as; 760 762 vtd_page_walk_hook hook_fn; 761 763 void *private; 762 764 bool notify_unmap; ··· 1463 1465 .private = (void *)&vtd_as->iommu, 1464 1466 .notify_unmap = true, 1465 1467 .aw = s->aw_bits, 1468 + .as = vtd_as, 1466 1469 }; 1467 1470 1468 1471 /* ··· 2943 2946 .private = (void *)n, 2944 2947 .notify_unmap = false, 2945 2948 .aw = s->aw_bits, 2949 + .as = vtd_as, 2946 2950 }; 2947 2951 2948 2952 vtd_page_walk(&ce, 0, ~0ULL, &info);