summaryrefslogtreecommitdiff
path: root/include/uapi/linux/idxd.h
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2023-04-07 23:31:36 +0300
committerVinod Koul <vkoul@kernel.org>2023-04-12 20:48:45 +0300
commitc40bd7d9737bdcfb02d42765bc6c59b338151123 (patch)
tree77d85ebb3c91ae538bd6c18d857f38dff6cc4546 /include/uapi/linux/idxd.h
parentb022f59725f0ae846191abbd6d2e611d7f60f826 (diff)
downloadlinux-c40bd7d9737bdcfb02d42765bc6c59b338151123.tar.xz
dmaengine: idxd: process user page faults for completion record
DSA supports page fault handling through PRS. However, the DMA engine that's processing the descriptor is blocked until the PRS response is received. Other workqueues sharing the engine are also blocked. Page fault handing by the driver with PRS disabled can be used to mitigate the stalling. With PRS disabled while ATS remain enabled, DSA handles page faults on a completion record by reporting an event in the event log. In this instance, the descriptor is completed and the event log contains the completion record address and the contents of the completion record. Add support to the event log handling code to fault in the completion record and copy the content of the completion record to user memory. A bitmap is introduced to keep track of discarded event log entries. When the user process initiates ->release() of the char device, it no longer is interested in any remaining event log entries tied to the relevant wq and PASID. The driver will mark the event log entry index in the bitmap. Upon encountering the entries during processing, the event log handler will just clear the bitmap bit and skip the entry rather than attempt to process the event log entry. Tested-by: Tony Zhu <tony.zhu@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Co-developed-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Link: https://lore.kernel.org/r/20230407203143.2189681-10-fenghua.yu@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/uapi/linux/idxd.h')
-rw-r--r--include/uapi/linux/idxd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
index e86199d09a91..4b584d5afd87 100644
--- a/include/uapi/linux/idxd.h
+++ b/include/uapi/linux/idxd.h
@@ -135,6 +135,7 @@ enum dsa_completion_status {
DSA_COMP_HW_ERR1,
DSA_COMP_HW_ERR_DRB,
DSA_COMP_TRANSLATION_FAIL,
+ DSA_COMP_DRAIN_EVL = 0x26,
};
enum iax_completion_status {