iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/5] iommu/vt-d: Add page request draining support
@ 2020-05-12  0:53 Lu Baolu
  2020-05-12  0:53 ` [PATCH v5 1/5] iommu/vt-d: Multiple descriptors per qi_submit_sync() Lu Baolu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Lu Baolu @ 2020-05-12  0:53 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kevin.tian, ashok.raj, linux-kernel, iommu

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 chapter 7.10 in the VT-d
specification specifies the software steps to drain pending page
requests and responses.

This includes two parts:
 - PATCH 1/5 ~ 2/5: refactor the qi_submit_sync() to support multiple
   descriptors per submission which will be used in the following
   patch.
 - PATCH 3/5 ~ 5/5: add page request drain support after a pasid entry
   is torn down.

This series is based on Jacob's vSVA support hence the guest pasid
could also be drained.

https://lkml.org/lkml/2020/4/21/1038

Best regards,
baolu

Change log:
v4->v5:
  - Only set FPD bit in PASID entry when entry changed from present
    to non-present;
  - Check pri_support in drain helper;
  - Refine the wait/completion usage.

v3->v4:
  - Remove prq drain in mm notifier;
  - Set PASID FPD bit when pasid is cleared in mm notifier and clear
    it in unbound().

 v2->v3:
  - Address Kevin's review comments
    - Squash the first 2 patches together;
    - The prq thread is serialized, no need to consider reentrance;
    - Ensure no new-coming prq before drain prq in queue;
    - Handle page request overflow case.

 v1->v2:
  - Fix race between multiple prq handling threads.

Lu Baolu (5):
  iommu/vt-d: Multiple descriptors per qi_submit_sync()
  iommu/vt-d: debugfs: Add support to show inv queue internals
  iommu/vt-d: Disable non-recoverable fault processing before unbind
  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-iommu.c         |   4 +-
 drivers/iommu/intel-pasid.c         |  30 +++++--
 drivers/iommu/intel-pasid.h         |   4 +-
 drivers/iommu/intel-svm.c           | 128 ++++++++++++++++++++++++----
 drivers/iommu/intel_irq_remapping.c |   2 +-
 include/linux/intel-iommu.h         |  13 ++-
 8 files changed, 253 insertions(+), 53 deletions(-)

-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-05-12  0:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12  0:53 [PATCH v5 0/5] iommu/vt-d: Add page request draining support Lu Baolu
2020-05-12  0:53 ` [PATCH v5 1/5] iommu/vt-d: Multiple descriptors per qi_submit_sync() Lu Baolu
2020-05-12  0:53 ` [PATCH v5 2/5] iommu/vt-d: debugfs: Add support to show inv queue internals Lu Baolu
2020-05-12  0:53 ` [PATCH v5 3/5] iommu/vt-d: Disable non-recoverable fault processing before unbind Lu Baolu
2020-05-12  0:53 ` [PATCH v5 4/5] iommu/vt-d: Add page request draining support Lu Baolu
2020-05-12  0:53 ` [PATCH v5 5/5] iommu/vt-d: Remove redundant IOTLB flush Lu Baolu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).