]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
target/ppc: fix ISI fault cause for Radix MMU
authorLeandro Lupori <leandro.lupori@eldorado.org.br>
Mon, 14 Mar 2022 14:57:17 +0000 (15:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Mon, 14 Mar 2022 14:57:17 +0000 (15:57 +0100)
Fix Instruction Storage Interrupt (ISI) fault cause for Radix MMU,
when caused by missing PAGE_EXEC permission, to be
SRR1_NOEXEC_GUARD instead of DSISR_PROTFAULT.
This matches POWER9 hardware behavior.

Fixes: d5fee0bbe68 ("target/ppc: Implement ISA V3.00 radix page fault handler")
Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br>
Message-Id: <20220309192756.145283-1-leandro.lupori@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/mmu-radix64.c

index 67c38f065ba2f9cc0ac1c873b68aad99255cb6ec..5414fd63c10f8fdda64fd56be4d7e7866c6644f6 100644 (file)
@@ -204,7 +204,8 @@ static bool ppc_radix64_check_prot(PowerPCCPU *cpu, MMUAccessType access_type,
     /* Check if requested access type is allowed */
     need_prot = prot_for_access_type(access_type);
     if (need_prot & ~*prot) { /* Page Protected for that Access */
-        *fault_cause |= DSISR_PROTFAULT;
+        *fault_cause |= access_type == MMU_INST_FETCH ? SRR1_NOEXEC_GUARD :
+                                                        DSISR_PROTFAULT;
         return true;
     }