HomeFreeBSD

Clean up a couple of MD warts in vm_fault_populate():

Description

Clean up a couple of MD warts in vm_fault_populate():

--Eliminate a big ifdef that encompassed all currently-supported
architectures except mips and powerpc32. This applied to the case
in which we've allocated a superpage but the pager-populated range
is insufficient for a superpage mapping. For platforms that don't
support superpages the check should be inexpensive as we shouldn't
get a superpage in the first place. Make the normal-page fallback
logic identical for all platforms and provide a simple implementation
of pmap_ps_enabled() for MIPS and Book-E/AIM32 powerpc.

--Apply the logic for handling pmap_enter() failure if a superpage
mapping can't be supported due to additional protection policy.
Use KERN_PROTECTION_FAILURE instead of KERN_FAILURE for this case,
and note Intel PKU on amd64 as the first example of such protection
policy.

Reviewed by: kib, markj, bdragon
Differential Revision: https://reviews.freebsd.org/D29439

Details

Provenance
jahAuthored on Mar 27 2021, 3:10 AM
Reviewer
kib
Differential Revision
D29439: Clean up a couple of MD warts in vm_fault_populate():
Parents
rG74f6cb0f316b: [PowerPC] Remove unused IPI type count tracking.
Branches
Unknown
Tags
Unknown