mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/4] Implement IOMMU SVA page fault processing error notifiers
@ 2025-07-10 13:42 Sergey Temerkhanov
  2025-07-10 13:42 ` [PATCH v1 1/4] iommu: Pass the Requester ID in the fault parameter structure Sergey Temerkhanov
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Sergey Temerkhanov @ 2025-07-10 13:42 UTC (permalink / raw)
  To: iommu, linux-kernel
  Cc: David Woodhouse, Lu Baolu, Joerg Roedel, Will Deacon,
	Robin Murphy, Sergey Temerkhanov

This series introduces a facility of notifying endpoint device
drivers of failing IOMMU page faults occurring for specific
Requester IDs.

According to the PCIe spec chapter "Page Request Group Response Message",
in case of Page Request processing failure (e.g., detecting attempt to
access pages with insufficient permissions, like writing to RO pages)
the system responds to the requester with a message containing a non-zero
response code. The requester device is then supposed to process that
response in implementation dependent way.

However, some endpoint hardware supporting SVA does not provide insight
on failed IO page faults, being limited to generic error reporting
(via interrupts and/or few register bits).

These series contain changes that provide endpoint device drivers
with the ability to retrieve information about page fault processing
errors (the most relevant being PASID and IOVA PFN).

Endpoint device drivers are able to set a callback functions
which will be called when a failing page fault (such as accessing pages
with mismatching attributes - e.g. writing to RO pages) occurs.

Normal processing path (i.e., swapping in or allocating backing physical
memory for non-present pages) is unaffected by these changes.

The endpoint driver code can then take appropriate actions, such as
fault reporting and recovery, sending signals to affected processes etc,
using the fault context provided in the fault parameter structure.


Sergey Temerkhanov (4):
  iommu: Pass the Requester ID in the fault parameter structure
  iommu: Add rid_notifier array to the dev_iommu structure
  iommu: Implement iommu_set_rid_fault_notifier()
  iommu: Notify requesters of IOMMU fault failures

 drivers/iommu/intel/prq.c  |  1 +
 drivers/iommu/io-pgfault.c | 53 ++++++++++++++++++++++++++++++++++++++
 drivers/iommu/iommu-priv.h | 11 ++++++++
 drivers/iommu/iommu-sva.c  | 19 +++++++++++++-
 drivers/iommu/iommu.c      | 21 +++++++++++++++
 include/linux/iommu.h      | 19 ++++++++++++++
 6 files changed, 123 insertions(+), 1 deletion(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-07-16 12:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-10 13:42 [PATCH v1 0/4] Implement IOMMU SVA page fault processing error notifiers Sergey Temerkhanov
2025-07-10 13:42 ` [PATCH v1 1/4] iommu: Pass the Requester ID in the fault parameter structure Sergey Temerkhanov
2025-07-10 13:42 ` [PATCH v1 2/4] iommu: Add rid_notifier array to the dev_iommu structure Sergey Temerkhanov
2025-07-10 13:42 ` [PATCH v1 3/4] iommu: Implement iommu_set_rid_fault_notifier() Sergey Temerkhanov
2025-07-10 13:42 ` [PATCH v1 4/4] iommu: Notify requesters of IOMMU fault failures Sergey Temerkhanov
2025-07-14 15:00   ` Jason Gunthorpe
2025-07-16 11:20     ` Temerkhanov, Sergey
2025-07-14 14:56 ` [PATCH v1 0/4] Implement IOMMU SVA page fault processing error notifiers Jason Gunthorpe
2025-07-16 11:07   ` Temerkhanov, Sergey
2025-07-16 12:10     ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®