Skip to content

mm/cma: accept memory of CMA areas reserved with memblock_reserve()

Mike Rapoport (Microsoft) linux-mm lkml stable 1 version Applied

Status from this message: [merged mm-hotfixes-stable] mm-cma-accept-memory-of-cma-areas-reserved-at-a-fixed-address.patch removed from -mm tree

Get series with b4
b4 am [email protected] change-id 20261029-cma-multi-97fd4e58aa08

Versions newest first

  1. v1 Latest2 patches 9 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm/cma: accept memory of multi-range CMA areasmm/cma.c+2 -03 repliesApplied
2/2mm/cma: accept memory of CMA areas reserved at a fixed addressmm/cma.c+2 -00 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKiryl Shutsemau (Meta)Pankaj Gupta
SeriesR-b R-b T-b
1/2
2/2

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

Read the v1 thread

Cover letter [PATCH 0/2] mm/cma: accept memory of CMA areas reserved with memblock_reserve()

Pages of allocated CMA areas are released to the buddy allocator with __free_pages(), which does not check for unaccepted memory.

This usually works because memblock accepts the memory it allocates.

However, multi-range CMA areas, used by hugetlb_cma, and fixed CMA areas requested with cma=<size>@<base> are reserved with memblock_reserve() and their memory is never accepted.

On TDX and SEV-SNP guests the first access to such a page is fatal.

To ease the backporting, each case is addressed by a separate patch:
- patch 1 accepts the memory of multi-range CMA areas
- patch 2 does the same for the fixed CMA areas

The second patch won't apply cleanly to 6.6 and 6.12, but I believe the stable team LLMs will take care of that :)

---
Mike Rapoport (Microsoft) (2):
mm/cma: accept memory of multi-range CMA areas mm/cma: accept memory of CMA areas reserved at a fixed address

 mm/cma.c | 4 ++++
 1 file changed, 4 insertions(+)

---
base-commit: 5b0764a53235d3c77e1ed674e836e1b3fe1a4b1f
change-id: 20261029-cma-multi-97fd4e58aa08

--
Sincerely yours,
Mike.