freebsd-skq/sys/amd64
Konstantin Belousov 8fba5348fc amd64: ensure that curproc->p_vmspace pmap always matches PCPU
curpmap.

When performing context switch on a machine without PCID, if current
%cr3 equals to the new pmap %cr3, which is typical for kernel_pmap
vs. kernel process, I overlooked to update PCPU curpmap value.  Remove
check for %cr3 not equal to pm_cr3 for doing the update.  It is
believed that this case cannot happen at all, due to other changes in
this revision.

Also, do not set the very first curpmap to kernel_pmap, it should be
vmspace0 pmap instead to match curproc.

Move the common code to activate the initial pmap both on BSP and APs
into pmap_activate_boot() helper.

Reported by: eadler, ambrisko
Discussed with: kevans
Reviewed by:	alc, markj (previous version)
Tested by: ambrisko (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D16618
2018-08-14 16:37:14 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
amd64 amd64: ensure that curproc->p_vmspace pmap always matches PCPU 2018-08-14 16:37:14 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf COMPAT_LINUX32 has not depended on COMPAT_43 in some time. 2018-07-31 21:40:13 +00:00
ia32 Use SMAP on amd64. 2018-07-29 20:47:00 +00:00
include amd64: ensure that curproc->p_vmspace pmap always matches PCPU 2018-08-14 16:37:14 +00:00
linux Futex support functions in linux.ko and linux32.ko on amd64 should be 2018-08-07 18:29:10 +00:00
linux32 Futex support functions in linux.ko and linux32.ko on amd64 should be 2018-08-07 18:29:10 +00:00
pci sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
sgx Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
vmm - Add the ability to run bhyve(8) within a jail(8). 2018-08-01 00:39:21 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00