Skip to content

RFC mm: vcm: The Virtual Memory Manager for multiple IOMMUs

KyongHo Cho linux-arm-kernel linux-media linux-mm linux-samsung-soc lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest8 patches 0 repliesNew
  2. v1 RFC7 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mm: vcm: Virtual Contiguous Memory framework addedDocumentation/00-INDEX Documentation/virtual-contiguous-memory.txt include/linux/vcm-drv.h +4 more+1434 -00 replies
2/8mm: vcm: reference counting on a reservation addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm.h mm/Kconfig +1 more+94 -00 replies
3/8mm: vcm: physical memory allocator addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm-drv.h mm/Kconfig +1 more+377 -00 replies
4/8mm: vcm: VCM VMM driver addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm.h mm/vcm.c+140 -30 replies
5/8mm: vcm: VCM MMU wrapper addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm-drv.h mm/Kconfig +1 more+390 -00 replies
6/8mm: vcm: VCM One-to-One wrapper addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm-drv.h mm/Kconfig +1 more+174 -00 replies
7/8mm: vcm: vcm-cma: VCM CMA driver addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm-cma.h mm/Kconfig +2 more+163 -10 replies
8/8mm: vcm: Sample driver addedDocumentation/virtual-contiguous-memory.txt include/linux/vcm-sample.h mm/Kconfig +2 more+166 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [RFCv2,0/8] mm: vcm: The Virtual Memory Manager for multiple IOMMUs

Hello,

The VCM is a framework to deal with multiple IOMMUs in a system
with intuitive and abstract objects
These patches are the bugfix and enhanced version of previous RFC by Michal Nazarewicz.
(https://patchwork.kernel.org/patch/157451/)

It is introduced by Zach Pfeffer and implemented by Michal Nazarewicz.
These patches include entirely new implementation of VCM than the one submitted by Zach Pfeffer.

The prerequisites of these patches are the followings by Michal Nazarewicz:
https://patchwork.kernel.org/patch/340281/
https://patchwork.kernel.org/patch/414381/
https://patchwork.kernel.org/patch/414541/

In addition to the above patches,
the prerequisites of "[RFCv2,7/8] mm: vcm: vcm-cma: VCM CMA driver added" is CMA RFCv8 introduced by Michal Nazarewicz:
https://patchwork.kernel.org/patch/414351/

The VCM also works correctly without "[RFC,6/7] mm: vcm: vcm-cma: VCM CMA driver added"

The last patch, "[RFC,7/7] mm: vcm: Sample driver added" is not the one to be submitted but is an example to show how to use the VCM.

The VCM provides generic interfaces and objects to deal with IOMMUs in various architectures especially the ones that embed multiple IOMMUs including GART.

Chagelog:
v2: 1. Added reference counting on a reservation.
When vcm_reserve() creates a reservation, it sets the reference counter of the reservation to 1. The ownership of the reservation is only owned by the caller of vcm_reserve. If the caller passes the reservation to another callee functions, the callee functions must increment the reference counter with vcm_ref_reserve() to set the ownership of the reservation. To release the ownership, just call vcm_unreserve(). vcm_unreserve decrements the reference counter of the given reservation. vcm_unreserve() eventually unreserves the reservation when its reference counter becomes 0.
2. Applied the design changes of CMA by Michal Nazarewicz.
Since it is dramatically changed, vcm-cma also followed.

Patch list:
[RFCv2,1/8] mm: vcm: Virtual Contiguous Memory framework added [RFCv2,2/8] mm: vcm: reference counting on a reservation added [RFCv2,3/8] mm: vcm: physical memory allocator added [RFCv2,4/8] mm: vcm: VCM VMM driver added [RFCv2,5/8] mm: vcm: VCM MMU wrapper added [RFCv2,6/8] mm: vcm: VCM One-to-One wrapper added [RFCv2,7/8] mm: vcm: vcm-cma: VCM CMA driver added [RFCv2,8/8] mm: vcm: Sample driver added

Summery:

Documentation/00-INDEX                      |    2 +
Documentation/virtual-contiguous-memory.txt |  940 +++++++++++++++++++++++++
include/linux/vcm-cma.h                     |   38 +
include/linux/vcm-drv.h                     |  326 +++++++++
include/linux/vcm-sample.h                  |   30 +
include/linux/vcm.h                         |  311 +++++++++
mm/Kconfig                                  |   79 +++
mm/Makefile                                 |    3 +
mm/vcm-cma.c                                |   99 +++
mm/vcm-sample.c                             |  119 ++++
mm/vcm.c                                    |  987 +++++++++++++++++++++++++++
11 files changed, 2934 insertions(+), 0 deletions(-)

create mode 100644 Documentation/virtual-contiguous-memory.txt create mode 100644 include/linux/vcm-cma.h
create mode 100644 include/linux/vcm-drv.h
create mode 100644 include/linux/vcm-sample.h
create mode 100644 include/linux/vcm.h
create mode 100644 mm/vcm-cma.c
create mode 100644 mm/vcm-sample.c
create mode 100644 mm/vcm.c