linux-hardened/arch
Peter Zijlstra 5f307be18b asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range()
Provide a generic tlb_flush() implementation that relies on
flush_tlb_range(). This is a little awkward because flush_tlb_range()
assumes a VMA for range invalidation, but we no longer have one.

Audit of all flush_tlb_range() implementations shows only vma->vm_mm
and vma->vm_flags are used, and of the latter only VM_EXEC (I-TLB
invalidates) and VM_HUGETLB (large TLB invalidate) are used.

Therefore, track VM_EXEC and VM_HUGETLB in two more bits, and create a
'fake' VMA.

This allows architectures that have a reasonably efficient
flush_tlb_range() to not require any additional effort.

No change in behavior intended.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-04-03 10:32:42 +02:00
..
alpha KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
arc asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
arm asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00
arm64 asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range() 2019-04-03 10:32:42 +02:00
c6x KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
csky kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
h8300 KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
hexagon KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
ia64 asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00
m68k KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
microblaze KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
mips asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
nds32 asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
nios2 asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
openrisc KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
parisc asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
powerpc asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range() 2019-04-03 10:32:42 +02:00
riscv asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range() 2019-04-03 10:32:42 +02:00
s390 asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00
sh asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00
sparc asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
um asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00
unicore32 KVM: export <linux/kvm_para.h> and <asm/kvm_para.h> iif KVM is supported 2019-03-28 17:27:42 +01:00
x86 asm-generic/tlb, arch: Provide generic tlb_flush() based on flush_tlb_range() 2019-04-03 10:32:42 +02:00
xtensa asm-generic/tlb, arch: Provide generic VIPT cache flush 2019-04-03 10:32:41 +02:00
.gitignore
Kconfig asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_SIZE 2019-04-03 10:32:40 +02:00