From: Alex Bennée Date: Wed, 24 Jun 2026 12:45:22 +0000 (+0100) Subject: target/arm: split evaluation of CNTHCTL timer IRQ masks X-Git-Tag: v11.1.0-rc0~36^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6c23f8a2083258eea3ed434a10095dc9ea0afbd;p=thirdparty%2Fqemu.git target/arm: split evaluation of CNTHCTL timer IRQ masks Whether the physical and virtual timer IRQs are masked are independent of each other so the checking of CNTHCTL:CNTPMASK shouldn't depend of not changing CNTVMASK. While unlikely to be seen in real life we should still make sure we behave correctly. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-id: 20260624124527.1018912-2-alex.bennee@linaro.org Signed-off-by: Peter Maydell --- diff --git a/target/arm/helper.c b/target/arm/helper.c index ddca634538..202ac99f69 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -1802,7 +1802,8 @@ static void gt_cnthctl_write(CPUARMState *env, const ARMCPRegInfo *ri, if ((oldval ^ value) & R_CNTHCTL_CNTVMASK_MASK) { gt_update_irq(cpu, GTIMER_VIRT); - } else if ((oldval ^ value) & R_CNTHCTL_CNTPMASK_MASK) { + } + if ((oldval ^ value) & R_CNTHCTL_CNTPMASK_MASK) { gt_update_irq(cpu, GTIMER_PHYS); } }