aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-05-12 13:10:52 +1000
committerCédric Le Goater <clg@redhat.com>2025-07-21 08:03:53 +0200
commitca0081ef7ece566e877e9f4ceab9e9988d08fb78 (patch)
tree67977283225bc1a4ada8b59f0abb22f2a068cc57 /include/hw
parent565e6d4d2151e856026ee60d16c12a61e667cd15 (diff)
downloadqemu-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/hw')
-rw-r--r--include/hw/ppc/xive.h1
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);