target/i386: extend pg_mode to more CR0 and CR4 bits
commit31dd35eb2d4484b70e4462a9e4a370695cc8ce8d
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Feb 2021 15:24:35 +0000 (26 10:24 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 May 2021 08:11:14 +0000 (11 04:11 -0400)
tree4c7222c16590f5186d3089646059a3971937555f
parentcd906d315d629da010e0ac6f84949c04d2ab7a08
target/i386: extend pg_mode to more CR0 and CR4 bits

In order to unify the two stages of page table lookup, we need
mmu_translate to use either the host CR0/EFER/CR4 or the guest's.
To do so, make mmu_translate use the same pg_mode constants that
were used for the NPT lookup.

This also prepares for adding 5-level NPT support, which however does
not work yet.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.h
target/i386/tcg/sysemu/excp_helper.c
target/i386/tcg/sysemu/svm_helper.c