freebsd-dev/sys/i386/i386
Konstantin Belousov a0f64f38a1 Do not leave stale 4K TLB entries on pde (superpage) removal or
protection change.

On superpage promotion, x86 pmaps do not invalidate existing 4K
entries for the superpage range, because they are compatible with the
promoted 2/4M entry.  But the invalidation on superpage removal or
protection change only did single INVLPG with the base address of the
superpage.  This reliably flushed superpage TLB entry, and 4K entry
for the first page of the superpage, potentially leaving other 4K TLB
entries lingering.  Do the invalidation of the whole superpage range
to correct the problem.

Note that the precise invalidation is done by x86 code for kernel_pmap
only, for user pmaps whole (per-AS) TLB is flushed.  This made the bug
well hidden, because promotions of the kernel mappings require
specific load.

Reported and tested by:	Jonathan Looney <jtl@netflix.com> (previous version)
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-01-29 19:14:48 +00:00
..
apic_vector.s hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbus 2016-04-15 02:20:18 +00:00
atomic.c
atpic_vector.s
bios.c Add config option PAE_TABLES for the i386 kernel. It switches pmap to 2015-04-13 15:22:45 +00:00
bioscall.s
bpf_jit_machdep.c Implement BPF_MOD and BPF_XOR instructions. 2016-10-21 06:55:07 +00:00
bpf_jit_machdep.h Implement BPF_MOD and BPF_XOR instructions. 2016-10-21 06:55:07 +00:00
db_disasm.c Minor fixes for 160-bit disassembly: 2016-09-25 18:39:24 +00:00
db_interface.c Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
db_trace.c Determine the operand/address size of %cs in a new function 2016-09-25 16:30:29 +00:00
elan-mmcr.c
elf_machdep.c Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall 2016-01-09 20:18:53 +00:00
exception.s Fill tf_trapno for trap frames created for syscall. 2016-07-11 15:52:52 +00:00
gdb_machdep.c Report the values of x86 segment registers to remote debuggers. 2015-06-12 15:14:08 +00:00
genassym.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
geode.c
i686_mem.c Yet more redundant parenthesis from r298431. 2016-04-21 20:30:38 +00:00
in_cksum.c
initcpu.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
io.c
k6_mem.c
locore.s Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
longrun.c
machdep.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
mem.c MFamd64: Add bounds checks on addresses used with /dev/mem. 2016-10-27 21:23:14 +00:00
minidump_machdep.c Add support for encrypted kernel crash dumps. 2016-12-10 16:20:39 +00:00
mp_clock.c
mp_machdep.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
mpboot.s Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
perfmon.c
pmap.c Do not leave stale 4K TLB entries on pde (superpage) removal or 2017-01-29 19:14:48 +00:00
ptrace_machdep.c Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to 2015-06-29 07:07:24 +00:00
support.s On amd64, declare sse2_pagezero() and start using it again, but only 2016-08-29 13:07:21 +00:00
swtch.s Remove all kernel uses of pcb_psl, but keep in in the struct to 2016-09-17 14:00:52 +00:00
sys_machdep.c MFamd64: r266901 2016-09-25 18:29:02 +00:00
trap.c MFamd64: Various fatal page fault fixes. 2016-11-19 01:36:44 +00:00
uio_machdep.c
vm86.c Fix single-stepping of instructions emulated by vm86. 2016-09-08 14:43:39 +00:00
vm86bios.s Add config option PAE_TABLES for the i386 kernel. It switches pmap to 2015-04-13 15:22:45 +00:00
vm_machdep.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00