aboutsummaryrefslogtreecommitdiff
path: root/qobject/json-lexer.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2022-04-08 12:25:07 -0400
committerAlistair Francis <alistair.francis@wdc.com>2022-04-22 10:35:16 +1000
commit6248a8fe4d8ad84b407d26559c0cb65b9a61eb67 (patch)
tree5398a392c9623f6c22fe310d799e369d9b67822c /qobject/json-lexer.c
parent8f013700ebf96edb4d481e4d2471c3ed246c58ef (diff)
downloadqemu-6248a8fe4d8ad84b407d26559c0cb65b9a61eb67.zip
qemu-6248a8fe4d8ad84b407d26559c0cb65b9a61eb67.tar.gz
qemu-6248a8fe4d8ad84b407d26559c0cb65b9a61eb67.tar.bz2
target/riscv/pmp: fix NAPOT range computation overflow
There is an overflow with the current code where a pmpaddr value of 0x1fffffff is decoded as sa=0 and ea=0 whereas it should be sa=0 and ea=0xffffffff. Fix that by simplifying the computation. There is in fact no need for ctz64() nor special case for -1 to achieve proper results. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <rq81o86n-17ps-92no-p65o-79o88476266@syhkavp.arg> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'qobject/json-lexer.c')
0 files changed, 0 insertions, 0 deletions