The change consists of four:
- when the pmap with pti disabled (i.e. pm_ucr3 == PMAP_NO_CR3) is activated, tss.rsp0 was not updated. Any interrupt that happen before context switch would use pti trampoline stack for hardware frame but fault handlers are not prepared to this. Correctly update tss.rsp0 for both PMAP_NO_CR3 and pti pmaps. Since the code now duplicates the asm in cpu_switch.S, remove the fragment to update tss.rsp0 from there.
- addition of P_MD_KPTI flag, this is autonomous and probably should be committed unconditionally. The flag controls if the new pmap after exec gets KPTI active.
- addition of procctl(2) MD stuff (this is not complete since it lacks stubs on anything non-amd64).
- addition of procctl(2) and proccontrol(8) knobs for KPTI.