BTW, the RISC-V MMU code _does_ get this right and the model could be followed by the x86 version - - something like https://github.com/vsrinivas/qemu/commit/1efa7dc689c4572d8fe0880ddbe44ec22f8f4348, (but with more compiling + working) might solve this problem and more closely model h/w.
BTW, the RISC-V MMU code _does_ get this right and the model could be followed by the x86 version - - something like https:/ /github. com/vsrinivas/ qemu/commit/ 1efa7dc689c4572 d8fe0880ddbe44e c22f8f4348, (but with more compiling + working) might solve this problem and more closely model h/w.