aboutsummaryrefslogtreecommitdiff
path: root/scripts/rust
diff options
context:
space:
mode:
authorAlexander Graf <graf@amazon.com>2024-11-06 15:43:29 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-07 16:54:02 +0100
commit8fa11a4df344f58375eb26b3b65004345f21ef37 (patch)
tree967de232dc45be5912b73ef66b94851fe62c648b /scripts/rust
parent700784bfc65496551e15ccebff5ac30b6d13f492 (diff)
downloadqemu-8fa11a4df344f58375eb26b3b65004345f21ef37.zip
qemu-8fa11a4df344f58375eb26b3b65004345f21ef37.tar.gz
qemu-8fa11a4df344f58375eb26b3b65004345f21ef37.tar.bz2
target/i386: Fix legacy page table walk
Commit b56617bbcb4 ("target/i386: Walk NPT in guest real mode") added logic to run the page table walker even in real mode if we are in NPT mode. That function then determined whether real mode or paging is active based on whether the pg_mode variable was 0. Unfortunately pg_mode is 0 in two situations: 1) Paging is disabled (real mode) 2) Paging is in 2-level paging mode (32bit without PAE) That means the walker now assumed that 2-level paging mode was real mode, breaking NetBSD as well as Windows XP. To fix that, this patch adds a new PG flag to pg_mode which indicates whether paging is active at all and uses that to determine whether we are in real mode or not. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2654 Fixes: b56617bbcb4 ("target/i386: Walk NPT in guest real mode") Signed-off-by: Alexander Graf <graf@amazon.com> Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Link: https://lore.kernel.org/r/20241106154329.67218-1-graf@amazon.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/rust')
0 files changed, 0 insertions, 0 deletions