In the current iopf processing flow in iommu, the CPU can be preempted, which may lead to a possible timeout problem in iopf processing.
For this timeout problem, a timeout timer function has been added, and the lock inside the response of iopf has been optimized.
The current solution refers to the solution part of this group of patches from Intel: "iommu: handle page response timeout".
However, it is different from Intel's implementation scheme. For the specific scheme description, please refer to the description information of patchs.
Changes v2 -> v3 - Modify the configuration method of the timeout parameter.
Changes v1 -> v2 - Add timeout time CONFIG configuration function.
Longfang Liu (3): iommu/iopf: add a timeout parameter for IOPF iommu/iopf: update the lock of the response iommu/iopf: add timeout function to iommu
.../admin-guide/kernel-parameters.txt | 8 ++ drivers/iommu/io-pgfault.c | 95 ++++++++++++++++++- drivers/iommu/iommu.c | 14 +-- include/linux/iommu.h | 2 +- 4 files changed, 109 insertions(+), 10 deletions(-)