mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Cédric Le Goater
parent
565e6d4d21
commit
ca0081ef7e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user