Skip to content

PASID support for Intel IOMMU

Jason Wang qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 11 repliesIn review
  2. v44 patches 5 repliesSuperseded
  3. v34 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches38 repliesSuperseded
v13 patches23 repliesSuperseded

Changes in v5 from the cover letter

- rename vtd_report_qualify_fault() to vtd_report_fault()
- Tweak the code to avoid using ret variable when getting rid2pasid

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4intel-iommu: don't warn guest errors when getting rid2pasid entryhw/i386/intel_iommu.c+6 -61 reply
2/4intel-iommu: drop VTDBushw/i386/intel_iommu.c include/hw/i386/intel_iommu.h+118 -1274 replies
3/4intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a functionhw/i386/intel_iommu.c+28 -141 reply
4/4intel-iommu: PASID supporthw/i386/intel_iommu.c hw/i386/intel_iommu_internal.h hw/i386/trace-events +2 more+339 -1045 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPeter XuYi Liu
1/4R-b R-b
2/4R-b R-b
3/4R-b R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH V5 0/4] PASID support for Intel IOMMU

Hi All:

This series tries to introduce PASID support for Intel IOMMU. The work is based on the previous scalabe mode support by implement the ECAP_PASID. A new "x-pasid-mode" is introduced to enable this mode. All internal vIOMMU codes were extended to support PASID instead of the current RID2PASID method. The code is also capable of provisiong address space with PASID. Note that no devices can issue PASID DMA right now, this needs future work.

This will be used for prototying PASID based device like virtio or future vPASID support for Intel IOMMU.

Test has been done with the Linux guest with scalalbe mode enabled and disabled. A virtio prototype[1][2] that can issue PAISD based DMA request were also tested, different PASID were used in TX and RX in those testing drivers.

Changes since V4:

- rename vtd_report_qualify_fault() to vtd_report_fault()
- Tweak the code to avoid using ret variable when getting rid2pasid

Changes since V3:

- rearrange the member for vtd_iotlb_key structure
- reorder the pasid parameter ahead of addr for vtd_lookup_iotlb()
- allow access size from 1 to 8 for vtd_mem_ir_fault_ops

Changes since V2:

- use PCI_BUILD_BDF() instead of vtd_make_source_id()
- Tweak the comments above vtd_as_hash()
- use PCI_BUS_NUM() instead of open coding
- rename vtd_as to vtd_address_spaces
- rename vtd_qualify_report_fault() to vtd_report_qualify_fault()
- forbid device-iotlb with PASID
- report PASID based qualified fault
- log PASID during errors

Changes since V1:

- speed up IOMMU translation when RID2PASID is not used
- remove the unnecessary L1 PASID invalidation descriptor support
- adding support for catching the translation to interrupt range when in the case of PT and scalable mode
- refine the comments to explain the hash algorithm used in IOTLB lookups

Please review.

[1] https://github.com/jasowang/qemu.git virtio-pasid
[2] https://github.com/jasowang/linux.git virtio-pasid

Jason Wang (4):
intel-iommu: don't warn guest errors when getting rid2pasid entry
intel-iommu: drop VTDBus
intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function
intel-iommu: PASID support

 hw/i386/intel_iommu.c          | 692 ++++++++++++++++++++++-----------
 hw/i386/intel_iommu_internal.h |  16 +-
 hw/i386/trace-events           |   2 +
 include/hw/i386/intel_iommu.h  |  18 +-
 include/hw/pci/pci_bus.h       |   2 +
 5 files changed, 485 insertions(+), 245 deletions(-)
Signature · 1 line
2.25.1