Skip to content

iommu: Some IOVA code reorganisation

John Garry linux-iommu lkml virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5iova: Move fast alloc size roundup into alloc_iova_fast()drivers/iommu/dma-iommu.c drivers/iommu/iova.c drivers/vdpa/vdpa_user/iova_domain.c+9 -166 replies
2/5iommu: Separate flush queue memories from IOVA domain structuredrivers/iommu/dma-iommu.c drivers/iommu/iova.c include/linux/iova.h+94 -710 replies
3/5iommu: Move IOVA flush queue code to dma-iommudrivers/iommu/dma-iommu.c drivers/iommu/iova.c include/linux/iova.h+252 -2780 replies
4/5iommu: Separate IOVA rcache memories from iova_domain structuredrivers/iommu/dma-iommu.c drivers/iommu/iova.c drivers/vdpa/vdpa_user/iova_domain.c +2 more+166 -903 replies
5/5iommu/iova: Avoid double-negatives in magazine helpersdrivers/iommu/iova.c+17 -122 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchZhen LeiWill DeaconXie YongjiJason WangMichael S. Tsirkin
1/5A-b R-b A-b A-b
2/5
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/5] iommu: Some IOVA code reorganisation

The IOVA domain structure is a bit overloaded, holding:
- IOVA tree management
- FQ control
- IOVA rcache memories

Indeed only a couple of IOVA users use the rcache, and only dma-iommu.c uses the FQ feature.

This series separates out that structure. In addition, it moves the FQ code into dma-iommu.c . This is not strictly necessary, but it does make it easier for the FQ domain lookup the rcache domain.

The rcache code stays where it is, as it may be reworked in future, so there is not much point in relocating and then discarding.

This topic was initially discussed and suggested (I think) by Robin here:
https://lore.kernel.org/linux-iommu/[email protected]/

I also added in another old patch to avoid double-negatives now that the error handling is a bit better for IOVA init code:
https://lore.kernel.org/linux-iommu/YAVeDOiKBEKZ2Tdq@myrica/

Baseline is v5.15-rc2

John Garry (5):
iova: Move fast alloc size roundup into alloc_iova_fast()
iommu: Separate flush queue memories from IOVA domain structure
iommu: Move IOVA flush queue code to dma-iommu
iommu: Separate IOVA rcache memories from iova_domain structure iommu/iova: Avoid double-negatives in magazine helpers

 drivers/iommu/dma-iommu.c            | 341 +++++++++++++++++++++++---
 drivers/iommu/iova.c                 | 343 ++++++++-------------------
 drivers/vdpa/vdpa_user/iova_domain.c |  61 ++---
 drivers/vdpa/vdpa_user/iova_domain.h |   4 +-
 include/linux/iova.h                 |  82 +------
 5 files changed, 451 insertions(+), 380 deletions(-)
Signature · 1 line
2.26.2