diff options
| author | Nicholas Piggin <npiggin@gmail.com> | 2025-05-12 13:10:24 +1000 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-07-21 08:03:52 +0200 |
| commit | 261626dce11311ba4e866272c9a2c0990c53d85c (patch) | |
| tree | 9159ba126f79ae27238b818b2dddda3a3acdc9a2 /include/hw/ppc/xive.h | |
| parent | 9d466ab9b6f27a5d5b7a0ec5a7ad6f60e82fafda (diff) | |
| download | focaccia-qemu-261626dce11311ba4e866272c9a2c0990c53d85c.tar.gz focaccia-qemu-261626dce11311ba4e866272c9a2c0990c53d85c.zip | |
ppc/xive: Move NSR decoding into helper functions
Rather than functions to return masks to test NSR bits, have functions to test those bits directly. This should be no functional change, it just makes the code more readable. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Reviewed-by: Michael Kowal <kowal@linux.ibm.com> Reviewed-by: Caleb Schlossin <calebs@linux.ibm.com> Tested-by: Gautam Menghani <gautam@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20250512031100.439842-16-npiggin@gmail.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/ppc/xive.h')
| -rw-r--r-- | include/hw/ppc/xive.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 538f438681..28f0f1b79a 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -365,6 +365,10 @@ static inline uint32_t xive_tctx_word2(uint8_t *ring) return *((uint32_t *) &ring[TM_WORD2]); } +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); + /* * XIVE Router */ |