]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/i386: emulate: LA57 fix
authorMohamed Mediouni <mohamed@unpredictable.fr>
Sat, 7 Mar 2026 18:18:52 +0000 (19:18 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Mar 2026 08:11:37 +0000 (09:11 +0100)
Seen on a Sapphire Rapids box with LA57.

The top level of the pte array is taken for CR3, so there was
one entry too little for 5-level paging.

Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260307181856.2209-6-mohamed@unpredictable.fr
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/emulate/x86_mmu.c

index 8261ca16351141887556698445182036b219804b..4e39bae025e7760e1d20fa9321dd18f070cbabae 100644 (file)
@@ -56,7 +56,7 @@ static bool is_user(CPUState *cpu)
 struct gpt_translation {
     target_ulong  gva;
     uint64_t gpa;
-    uint64_t pte[5];
+    uint64_t pte[6];
 };
 
 static int gpt_top_level(CPUState *cpu, bool pae)