[PATCH v4] hw/intc/sifive_clint: Fix muldiv64 overflow in sifive_clint_write_timecmp()

2021-08-27 Thread David Hoppenbrouwers
diate timer interrupt. By limiting `next` to `INT64_MAX` no overflow will happen while the timer will still be effectively set to "infinitely" far in the future. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/493 Signed-off-by: David Hoppenbrouwers --- I addressed the potential

[PATCH v3] hw/intc/sifive_clint: Fix overflow in sifive_clint_write_timecmp()

2021-08-18 Thread David Hoppenbrouwers
diate timer interrupt. By limiting `next` to `INT64_MAX` no overflow will happen while the timer will still be effectively set to "infinitely" far in the future. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/493 Signed-off-by: David Hoppenbrouwers --- I did not account for the

[PATCH v2] hw/intc/sifive_clint: Fix overflow in sifive_clint_write_timecmp()

2021-08-16 Thread David Hoppenbrouwers
"infinitely" far in the future. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/493 Signed-off-by: David Hoppenbrouwers --- I wrongly used `MAX` instead of `MIN`. I've amended the patch. hw/intc/sifive_clint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/intc/sifi

[PATCH] hw/intc/sifive_clint: Fix overflow in sifive_clint_write_timecmp()

2021-08-16 Thread David Hoppenbrouwers
"infinitely" far in the future. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/493 Signed-off-by: David Hoppenbrouwers --- hw/intc/sifive_clint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/intc/sifive_clint.c b/hw/intc/sifive_clint.c index 0f41e5ea1c..e65e71e5ec 10064