On 12/17/24 06:56, David Woodhouse wrote: >> Anyway, I think we can leave the belt-and-suspenders programming in this >> case. A comment wouldn't hurt I guess. > I'm a little lost. In this case I don't see belt-and-suspenders > programming. We're not loading CR3 after clearing CR4.PGE just to be > paranoid about making really really sure the TLB is flushed. > > We're loading CR3 because we're switching from the kernel's page tables > to the new identity mapping set up for the relocate_kernel environment. Yes, agreed, that's another reason the CR3 write must stay. I hadn't even considered that part yet honestly.