[PATCH V2 0/4] PASID support for Intel IOMMU

Jason Wang posted 4 patches 2 years, 1 month ago
Failed in applying to current master (apply log)
There is a newer version of this series
hw/i386/intel_iommu.c          | 641 ++++++++++++++++++++++-----------
hw/i386/intel_iommu_internal.h |  14 +-
hw/i386/trace-events           |   2 +
include/hw/i386/intel_iommu.h  |  18 +-
include/hw/pci/pci_bus.h       |   2 +
5 files changed, 450 insertions(+), 227 deletions(-)
[PATCH V2 0/4] PASID support for Intel IOMMU
Posted by Jason Wang 2 years, 1 month ago
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.

This series depends on the fixes[3][4] of intel-iommu:

Changes since V1:

- speed up IOMMU translation when RID2PASID is not used
- remove the unnecessary L1 PASID invalidation descriptor support
- adding support for cacthing 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
[3] https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg02173.html
[4] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg04441.html

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          | 641 ++++++++++++++++++++++-----------
 hw/i386/intel_iommu_internal.h |  14 +-
 hw/i386/trace-events           |   2 +
 include/hw/i386/intel_iommu.h  |  18 +-
 include/hw/pci/pci_bus.h       |   2 +
 5 files changed, 450 insertions(+), 227 deletions(-)

-- 
2.25.1