HomeFreeBSD

Ensure that resume path on amd64 only accesses page tables for normal

Description

Ensure that resume path on amd64 only accesses page tables for normal
operation after processor is configured to allow all required
features.

In particular, NX must be enabled in EFER, otherwise load of page
table element with nx bit set causes reserved bit page fault. Since
malloc uses direct mapping for small allocations, in particular for
the suspension pcbs, and DMAP is nx after r316767, this commit tripped
fault on resume path.

Restore complete state of EFER while wakeup code is still executing
with custom page table, before calling resumectx, instead of trying to
guess which features might be needed before resumectx restored EFER on
its own.

Bisected and tested by: trasz
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Details

Provenance
kibAuthored on
Parents
rS318317: bsdgrep: add more tests for different binary flags
Branches
Unknown
Tags
Unknown