]> xenbits.xensource.com Git - xen.git/commit
x86/iommu: convert VT-d code to use new page table allocator
authorPaul Durrant <pdurrant@amazon.com>
Tue, 22 Sep 2020 08:20:39 +0000 (10:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Sep 2020 08:20:39 +0000 (10:20 +0200)
commit3eef6d07d722e90624fa692cdb9b76ebb2555cce
tree45e41b21f7a09f972be12e3075accc3b578f0a52
parentdd2cfba88c3d0e144ffec07c6b5b86e54a9d98a9
x86/iommu: convert VT-d code to use new page table allocator

This patch converts the VT-d code to use the new IOMMU page table allocator
function. This allows all the free-ing code to be removed (since it is now
handled by the general x86 code) which reduces TLB and cache thrashing as well
as shortening the code.

The scope of the mapping_lock in intel_iommu_quarantine_init() has also been
increased slightly; it should have always covered accesses to
'arch.vtd.pgd_maddr'.

NOTE: The common IOMMU needs a slight modification to avoid scheduling the
      cleanup tasklet if the free_page_table() method is not present (since
      the tasklet will unconditionally call it).

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/iommu.c