x86/iommu: re-arrange arch_iommu to separate common fields...
authorPaul Durrant <pdurrant@amazon.com>
Tue, 4 Aug 2020 13:41:56 +0000 (14:41 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Aug 2020 15:14:21 +0000 (16:14 +0100)
commite0f25d134c85f4ee0e7c1602fa8016e50937e468
tree6969bc4b2d94ac1b431a853445bf12ce40d4c6f6
parent9ce2befd953274c9f919fdf55bb13516876148aa
x86/iommu: re-arrange arch_iommu to separate common fields...

... from those specific to VT-d or AMD IOMMU, and put the latter in a union.

There is no functional change in this patch, although the initialization of
the 'mapped_rmrrs' list occurs slightly later in iommu_domain_init() since
it is now done (correctly) in VT-d specific code rather than in general x86
code.

NOTE: I have not combined the AMD IOMMU 'root_table' and VT-d 'pgd_maddr'
      fields even though they perform essentially the same function. The
      concept of 'root table' in the VT-d code is different from that in the
      AMD code so attempting to use a common name will probably only serve
      to confuse the reader.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/tboot.c
xen/drivers/passthrough/amd/iommu_guest.c
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/x86/iommu.c
xen/include/asm-x86/iommu.h