iommu: Make iommu_queue_iopf() more generic
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 12 Feb 2024 01:22:20 +0000 (09:22 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 16 Feb 2024 14:19:28 +0000 (15:19 +0100)
commit351ffcb11ca0ff64e399982e279cfa131e7cb1aa
tree5c09a70230cddcad33684248baf594f88c43af0d
parent24b5d268b5ab95c12b5ae58a054d04bfa442f58f
iommu: Make iommu_queue_iopf() more generic

Make iommu_queue_iopf() more generic by making the iopf_group a minimal
set of iopf's that an iopf handler of domain should handle and respond
to. Add domain parameter to struct iopf_group so that the handler can
retrieve and use it directly.

Change iommu_queue_iopf() to forward groups of iopf's to the domain's
iopf handler. This is also a necessary step to decouple the sva iopf
handling code from this interface.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Tested-by: Yan Zhao <yan.y.zhao@intel.com>
Tested-by: Longfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/20240212012227.119381-10-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/io-pgfault.c
drivers/iommu/iommu-sva.c
drivers/iommu/iommu-sva.h
include/linux/iommu.h