Skip to content

x86 PAT: track pfnmap mappings with remap_pfn_range vm_insert_pfn - v3

[email protected] lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7x86 PAT: store vm_pgoff for all linear_over_vma_region mappings - v3include/linux/mm.h mm/memory.c+12 -43 replies
2/7x86 PAT: Add follow_pfnmp_pte routine to help tracking pfnmap pages - v3include/linux/mm.h mm/memory.c+46 -02 replies
3/7x86 PAT: hooks in generic vm code to help archs to track pfnmap regions - v3include/linux/mm.h mm/memory.c+81 -12 replies
4/7x86 PAT: Implement track/untrack of pfnmap regions for x86 - v3arch/x86/include/asm/pgtable.h arch/x86/mm/pat.c+246 -04 replies
5/7x86 PAT: change pgprot_noncached to uc_minus instead of strong uc - v3arch/x86/include/asm/pgtable.h arch/x86/include/asm/pgtable_32.h arch/x86/include/asm/pgtable_64.h+8 -150 replies
6/7x86 PAT: add pgprot_writecombine() interface for drivers - v3arch/x86/include/asm/pgtable.h arch/x86/mm/pat.c include/asm-generic/pgtable.h+15 -00 replies
7/7x86 PAT: update documentation to cover pgprot and remap_pfn related changes - v3Documentation/x86/pat.txt+24 -04 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/7] x86 PAT: track pfnmap mappings with remap_pfn_range vm_insert_pfn - v3

v3: Patches updated based on Andrew's comments on the earlier version.

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 three 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.