Files
tegra-linux-noble/include/linux
Andy Lutomirski 1745cbc5d0 mm: Add vm_insert_pfn_prot()
The x86 vvar vma contains pages with differing cacheability
flags.  x86 currently implements this by manually inserting all
the ptes using (io_)remap_pfn_range when the vma is set up.

x86 wants to move to using .fault with VM_FAULT_NOPAGE to set up
the mappings as needed.  The correct API to use to insert a pfn
in .fault is vm_insert_pfn(), but vm_insert_pfn() can't override the
vma's cache mode, and the HPET page in particular needs to be
uncached despite the fact that the rest of the VMA is cached.

Add vm_insert_pfn_prot() to support varying cacheability within
the same non-COW VMA in a more sane manner.

x86 could alternatively use multiple VMAs, but that's messy,
would break CRIU, and would create unnecessary VMAs that would
waste memory.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/d2938d1eb37be7a5e4f86182db646551f11e45aa.1451446564.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-01-12 11:59:34 +01:00
..
2015-10-17 21:22:08 -07:00
2015-11-07 10:40:47 -07:00
2015-12-28 13:07:07 -07:00
2015-12-06 12:46:31 +01:00
2015-10-18 10:14:39 -07:00
2015-10-31 19:05:59 -04:00
2015-10-30 01:47:27 -04:00
2015-10-23 05:44:28 -07:00
2015-10-13 19:01:25 +02:00
2015-11-23 09:44:58 +01:00
2015-10-27 18:55:31 -07:00
2016-01-12 11:59:34 +01:00
2015-10-20 22:10:45 +08:00
2015-11-06 17:50:42 -08:00
2015-10-22 08:59:18 -07:00
2015-11-05 14:36:09 -05:00
2015-10-19 01:01:21 +02:00
2015-11-20 16:19:54 -08:00
2015-11-23 09:44:58 +01:00
2015-12-04 08:38:42 -07:00