diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-01-11 17:10:36 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-01-20 16:04:57 +0000 |
commit | 8f809f699251dcf28811b9693a196ff02367d7d6 (patch) | |
tree | 043802c497cc34fb00f1a05c3d1221b90c5eab2b /hw/intc/xilinx_intc.c | |
parent | 3222165dcb7ec2d390e400d5c886d67b582f37d7 (diff) | |
download | qemu-8f809f699251dcf28811b9693a196ff02367d7d6.zip qemu-8f809f699251dcf28811b9693a196ff02367d7d6.tar.gz qemu-8f809f699251dcf28811b9693a196ff02367d7d6.tar.bz2 |
hw/intc/arm_gicv3_its: Fix event ID bounds checks
In process_its_cmd() and process_mapti() we must check the
event ID against a limit defined by the size field in the DTE,
which specifies the number of ID bits minus one. Convert
this code to our num_foo convention:
* change the variable names
* use uint64_t and 1ULL when calculating the number
of valid event IDs, because DTE.SIZE is 5 bits and
so num_eventids may be up to 2^32
* fix the off-by-one error in the comparison
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20220111171048.3545974-2-peter.maydell@linaro.org
Diffstat (limited to 'hw/intc/xilinx_intc.c')
0 files changed, 0 insertions, 0 deletions