[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250710134215.97840-1-sergey.temerkhanov@intel.com>
Date: Thu, 10 Jul 2025 13:42:11 +0000
From: Sergey Temerkhanov <sergey.temerkhanov@...el.com>
To: iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: David Woodhouse <dwmw2@...radead.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Sergey Temerkhanov <sergey.temerkhanov@...el.com>
Subject: [PATCH v1 0/4] Implement IOMMU SVA page fault processing error notifiers
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
Powered by blists - more mailing lists