amd64: add LASS support
In short, LASS enforces all kernel memory accesses to have bit 63 set to
1, and all userspace accesses have bit 63 set to 0. Violations of these
rules cause #GP. There are natural loopholes, like SMAP with rflags.AC=1
allows kernel to access userspace.
Enablement is simple, we need to set CR4.LASS bit on all CPUs. There
are complications when kernel has to execute code at low addresses, e.g.
for la57 trampoline, or calling into EFI RT. The patch turns CR4.LASS
off around these regions.
LASS is officially documented in SDM, since at least rev. 085, October
- Tested in simics.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55218