freebsd-dev/sys
Alan Cox 50e3ab6bcf Utilize ASIDs to reduce both the direct and indirect costs of context
switching.  The indirect costs being unnecessary TLB misses that are
incurred when ASIDs are not used.  In fact, currently, when we perform a
context switch on one processor, we issue a broadcast TLB invalidation that
flushes the TLB contents on every processor.

Mark all user-space ("ttbr0") page table entries with the non-global flag so
that they are cached in the TLB under their ASID.

Correct an error in pmap_pinit0().  The pointer to the root of the page
table was being initialized to the root of the kernel-space page table
rather than a user-space page table.  However, the root of the page table
that was being cached in process 0's md_l0addr field correctly pointed to a
user-space page table.  As long as ASIDs weren't being used, this was
harmless, except that it led to some unnecessary page table switches in
pmap_switch().  Specifically, other kernel processes besides process 0 would
have their md_l0addr field set to the root of the kernel-space page table,
and so pmap_switch() would actually change page tables when switching
between process 0 and other kernel processes.

Implement a workaround for Cavium erratum 27456 affecting ThunderX machines.
(I would like to thank andrew@ for providing the code to detect the affected
machines.)

Address integer overflow in the definition of TCR_ASID_16.

Setup TCR according to the PARange and ASIDBits fields from
ID_AA64MMFR0_EL1.  Previously, TCR_ASID_16 was unconditionally set.

Modify build_l1_block_pagetable so that lower attributes, such as ATTR_nG,
can be specified as a parameter.

Eliminate some unused code.

Earlier versions were tested to varying degrees by: andrew, emaste, markj

MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D21922
2019-11-03 17:45:30 +00:00
..
amd64 amd64: Store %cr3 into pcpu saved_ucr3 on double fault. 2019-11-03 11:52:50 +00:00
arm Use the new cam_sim_alloc_dev function to properly initialize SIM 2019-10-30 20:43:27 +00:00
arm64 Utilize ASIDs to reduce both the direct and indirect costs of context 2019-11-03 17:45:30 +00:00
bsm
cam Remove lock from CTL camsim frontend. 2019-11-03 00:13:23 +00:00
cddl loader: we do not support booting from pool with log device 2019-11-03 13:25:47 +00:00
compat Add missing M_NOWAIT flag 2019-10-23 17:20:20 +00:00
conf r354264 did mix up the directory path 2019-11-02 21:52:45 +00:00
contrib Downgrade the firmware images imported in r354201. 2019-11-03 03:23:27 +00:00
crypto Fix the armv8 crypto driver after r354170. 2019-10-30 10:41:10 +00:00
ddb ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
dev Make valdiate_rx_req_id static inline because it uses other static 2019-11-02 02:05:09 +00:00
dts dtso: allwinner: Add an overlay for H3 thermal node 2019-08-24 13:26:34 +00:00
fs Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
gdb gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
geom Make all the gnop parameters optional in the request from userland, 2019-10-16 21:49:44 +00:00
gnu arm: dts: ti: Fix mmc3 instance by setting it to disabled 2019-10-07 08:11:49 +00:00
i386 linux: futex_mtx should follow futex_list 2019-10-18 12:25:33 +00:00
isa
kern Some more taskqueue optimizations. 2019-11-01 22:49:44 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern Rename the macros to extract a single arm64 ID field. 2019-10-30 10:06:57 +00:00
mips Remove page locking from pmap_mincore(). 2019-10-16 22:03:27 +00:00
modules Downgrade the firmware images imported in r354201. 2019-11-03 03:23:27 +00:00
net netmap: fix build issue in netmap_user.h 2019-10-31 22:16:20 +00:00
net80211 Don't use if_maddr_rlock() in 802.11, use epoch(9) directly instead. 2019-10-10 23:55:33 +00:00
netgraph Fix regression from r353026. Pointer was increased instead of value 2019-11-02 03:09:17 +00:00
netinet Properly set VNET when nuking recvif from fragment queues. 2019-10-25 18:54:06 +00:00
netinet6 Properly set VNET when nuking recvif from fragment queues. 2019-10-25 18:54:06 +00:00
netipsec Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netpfil pf: Must be in NET_EPOCH to call icmp_error 2019-10-18 03:36:26 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs
nfsclient
nfsserver
nlm
ofed VLAN_TRUNKDEV() requires epochification in ibcore after r353292. 2019-10-16 08:56:07 +00:00
opencrypto kTLS support for TLS 1.3 2019-09-27 19:17:40 +00:00
powerpc powerpc: Add display of raw instruction values to x/I in ddb. 2019-11-03 02:18:45 +00:00
riscv RISC-V: Remove EARLY_AP_STARTUP from GENERIC 2019-11-02 19:33:02 +00:00
rpc Avoid relying on header pollution from sys/refcount.h. 2019-07-29 20:26:01 +00:00
security Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
sparc64 Split out a more generic debugnet(4) from netdump(4) 2019-10-17 16:23:03 +00:00
sys Use atomics and a shared object lock to protect the object reference count. 2019-10-29 20:58:46 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
ufs Replace OBJ_MIGHTBEDIRTY with a system using atomics. Remove the TMPFS_DIRTY 2019-10-29 21:06:34 +00:00
vm vm_page_wire_mapped: explain why failure does not affect correctness. 2019-10-30 17:33:17 +00:00
x86 amd64: Fix typo: RDPRU bit is 0x10, not 0x04 2019-10-30 04:00:44 +00:00
xdr
xen
Makefile