Skip to content

RFC arm-smmu-v3 tlbi-on-map option

Eric Auger linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 14 repliesIn review
  2. v1 RFC2 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- add support for ACPI probing
- add implementation defined CMD_TLBI_NH_VA_AM which allows IOVA range invalidation

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iommu/io-pgtable-arm: flush TLBs when IO_PGTABLE_QUIRK_TLBI_ON_MAPdrivers/iommu/io-pgtable-arm.c+12 -20 replies
2/4iommu/arm-smmu-v3: Add tlbi_on_map optionDocumentation/devicetree/bindings/iommu/arm,smmu-v3.txt drivers/iommu/arm-smmu-v3.c+9 -014 replies
3/4iommu/arm-smmu-v3: Add hypothetical caching mode modeldrivers/iommu/arm-smmu-v3.c+7 -00 replies
4/4iommu/arm-smmu-v3: add CMD_TLBI_NH_VA_AM command for iova range invalidationdrivers/iommu/arm-smmu-v3.c+20 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC v2 0/4] arm-smmu-v3 tlbi-on-map option

This series adds a new tlbi-on-map option to the smmuv3 driver. When set, the IO_PGTABLE_QUIRK_TLBI_ON_MAP quirk is applied for LPAE tables and the smmuv3 driver sends TLB invalidations on map.

This mode is useful when running the driver on a guest as it allows the virtualizer to trap any change to the translation structures. This is similar to the Intel vtd caching mode (CM).

This is mandated for vSMMUv3/VFIO integration where guest mappings must be applied to the physical IOMMU and also for VHOST.

When this mode is set we use an implementation defined TLBI invalidation command which allows to invalidate a range of IOVA instead of using CMD_TLBI_NH_VA which works by page. This is needed for sake of efficiency when running DPDK use case on guest as DPDK uses hugepages. As far as I understand the intel IOMMU provides such invalidation command (using the address mask parameter) and at the moment, I haven't found something similar in the smmuv3 architecture specification.

Best Regards

Eric

Git: complete series available at
https://github.com/eauger/linux/tree/v4.13-rc3-tlbi-on-map-rfcv2

History:
v1 -> v2:
- add support for ACPI probing
- add implementation defined CMD_TLBI_NH_VA_AM which allows IOVA range invalidation

Eric Auger (4):
iommu/io-pgtable-arm: flush TLBs when IO_PGTABLE_QUIRK_TLBI_ON_MAP iommu/arm-smmu-v3: Add tlbi_on_map option iommu/arm-smmu-v3: Add hypothetical caching mode model iommu/arm-smmu-v3: add CMD_TLBI_NH_VA_AM command for iova range
invalidation

 .../devicetree/bindings/iommu/arm,smmu-v3.txt      |  4 +++
 drivers/iommu/arm-smmu-v3.c                        | 34 ++++++++++++++++++++--
 drivers/iommu/io-pgtable-arm.c                     | 14 +++++++--
 3 files changed, 48 insertions(+), 4 deletions(-)
Signature · 1 line
2.5.5