ATS/PASID SVA support and PRI-less fault servicing
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | drm/xe/pci: log ATS/PASID enablement state at probedrivers/ drivers/ | +13 | 0 replies | |
| 2/6 | drm/xe/vm: Setup SVA infrastructure for PASID supportdrivers/ drivers/ | +46 | 0 replies | |
| 3/6 | drm/xe/vm: add helper to retrieve VM SVA PASIDdrivers/ drivers/ | +18 | 0 replies | |
| 4/6 | drm/xe/lrc: program CTX_SYS_PASID for ATS/PASID-enabled contextsdrivers/ drivers/ | +43 | 0 replies | |
| 5/6 | drm/xe/pci: add helper for ATS/PASID without PRIdrivers/ | +9 | 0 replies | |
| 6/6 | drm/xe/pagefault: add CPU mirror VMA for SVA faults without PRIdrivers/ drivers/ | +55 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] ATS/PASID SVA support and PRI-less fault servicing
This series adds initial Shared Virtual Addressing (SVA) support for xe on platforms where ATS and PASID are available but PRI is not enabled or not supported.
For SVA, the device must be able to issue memory transactions tagged with a PASID so that address translation is performed in the process address space rather than in a driver owned address space. This series adds the xe side infrastructure needed for that flow: VM support for SVA PASID state, PASID retriveal helpers, and programming of CTX_SYS_PASID for ATS and PASID enabled contexts.
On systems with PRI, device page faults can be surfaced and resolved through the hardware page request interface, so the driver does not need to implement a separate fault servicing path for SVA.
On non PRI systems, that hardware assisted fault path is unavailable.In that case, the driver still needs a way to resolve faults against the backing process address space so execution can proceed.
To support that case, this series introduces a CPU mirror VMA and uses it as part of a driver managed SVM path for SVA faults without PRI.The purpose of the CPU mirror VMA is to provide a CPU side VMA representation for the address range being accesses through SVA,so the driver can rely on the kernel MM/VMA machinery to validate mappings and resolve backing pages for fault handling in the absence of PRI.In other words, since the device cannot issue PRI requests, the driver needs a CPU visible VMA context that mirrors the GPU SVA range closely enough to let faults be service through normal MM paths.
At a high level, this series does the following:
1. log ATS/PASID enablement state during probe,
2. add VM infrastructure needed for SVA PASID support,
3. add a helper to retrieve the VM SVA PASID,
4. program CTX_SYS_PASID for ATS/PASID-enabled contexts,
5. add a PCI helper for ATS/PASID operation without PRI,
6. add a CPU mirror VMA for handling SVA faults on non PRI platforms
Patches 1-5 provide the ATS/PASID and VM/context plumbing needed for this flow and have been validated internally.Patch 6 adds the non PRI fault servicing path, and feedback on that overall approach would be especially appreciated.
Himal Prasad Ghimiray (1):
drm/xe/vm: Setup SVA infrastructure for PASID support
Nareshkumar Gollakoti (5):
drm/xe/pci: log ATS/PASID enablement state at probe drm/xe/vm: add helper to retrieve VM SVA PASID drm/xe/lrc: program CTX_SYS_PASID for ATS/PASID-enabled contexts drm/xe/pci: add helper for ATS/PASID without PRI drm/xe/pagefault: add CPU mirror VMA for SVA faults without PRI
drivers/gpu/drm/xe/regs/xe_lrc_layout.h | 6 +++ drivers/gpu/drm/xe/xe_lrc.c | 37 ++++++++++++++++ drivers/gpu/drm/xe/xe_pagefault.c | 49 ++++++++++++++++++++++ drivers/gpu/drm/xe/xe_pagefault_types.h | 6 +++ drivers/gpu/drm/xe/xe_pci.c | 7 ++++ drivers/gpu/drm/xe/xe_pci.h | 15 +++++++ drivers/gpu/drm/xe/xe_vm.c | 56 +++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_vm.h | 2 + drivers/gpu/drm/xe/xe_vm_types.h | 6 +++ 9 files changed, 184 insertions(+)
Signature · 1 line
2.43.0