freebsd-dev/sys/amd64/include
Konstantin Belousov 27691a24ab For amd64 non-PCID machines, and for i386 machines with support for
the PG_G global pte flag, pmap_invalidate_all() fails to flush global
TLB entries [*].  This is because TLB shootdown handler for such
configs reloads CR3, and on i386 pmap_invalidate_all() does the same
for the initiating CPU.  Note that current code does not issue total
invalidation requests for the kernel_pmap.

Rename amd64 function invltlb_globpcid() to invltlb_glob(), it is not
specific for PCID for quite some time, and implement the same
functionality for i386.  Use the function instead of invltlb() in
shootdown handlers and in i386 pmap_invalidate_all(), but only for the
kernel pmap (which maps pages with the PG_G attribute set), which
takes care of PG_G TLB entries on flush.

To detect the affected pmap in i386 TLB shootdown handler, pmap should
be passed to the smp_masked_invltlb() function, which makes amd64 and
i386 TLB shootdown code almost identical.  Merge the code under x86/.

Noted by:	jhb [*]
Reviewed by:	cem, jhb, pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D4346
2015-12-03 11:14:14 +00:00
..
pc - Add a new structure type for the ACPI 3.0 SMAP entry that includes the 2014-08-29 21:25:47 +00:00
xen x86/xen: Consolidate xen-os.h in a single place 2015-10-21 10:04:35 +00:00
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h Merge acpica_machdep.h for amd64 and i386 and move to x86. In fact, these 2013-08-13 22:05:10 +00:00
apm_bios.h
asm.h Revert r274772: it is not valid on MIPS 2014-11-25 03:50:31 +00:00
asmacros.h Extend earlier addition of stack frames to most of support.S. This makes 2014-11-13 22:11:44 +00:00
atomic.h Improve comments. 2015-07-30 15:47:53 +00:00
bus_dma.h
bus.h
clock.h xen: implement an early timer for Xen PVH 2014-03-11 10:20:42 +00:00
counter.h Fix issues with zeroing and fetching the counters, on x86 and ppc64. 2013-07-01 02:48:27 +00:00
cpu.h amd64/i386: introduce APIC hooks for different APIC implementations. 2014-06-16 08:43:03 +00:00
cpufunc.h For amd64 non-PCID machines, and for i386 machines with support for 2015-12-03 11:14:14 +00:00
cputypes.h
db_machdep.h
dump.h Factor out duplicated code from dumpsys() on each architecture into generic 2015-01-07 01:01:39 +00:00
elf.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
endian.h
exec.h
fdt.h Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
float.h
floatingpoint.h
fpu.h Create a separate structure for per-CPU state saved across suspend and 2014-09-06 15:23:28 +00:00
frame.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
gdb_machdep.h
ieeefp.h
in_cksum.h Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
intr_machdep.h Update Xen headers from 4.2 to 4.6 2015-10-06 11:29:44 +00:00
iodev.h
kdb.h
limits.h
md_var.h Clear the IA32_MISC_ENABLE MSR bit, which limits the max CPUID 2015-08-03 12:14:42 +00:00
memdev.h
metadata.h Use explicitly sized types in EFI module metadata 2015-04-10 19:26:45 +00:00
minidump.h
mp_watchdog.h
nexusvar.h
npx.h
ofw_machdep.h Add basic support for FDT to i386 & amd64. This change includes: 2013-05-21 03:05:49 +00:00
param.h Use single instance of the identical INKERNEL() and PMC_IN_KERNEL() 2015-07-02 14:37:21 +00:00
pcb.h Export various helper variables describing the layout and size of 2015-11-12 22:00:59 +00:00
pci_cfgreg.h
pcpu.h Rewrite amd64 PCID implementation to follow an algorithm described in 2015-05-09 19:11:01 +00:00
pmap.h Rewrite amd64 PCID implementation to follow an algorithm described in 2015-05-09 19:11:01 +00:00
pmc_mdep.h Use single instance of the identical INKERNEL() and PMC_IN_KERNEL() 2015-07-02 14:37:21 +00:00
ppireg.h
proc.h
profile.h
psl.h
ptrace.h
pvclock.h Generalized parts of the XEN timer code into a generic pvclock 2015-02-04 08:26:43 +00:00
reg.h
reloc.h
resource.h Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge 2014-02-12 04:30:37 +00:00
runq.h
segments.h Hide struct pcb definition by #ifdef __amd64__ braces. If cc -m32 2013-11-26 19:38:42 +00:00
setjmp.h
sf_buf.h Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c 2014-08-05 09:44:10 +00:00
sigframe.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
signal.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
smp.h For amd64 non-PCID machines, and for i386 machines with support for 2015-12-03 11:14:14 +00:00
specialreg.h
stack.h Merge stack(9) implementations for i386 and amd64 under x86/. 2015-09-11 03:24:07 +00:00
stdarg.h
sysarch.h
timerreg.h
trap.h
tss.h
ucontext.h Convert machine/elf.h, machine/frame.h, machine/sigframe.h, 2013-02-20 17:39:52 +00:00
varargs.h
vdso.h
vm.h Reassign copyright statements on several files from Advanced 2015-04-23 14:22:20 +00:00
vmm_dev.h Restructure memory allocation in bhyve to support "devmem". 2015-06-18 06:00:17 +00:00
vmm_instruction_emul.h Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup(). 2015-05-06 16:25:20 +00:00
vmm.h Restructure memory allocation in bhyve to support "devmem". 2015-06-18 06:00:17 +00:00
vmparam.h Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages. 2015-06-08 04:59:32 +00:00