qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Cc: "Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PULL 02/35] ppc: Add stub implementation of TRIG SPRs
Date: Mon,  4 Sep 2023 11:05:57 +0200	[thread overview]
Message-ID: <20230904090630.725952-3-clg@kaod.org> (raw)
In-Reply-To: <20230904090630.725952-1-clg@kaod.org>

From: Joel Stanley <joel@jms.id.au>

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      |  2 ++
 target/ppc/cpu_init.c | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 25fac9577aa4..6826702ea658 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -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)
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 02b7aad9b0e3..3b6ccb5ea4e6 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -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
 }
 
-- 
2.41.0



  parent reply	other threads:[~2023-09-04  9:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04  9:05 [PULL 00/35] ppc queue Cédric Le Goater
2023-09-04  9:05 ` [PULL 01/35] target/ppc: Generate storage interrupts for radix RC changes Cédric Le Goater
2023-09-04  9:05 ` Cédric Le Goater [this message]
2023-09-04  9:05 ` [PULL 03/35] target/ppc: Remove single-step suppression inside 0x100-0xf00 Cédric Le Goater
2023-09-04  9:05 ` [PULL 04/35] target/ppc: Improve book3s branch trace interrupt for v2.07S Cédric Le Goater
2023-09-04  9:06 ` [PULL 05/35] target/ppc: Suppress single step interrupts on rfi-type instructions Cédric Le Goater
2023-09-04  9:06 ` [PULL 06/35] target/ppc: Implement breakpoint debug facility for v2.07S Cédric Le Goater
2023-09-04  9:06 ` [PULL 07/35] target/ppc: Implement watchpoint " Cédric Le Goater
2023-09-04  9:06 ` [PULL 08/35] spapr: implement H_SET_MODE debug facilities Cédric Le Goater
2023-09-04  9:06 ` [PULL 09/35] ppc/vhyp: reset exception state when handling vhyp hcall Cédric Le Goater
2023-09-04  9:06 ` [PULL 10/35] ppc/vof: Fix missed fields in VOF cleanup Cédric Le Goater
2023-09-04  9:06 ` [PULL 11/35] hw/ppc/ppc.c: Tidy over-long lines Cédric Le Goater
2023-09-04  9:06 ` [PULL 12/35] hw/ppc: Introduce functions for conversion between timebase and nanoseconds Cédric Le Goater
2023-09-04  9:06 ` [PULL 13/35] host-utils: Add muldiv64_round_up Cédric Le Goater
2023-09-04  9:06 ` [PULL 14/35] hw/ppc: Round up the decrementer interval when converting to ns Cédric Le Goater
2023-09-04  9:06 ` [PULL 15/35] hw/ppc: Avoid decrementer rounding errors Cédric Le Goater
2023-09-04  9:06 ` [PULL 16/35] target/ppc: Sign-extend large decrementer to 64-bits Cédric Le Goater
2023-09-04  9:06 ` [PULL 17/35] hw/ppc: Always store the decrementer value Cédric Le Goater
2023-09-04  9:06 ` [PULL 18/35] target/ppc: Migrate DECR SPR Cédric Le Goater
2023-09-04  9:06 ` [PULL 19/35] hw/ppc: Reset timebase facilities on machine reset Cédric Le Goater
2023-09-04  9:06 ` [PULL 20/35] hw/ppc: Read time only once to perform decrementer write Cédric Le Goater
2023-09-04  9:06 ` [PULL 21/35] target/ppc: Fix CPU reservation migration for record-replay Cédric Le Goater
2023-09-04  9:06 ` [PULL 22/35] target/ppc: Fix timebase reset with record-replay Cédric Le Goater
2023-09-04  9:06 ` [PULL 23/35] spapr: Fix machine reset deadlock from replay-record Cédric Le Goater
2023-09-04  9:06 ` [PULL 24/35] spapr: Fix record-replay machine reset consuming too many events Cédric Le Goater
2023-09-04  9:06 ` [PULL 25/35] tests/avocado: boot ppc64 pseries replay-record test to Linux VFS mount Cédric Le Goater
2023-09-04  9:06 ` [PULL 26/35] tests/avocado: reverse-debugging cope with re-executing breakpoints Cédric Le Goater
2023-09-04  9:06 ` [PULL 27/35] tests/avocado: ppc64 reverse debugging tests for pseries and powernv Cédric Le Goater
2023-09-04  9:06 ` [PULL 28/35] target/ppc: Fix LQ, STQ register-pair order for big-endian Cédric Le Goater
2023-09-04  9:06 ` [PULL 29/35] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr Cédric Le Goater
2023-09-04  9:06 ` [PULL 30/35] hw/ppc/e500: fix broken snapshot replay Cédric Le Goater
2023-09-04  9:06 ` [PULL 31/35] target/ppc: Fix the order of kvm_enable judgment about kvmppc_set_interrupt() Cédric Le Goater
2023-09-04  9:06 ` [PULL 32/35] ppc/xive: Use address_space routines to access the machine RAM Cédric Le Goater
2023-09-04  9:06 ` [PULL 33/35] ppc/xive: Introduce a new XiveRouter end_notify() handler Cédric Le Goater
2023-09-04  9:06 ` [PULL 34/35] ppc/xive: Handle END triggers between chips with MMIOs Cédric Le Goater
2023-09-04  9:06 ` [PULL 35/35] ppc/xive: Add support for the PC MMIOs Cédric Le Goater
2023-09-06  6:22 ` [PULL 00/35] ppc queue Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230904090630.725952-3-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=joel@jms.id.au \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).