AMD/IOMMU: pass IOMMU to iterate_ivrs_entries() callback
authorJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 10:05:27 +0000 (12:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 22 Jul 2019 10:05:27 +0000 (12:05 +0200)
commit4e8e9875622cbdb24469c43ca5f08f83dc59bbca
tree86c380531afbe51b833710659cec83712b9f5d66
parentdf2030c34cc9161dd9e35c0e8c55057e101ac81a
AMD/IOMMU: pass IOMMU to iterate_ivrs_entries() callback

Both users will want to know IOMMU properties (specifically the IRTE
size) subsequently. Leverage this to avoid pointless calls to the
callback when IVRS mapping table entries are unpopulated. To avoid
leaking interrupt remapping tables (bogusly) allocated for IOMMUs
themselves, this requires suppressing their allocation in the first
place, taking a step further what commit 757122c0cf ('AMD/IOMMU: don't
"add" IOMMUs') had done.

Additionally suppress the call for alias entries, as again both users
don't care about these anyway. In fact this eliminates a fair bit of
redundancy from dump output.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Brian Woods <brian.woods@amd.com>
xen/drivers/passthrough/amd/iommu_acpi.c
xen/drivers/passthrough/amd/iommu_init.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/include/asm-x86/amd-iommu.h
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h