freebsd-dev/sys/x86
Jason A. Harmening 3966af52f3 amd64: prevent KCSan false positives on LAPIC mapping
For configurations without x2APIC support (guests, older hardware), the global
LAPIC MMIO mapping will trigger false-positive KCSan reports as it will appear
that multiple CPUs are concurrently reading and writing the same address.
This isn't actually true, as the underlying physical access will be performed
on the local CPU's APIC. Additionally, because LAPIC access can happen during
event timer configuration, the resulting KCSan printf can produce a panic due
to attempted recursion on event timer resources.

Add a __nosanitizethread preprocessor define to prevent the compiler from
inserting TSan hooks, and apply it to the x86 LAPIC accessors.

PR:		249149
Reported by:	gbe
Reviewed by:	andrew, kib
Tested by:	gbe
Differential Revision:	https://reviews.freebsd.org/D26354
2020-09-12 07:04:00 +00:00
..
acpica x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
conf Floppy driver really only works on x86 2019-08-12 22:58:50 +00:00
cpufreq x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
include Add constant for the DE_CFG MSR on AMD CPUs. 2020-09-11 20:32:40 +00:00
iommu Move the rid variable to the generic iommu context. 2020-09-10 14:12:25 +00:00
isa x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
pci x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
x86 amd64: prevent KCSan false positives on LAPIC mapping 2020-09-12 07:04:00 +00:00
xen x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00