Korona wrote:
qemu supports 5-level paging correctly (maybe not in the monitor though)
It's definitely supporting 5-level paging, or else my code would never get as far as it does.
I do think the problem is in the monitor, though. I stuck in a quick print statement and it appeared to be examining sections of the page table it shouldn't be. It shouldn't be recursing down from entries in the PML5 when P=0, but it looks like it is. At cursory glance, the algorithm for parsing a PML5 table is not just "parse like a PML4 table with an extra level". They're doing it differently, and it may not be working right. I'm going to try modifying it to use the PML4 method, with an extra level, and see if that addresses the issue.
Of course, I can't rule out the possibility that there is a problem with parts of my page tables, but it's hard to verify that when I can't examine them easily.