Commit 4a2e7b3a authored by Tom Murphy's avatar Tom Murphy Committed by Jason Zeng
Browse files

iommu: Handle freelists when using deferred flushing in iommu drivers

mainline inclusion
from mainline-v5.11-rc1
commit 2a2b8eaa
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8C8B4
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a2b8eaa5b25668a6f717f94b55f4e3aaf87629d



-------------------------------------

Intel-SIG: commit  2a2b8eaa iommu: Handle freelists when using deferred
flushing in iommu drivers
Backport SPR and EMR IOMMU PCIe related upstream bugfixes to kernel 5.10.

Allow the iommu_unmap_fast to return newly freed page table pages and
pass the freelist to queue_iova in the dma-iommu ops path.

This is useful for iommu drivers (in this case the intel iommu driver)
which need to wait for the ioTLB to be flushed before newly
free/unmapped page table pages can be freed. This way we can still batch
ioTLB free operations and handle the freelists.

Signed-off-by: default avatarTom Murphy <murphyt7@tcd.ie>
Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
Tested-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Link: https://lore.kernel.org/r/20201124082057.2614359-2-baolu.lu@linux.intel.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
(cherry picked from commit 2a2b8eaa)
Signed-off-by: default avatarEthan Zhao <haifeng.zhao@linux.intel.com>
parent 30b9fd75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment