diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2025-05-12 13:10:52 +1000 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-07-21 08:03:53 +0200 |
commit | ca0081ef7ece566e877e9f4ceab9e9988d08fb78 (patch) | |
tree | 67977283225bc1a4ada8b59f0abb22f2a068cc57 /include | |
parent | 565e6d4d2151e856026ee60d16c12a61e667cd15 (diff) | |
download | qemu-ca0081ef7ece566e877e9f4ceab9e9988d08fb78.zip qemu-ca0081ef7ece566e877e9f4ceab9e9988d08fb78.tar.gz qemu-ca0081ef7ece566e877e9f4ceab9e9988d08fb78.tar.bz2 |
ppc/xive: Check TIMA operations validity
Certain TIMA operations should only be performed when a ring is valid,
others when the ring is invalid, and they are considered undefined if
used incorrectly. Add checks for this condition.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
Reviewed-by: Michael Kowal <kowal@linux.ibm.com>
Tested-by: Gautam Menghani <gautam@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20250512031100.439842-44-npiggin@gmail.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/xive.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 2372d10..b7ca854 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -365,6 +365,7 @@ static inline uint32_t xive_tctx_word2(uint8_t *ring) return *((uint32_t *) &ring[TM_WORD2]); } +bool xive_ring_valid(XiveTCTX *tctx, uint8_t ring); bool xive_nsr_indicates_exception(uint8_t ring, uint8_t nsr); bool xive_nsr_indicates_group_exception(uint8_t ring, uint8_t nsr); uint8_t xive_nsr_exception_ring(uint8_t ring, uint8_t nsr); |