freebsd-skq/sys
Marcel Moolenaar d87d5bbf82 The ptc.g operation for the Mckinley and Madison processors has the
side-effect of purging more than the requested translation. While
this is not a problem in general, it invalidates the assumption made
during constructing the trapframe on entry into the kernel in SMP
configurations. The assumption is that only the first store to the
stack will possibly cause a TLB miss. Since the ptc.g purges the
translation caches of all CPUs in the coherency domain, a ptc.g
executed on one CPU can cause a purge on another CPU that is
currently running the critical code that saves the state to the
trapframe. This can cause an unexpected TLB miss and with interrupt
collection disabled this means an unexpected data nested TLB fault.

A data nested TLB fault will not save any context, nor provide a
way for software to determine what caused the TLB miss nor where
it occured. Careful construction of the kernel entry and exit code
allows us to handle a TLB miss in precisely orchastrated points
and thereby avoiding the need to wire the kernel stack, but the
unexpected TLB miss caused by the ptc.g instructution resulted in
an unrecoverable condition and resulting in machine checks.

The solution to this problem is to synchronize the kernel entry
on all CPUs with the use of the ptc.g instruction on a single CPU
by implementing a bare-bones readers-writer lock that allows N
readers (= N CPUs entering the kernel) and 1 writer (= execution
of the ptc.g instruction on some CPU). This solution wins over
a rendez-vous approach by not interrupting CPUs with an IPI.

This problem has not been observed on the Montecito.

PR:		ia64/147772
MFC after:	6 days
2010-06-12 01:45:29 +00:00
..
amd64 Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
arm Relax one of the new assertions in pmap_enter() a little. Specifically, 2010-06-11 15:49:39 +00:00
boot Use -Wl,-N instead of the undocumented -N option for GCC. 2010-06-03 17:42:32 +00:00
bsm
cam Rearrange how things are done to avoid dereferencing stale pointers in 2010-06-08 22:46:44 +00:00
cddl Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
compat Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
conf Fix typo. 2010-06-09 12:30:40 +00:00
contrib Provide kernel level headers for the libfdt code. 2010-06-02 17:24:41 +00:00
crypto Use the fpu_kern_enter() interface to properly separate usermode FPU 2010-06-05 16:00:53 +00:00
ddb MFp4 @178364: 2010-05-24 16:41:05 +00:00
dev Put back the lost bus_describe_intr() calls. 2010-06-11 21:35:19 +00:00
fs fix a few cases where a string is passed via format argument instead of 2010-06-11 19:27:21 +00:00
gdb
geom fix a few cases where a string is passed via format argument instead of 2010-06-11 19:27:21 +00:00
gnu Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize(). 2010-05-05 16:44:25 +00:00
i386 Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
ia64 The ptc.g operation for the Mckinley and Madison processors has the 2010-06-12 01:45:29 +00:00
isa Do not attempt to switch to the same VTs between suspend and resume. 2010-05-26 16:37:54 +00:00
kern fix a few cases where a string is passed via format argument instead of 2010-06-11 19:27:21 +00:00
kgssapi
libkern Provide memchr() in the libkern. 2010-06-02 17:27:23 +00:00
mips Relax one of the new assertions in pmap_enter() a little. Specifically, 2010-06-11 15:49:39 +00:00
modules New netgraph node ng_patch(4). It performs data modification of packets 2010-06-09 12:25:57 +00:00
net Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
net80211 Fixing compilation bustage by adding the missing && back. 2010-06-11 01:32:42 +00:00
netatalk
netgraph Style(9) fixes: 2010-06-10 16:45:30 +00:00
netinet 3 Fixes - 2010-06-11 03:54:00 +00:00
netinet6 Fix our version of IPv6 address representation. 2010-05-19 00:35:47 +00:00
netipsec MFp4 @178283: 2010-05-24 16:27:47 +00:00
netipx
netnatm
netncp Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
netsmb Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
nfs Factor out the code shared between NFS client and server into its own 2010-02-16 20:00:21 +00:00
nfsclient Fix build: newnp represents newvp so KDTRACE_NFS_ATTRCACHE_FLUSH_DONE() 2010-05-27 22:59:37 +00:00
nfsserver Patch the regular NFS server so that it returns ESTALE to the client 2010-03-26 01:19:29 +00:00
nlm
opencrypto Use the fpu_kern_enter() interface to properly separate usermode FPU 2010-06-05 16:00:53 +00:00
pc98 Introduce the x86 kernel interfaces to allow kernel code to use 2010-06-05 15:59:59 +00:00
pci Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
powerpc Relax one of the new assertions in pmap_enter() a little. Specifically, 2010-06-11 15:49:39 +00:00
rpc When the regular NFS server replied to a UDP client out of the replay 2010-03-23 23:03:30 +00:00
security Add a case to make sure that internal audit records get converted 2010-05-04 15:29:07 +00:00
sparc64 Relax one of the new assertions in pmap_enter() a little. Specifically, 2010-06-11 15:49:39 +00:00
sun4v Relax one of the new assertions in pmap_enter() a little. Specifically, 2010-06-11 15:49:39 +00:00
sys Apply band-aid around function-like macro fdrop() without turning it into 2010-06-11 23:38:25 +00:00
teken Just use <stdint.h> instead of <inttypes.h>. We don't need it here. 2010-04-03 17:22:28 +00:00
tools Flattened Device Tree helper scripts. 2010-06-02 17:22:38 +00:00
ufs ffs_softdep: change K&R in function defintions to ANSI prototypes 2010-06-11 18:26:53 +00:00
vm Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
x86 Update several places that iterate over CPUs to use CPU_FOREACH(). 2010-06-11 18:46:34 +00:00
xdr
xen don't hold spin lock across free 2010-02-21 01:12:18 +00:00
Makefile