]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Drop stop marker messages
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 23 Apr 2022 08:23:30 +0000 (16:23 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 28 Apr 2022 09:01:53 +0000 (11:01 +0200)
commit6184e0b97ec907ca7f89948f4c4a567dfba55add
tree61d927baed33253ab31cdf3c145d9b994d20b212
parentc1e054fca6ee5469eb0826d8d605ac89240da2ff
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: 65f8155e3e718 ("iommu/vt-d: Report prq to io-pgfault framework")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220421113558.3504874-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20220423082330.3897867-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/svm.c