freebsd-skq/sys/amd64
cem 8140e9f055 x86: Implement MWAIT support for stopping a CPU
IPI_STOP is used after panic or when ddb is entered manually.  MONITOR/
MWAIT allows CPUs that support the feature to sleep in a low power way
instead of spinning.  Something similar is already used at idle.

It is perhaps especially useful in oversubscribed VM environments, and is
safe to use even if the panic/ddb thread is not the BSP.  (Except in the
presence of MWAIT errata, which are detected automatically on platforms with
known wakeup problems.)

It can be tuned/sysctled with "machdep.stop_mwait," which defaults to 0
(off).  This commit also introduces the tunable
"machdep.mwait_cpustop_broken," which defaults to 0, unless the CPU has
known errata, but may be set to "1" in loader.conf to signal that mwait
wakeup is broken on CPUs FreeBSD does not yet know about.

Unfortunately, Bhyve doesn't yet support MONITOR extensions, so this doesn't
help bhyve hypervisors running FreeBSD guests.

Submitted by:   Anton Rang <rang AT acm.org> (earlier version)
Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20135
2019-05-04 20:34:26 +00:00
..
acpica Merge ACPICA 20190329. 2019-03-29 20:21:28 +00:00
amd64 Fix initial x87 state after r345562. 2019-04-16 19:46:02 +00:00
cloudabi32 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
cloudabi64 Remove sv_pagesize, originally introduced with r100384. 2019-03-01 16:16:38 +00:00
conf Add a COMPAT_FREEBSD12 kernel option. 2019-05-02 18:10:23 +00:00
ia32 Remove iBCS2, part2: general kernel 2018-12-19 21:57:58 +00:00
include x86: Implement MWAIT support for stopping a CPU 2019-05-04 20:34:26 +00:00
linux In order to reduce duplication between MD parts of the Linuxulator 2019-05-03 08:42:49 +00:00
linux32 In order to reduce duplication between MD parts of the Linuxulator 2019-05-03 08:42:49 +00:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx Prevent loading SGX with incorrect EPC data 2019-03-19 02:33:58 +00:00
vmm Emulate the "ADD reg, r/m" instruction (opcode 03H). 2019-05-03 21:48:42 +00:00
Makefile