target/i386: use separate MMU indexes for 32-bit accesses
commit90f641531c782c873a05895f411c05fbbbef3c49
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Jan 2024 14:40:18 +0000 (2 15:40 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Feb 2024 23:23:39 +0000 (28 00:23 +0100)
treed2cd3320f85604ac5ef9f03fad94edddccaacb24
parent5f97afe2543f09160a8d123ab6e2e8c6d98fa9ce
target/i386: use separate MMU indexes for 32-bit accesses

Accesses from a 32-bit environment (32-bit code segment for instruction
accesses, EFER.LMA==0 for processor accesses) have to mask away the
upper 32 bits of the address.  While a bit wasteful, the easiest way
to do so is to use separate MMU indexes.  These days, QEMU anyway is
compiled with a fixed value for NB_MMU_MODES.  Split MMU_USER_IDX,
MMU_KSMAP_IDX and MMU_KNOSMAP_IDX in two.

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