Hi,
> > (now that I check, all of this insane behavior seems to have been
> > inherited from MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c. Sorry
> > for the rant.)
>
> We have UefiCpuPkg/Library/CpuPageTableLib meanwhile.
>
> So switch the code over to use that instead, and reduce the number
> of VirtualMemory.c copies floating around in the tree?
As much sense as this makes to me I would stick to using the structure for this patch. It's simply a bug fix to an existing code path.
I'm of course open to the discussion of making larger changes in the codebase in a separate series.
Thanks!
Mikolaj