]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ppc: Add stub implementation of TRIG SPRs
authorJoel Stanley <joel@jms.id.au>
Wed, 19 Jul 2023 05:29:20 +0000 (14:59 +0930)
committerCédric Le Goater <clg@kaod.org>
Wed, 6 Sep 2023 09:19:32 +0000 (11:19 +0200)
Linux sets these to control cache flush behaviour on Power9. Supervisor
and hypervisor are allowed to write, and reads are noops.

Add implementations to avoid noisy messages when booting Linux under the
pseries machine with guest_errors enabled.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/cpu.h
target/ppc/cpu_init.c

index 25fac9577aa42f8bb50404184d7a22298fe3e338..6826702ea6586c09641727caf0c2a13344667801 100644 (file)
@@ -1897,7 +1897,9 @@ void ppc_compat_add_property(Object *obj, const char *name,
 #define SPR_PSSCR             (0x357)
 #define SPR_440_INV0          (0x370)
 #define SPR_440_INV1          (0x371)
+#define SPR_TRIG1             (0x371)
 #define SPR_440_INV2          (0x372)
+#define SPR_TRIG2             (0x372)
 #define SPR_440_INV3          (0x373)
 #define SPR_440_ITV0          (0x374)
 #define SPR_440_ITV1          (0x375)
index 02b7aad9b0e3739c8127935fe7e95c131f21909d..3b6ccb5ea4e60f2269cd697d749ac23d478a61c0 100644 (file)
@@ -5660,6 +5660,16 @@ static void register_power_common_book4_sprs(CPUPPCState *env)
                  SPR_NOACCESS, SPR_NOACCESS,
                  &spr_read_tfmr, &spr_write_tfmr,
                  0x00000000);
+    spr_register_hv(env, SPR_TRIG1, "TRIG1",
+                 SPR_NOACCESS, SPR_NOACCESS,
+                 &spr_access_nop, &spr_write_generic,
+                 &spr_access_nop, &spr_write_generic,
+                 0x00000000);
+    spr_register_hv(env, SPR_TRIG2, "TRIG2",
+                 SPR_NOACCESS, SPR_NOACCESS,
+                 &spr_access_nop, &spr_write_generic,
+                 &spr_access_nop, &spr_write_generic,
+                 0x00000000);
 #endif
 }