Skip to content

Commit da8669f

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Drop stop marker messages
The page fault handling framework in the IOMMU core explicitly states that it doesn't handle PCI PASID Stop Marker and the IOMMU drivers must discard them before reporting faults. This handles Stop Marker messages in prq_event_thread() before reporting events to the core. The VT-d driver explicitly drains the pending page requests when a CPU page table (represented by a mm struct) is unbound from a PASID according to the procedures defined in the VT-d spec. The Stop Marker messages do not need a response. Hence, it is safe to drop the Stop Marker messages silently if any of them is found in the page request queue. Fixes: d5b9e4b ("iommu/vt-d: Report prq to io-pgfault framework") Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jacob Pan <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 59bf355 commit da8669f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/iommu/intel/svm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@ static irqreturn_t prq_event_thread(int irq, void *d)
757757
goto bad_req;
758758
}
759759

760+
/* Drop Stop Marker message. No need for a response. */
761+
if (unlikely(req->lpig && !req->rd_req && !req->wr_req))
762+
goto prq_advance;
763+
760764
if (!svm || svm->pasid != req->pasid) {
761765
/*
762766
* It can't go away, because the driver is not permitted

0 commit comments

Comments
 (0)