RE: [PATCH v2 0/7] iommu/vt-d: Add page request draining support

From: Tian, Kevin
Date: Wed Apr 15 2020 - 04:00:50 EST


> From: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Sent: Wednesday, April 15, 2020 1:26 PM
>
> When a PASID is stopped or terminated, there can be pending PRQs
> (requests that haven't received responses) in the software and
> remapping hardware. The pending page requests must be drained
> so that the pasid could be reused. The register level interface
> for page request draining is defined in 7.11 of the VT-d spec.
> This series adds the support for page requests draining.

7.11 doesn't include register-level interface. It just talks about
the general requirements on system software, endpoint device
and its driver.

Thanks
Kevin

>
> This includes two parts:
> - PATCH 1/7 ~ 3/7: refactor the qi_submit_sync() to support
> multiple descriptors per submission which will be used by
> PATCH 6/7.
> - PATCH 4/7 ~ 7/7: add page request drain support after a
> pasid entry is torn down due to an unbind operation.
>
> Please help to review.
>
> Best regards,
> baolu
>
> Change log:
> v1->v2:
> - Fix race between multiple prq handling threads
>
> Lu Baolu (7):
> iommu/vt-d: Refactor parameters for qi_submit_sync()
> iommu/vt-d: Multiple descriptors per qi_submit_sync()
> iommu/vt-d: debugfs: Add support to show inv queue internals
> iommu/vt-d: Refactor prq_event_thread()
> iommu/vt-d: Save prq descriptors in an internal list
> iommu/vt-d: Add page request draining support
> iommu/vt-d: Remove redundant IOTLB flush
>
> drivers/iommu/dmar.c | 63 +++--
> drivers/iommu/intel-iommu-debugfs.c | 62 +++++
> drivers/iommu/intel-pasid.c | 4 +-
> drivers/iommu/intel-svm.c | 383 ++++++++++++++++++----------
> drivers/iommu/intel_irq_remapping.c | 2 +-
> include/linux/intel-iommu.h | 12 +-
> 6 files changed, 369 insertions(+), 157 deletions(-)
>
> --
> 2.17.1