iommu: Make iopf_group_response() return void
authorLu Baolu <baolu.lu@linux.intel.com>
Mon, 12 Feb 2024 01:22:26 +0000 (09:22 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 16 Feb 2024 14:19:36 +0000 (15:19 +0100)
commitb554e396e51ce3d378a560666f85c6836a8323fd
treec3fb5ce903c7ece43461c3b898803af3b6569554
parent19911232713573a2ebea84a25bd4d71d024ed86b
iommu: Make iopf_group_response() return void

The iopf_group_response() should return void, as nothing can do anything
with the failure. This implies that ops->page_response() must also return
void; this is consistent with what the drivers do. The failure paths,
which are all integrity validations of the fault, should be WARN_ON'd,
not return codes.

If the iommu core fails to enqueue the fault, it should respond the fault
directly by calling ops->page_response() instead of returning an error
number and relying on the iommu drivers to do so. Consolidate the error
fault handling code in the core.

Co-developed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240212012227.119381-16-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/intel/iommu.h
drivers/iommu/intel/svm.c
drivers/iommu/io-pgfault.c
include/linux/iommu.h