Skip to content

x86 PAT: track pfnmap mappings with remap_pfn_range and vm_insert_pfn

Venkatesh Pallipadi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8x86 PAT: store vm_pgoff for all linear_over_vma_region mappingsinclude/linux/mm.h mm/memory.c+12 -40 replies
2/8x86 PAT: set VM_PFNMAP flag in vm_insert_pfnmm/memory.c+2 -011 replies
3/8x86 PAT: Add follow_pfnmp_pte routine to help tracking pfnmap pagesinclude/linux/mm.h mm/memory.c+46 -02 replies
4/8x86 PAT: hooks in generic vm code to help archs to track pfnmap regionsinclude/linux/mm.h mm/memory.c+59 -13 replies
5/8x86 PAT: Implement track/untrack of pfnmap regions for x86arch/x86/include/asm/pgtable.h arch/x86/mm/pat.c+211 -02 replies
6/8x86 PAT: change pgprot_noncached to uc_minus instead of strong ucarch/x86/include/asm/pgtable.h arch/x86/include/asm/pgtable_32.h arch/x86/include/asm/pgtable_64.h+8 -150 replies
7/8x86 PAT: add pgprot_writecombine() interface for driversarch/x86/include/asm/pgtable.h arch/x86/mm/pat.c include/asm-generic/pgtable.h+15 -00 replies
8/8x86 PAT: update documentation to cover pgprot and remap_pfn related changesDocumentation/x86/pat.txt+24 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [patch 0/8] x86 PAT: track pfnmap mappings with remap_pfn_range and vm_insert_pfn

(Sorry about the duplicates. Resending as the original mails did not make it to
the list due to some errors in my email header)

Drivers use mmap followed by pgprot_* and remap_pfn_range or vm_insert_pfn, in order to export reserved memory to userspace. Currently, such mappings are not tracked and hence not kept consistent with other mappings (/dev/mem, pci resource, ioremap) for the sme memory, that may exist in the system.

The following patchset adds x86 PAT attribute tracking and untracking for pfnmap related APIs.

First four patches in the patchset are changing the generic mm code to fit in this tracking. Last four patches are x86 specific to make things work with x86 PAT code. The patchset aso introduces pgprot_writecombine interface, which gives writecombine mapping when enabled, falling back to pgprot_noncached otherwise.