Add support for pmap_enter(..., psind=1) to the amd64 pmap. In other words,
authoralc <alc@FreeBSD.org>
Sun, 23 Jul 2017 06:33:58 +0000 (06:33 +0000)
committeralc <alc@FreeBSD.org>
Sun, 23 Jul 2017 06:33:58 +0000 (06:33 +0000)
commit621c14d3f9c84a46770e8c1c478da920d0077985
treee3108483d1303478a79801659d77c9e9fe3c9ca5
parentdd41c931cfae0b43aefeb8b41d6b7fe4bb1cf163
Add support for pmap_enter(..., psind=1) to the amd64 pmap.  In other words,
add support for explicitly requesting that pmap_enter() create a 2MB page
mapping.  (Essentially, this feature allows the machine-independent layer to
create superpage mappings preemptively, and not wait for automatic promotion
to occur.)

Export pmap_ps_enabled() to the machine-independent layer.

Add a flag to pmap_pv_insert_pde() that specifies whether it should fail or
reclaim a PV entry when one is not available.

Refactor pmap_enter_pde() into two functions, one by the same name, that is
a general-purpose function for creating PDE PG_PS mappings, and another,
pmap_enter_2mpage(), that is used to prefault 2MB read- and/or execute-only
mappings for execve(2), mmap(2), and shmat(2).

Submitted by: Yufeng Zhou <yz70@rice.edu> (an earlier version)
Reviewed by: kib, markj
Tested by: pho
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D11556
sys/amd64/amd64/pmap.c
sys/amd64/include/pmap.h
sys/vm/pmap.h