@samitouri / QOSamiQemu / commits / cb02fc2284

target/i386: emulate: LA57 fix

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>

Mohamed Mediouni committed Mar 7, 2026 at 19:18 UTC cb02fc22845a24fc9e7fc317ba511c64b140ac8e
1 file changed +1 -1
target/i386/emulate/x86_mmu.c
+1 -1
@@ -56,7 +56,7 @@ static bool is_user(CPUState *cpu)
56 struct gpt_translation {
57 target_ulong gva;
58 uint64_t gpa;
59 - uint64_t pte[5];
59 + uint64_t pte[6];
60 };
61
62 static int gpt_top_level(CPUState *cpu, bool pae)