]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/ppc: Add ISA v3.1 LEV indication in SRR1 for system call interrupts
authorNicholas Piggin <npiggin@gmail.com>
Tue, 20 Jun 2023 13:13:21 +0000 (23:13 +1000)
committerCédric Le Goater <clg@kaod.org>
Sun, 25 Jun 2023 20:41:30 +0000 (22:41 +0200)
System call interrupts in ISA v3.1 CPUs add a LEV indication in SRR1
that corresponds with the LEV field of the instruction that caused the
interrupt.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/excp_helper.c

index 2a0070cf4378c887333739c921c6b0461f4363c7..8e2fec3551b993c6c4524b4e9218ce628ada2e4c 100644 (file)
@@ -1591,6 +1591,10 @@ static void powerpc_excp_books(PowerPCCPU *cpu, int excp)
             vhc->hypercall(cpu->vhyp, cpu);
             return;
         }
+        if (env->insns_flags2 & PPC2_ISA310) {
+            /* ISAv3.1 puts LEV into SRR1 */
+            msr |= lev << 20;
+        }
         if (lev == 1) {
             new_msr |= (target_ulong)MSR_HVB;
         }