freebsd-skq/sys
jhibbits e0266e5c8c powerpc64: Handle the modern (2.05+) implementaiton of tlbie
By happenstance gcc4 puts 'vpn' into r0 in all uses of TLBIE(), but modern
gcc does not.  Also, the single-argument form of tlbie zeros all unused
arguments, making the modern tlbie instruction use r0 as the RS field
(LPID).

The vpn argument has the bottom 12 bits cleared (the input having been
left-shifted by 12 bits), which just so happens, on the POWER9 and previous
incarnations, to be the number of LPID bits supported.  With those bits
being zero, the instruction:

	tlbie r0, r0

will invalidate the VPN in r0, in LPAR 0 (ignoring the upper bits of r0 for
the RS field).  One build with gcc8 yields:

	tlbie r9, r0

with r0 having arbitrary contents, not equal to r9.  This leads to strange
crashes, behaviors, and panics, due to the requested TLB entry not actually
being invalidated.

As the moea64_native must work on both old and new, we explicitly zero out
r0 so that it can work with only the single argument, built with base gcc
and modern gcc.  isa3_hashtb takes a different approach, encoding the
two-argument form, soas not to explicitly clobber r0, and instead let the
compiler decide.

Reported by:	Brandon Bergren
Tested by:	Brandon Bergren
MFC after:	1 week
2019-03-22 01:43:31 +00:00
..
amd64 Disallow preemptive creation of wired superpage mappings. 2019-03-21 19:52:50 +00:00
arm Use named field's initializer when constructing <foo>_platform structure. 2019-03-19 14:32:54 +00:00
arm64 Add bus_release_resource() method to nexus on arm64 2019-03-21 10:51:36 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Upgrade Chipfancier SLC quirk to all versions 2019-03-11 20:57:54 +00:00
cddl Use an explicit comparison with VM_GUEST_NO. 2019-03-21 20:07:50 +00:00
compat amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
conf Build common kernel dependencies before modules. 2019-03-20 22:49:41 +00:00
contrib [ath_hal_ar9300] Add some comments around the AR9300 ANI code. 2019-03-19 00:07:12 +00:00
crypto Embedded chacha: Add 0-bit iv + 128-bit counter mode 2019-03-01 23:30:23 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev Fix smartpqi(4) malloc tag and description to match the driver name. 2019-03-21 21:14:25 +00:00
dts Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with 2019-02-06 06:03:44 +00:00
fs nullfs: fix unmounts when filesystem is active. 2019-03-21 13:30:48 +00:00
gdb
geom stack(9): Drop unused API mode and comment that referenced it 2019-03-15 22:39:55 +00:00
gnu Correct my previous correction to the license. It now matches the text 2019-03-07 22:34:45 +00:00
i386 Disallow preemptive creation of wired superpage mappings. 2019-03-21 19:52:50 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Fix a typo introduced in r344133 2019-03-18 12:41:42 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern Add non-sleepable strdup variant strdup_flags 2019-02-20 20:48:10 +00:00
mips amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
modules Rename fuse(4) to fusefs(4) 2019-03-20 21:48:43 +00:00
net iflib: mark isc_driver_version as constant 2019-03-19 23:44:26 +00:00
net80211 net80211: correct check for SMPS node flags updates 2019-03-18 02:40:22 +00:00
netgraph Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. 2019-03-14 22:30:05 +00:00
netinet Add NAT64 CLAT implementation as defined in RFC6877. 2019-03-18 11:44:53 +00:00
netinet6 Reapply r345274 with build fixes for 32-bit architectures. 2019-03-19 10:57:03 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil Always create ipfw(4) hooks as long as module is loaded. 2019-03-21 16:15:29 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Fix another bug introduced during the review process of r344140: 2019-02-25 19:14:16 +00:00
powerpc powerpc64: Handle the modern (2.05+) implementaiton of tlbie 2019-03-22 01:43:31 +00:00
riscv amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
rpc Bump the default kern.rpc.gss.client_max from 128 to 1024. 2019-02-19 11:07:02 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
sys iflib: mark isc_driver_version as constant 2019-03-19 23:44:26 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs This is an additional and hopefully final fix for bug report 230962. 2019-03-20 23:11:05 +00:00
vm Disallow preemptive creation of wired superpage mappings. 2019-03-21 19:52:50 +00:00
x86 amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile