Commit b87ee4dd04 for qemu.org

commit b87ee4dd0447d7b5e0cfbce38c531b94573fb032
Author: Sid Manning <sidneym@quicinc.com>
Date:   Tue Sep 1 10:33:45 2026 -0700

    hw/intc: clear pending bit on l2vic de-assertion

    l2vic_set_irq() clears a level-triggered source's pending bit on
    de-assertion, so a source that drops before it is latched into
    int_status is not spuriously re-delivered on the next ciad.
    Edge-triggered sources (int_type set) keep the pulse semantics they
    already have via SOFT_INT/set_irq(level=1).

    Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
    Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

diff --git a/hw/intc/hex-l2vic.c b/hw/intc/hex-l2vic.c
index f07ec850d4..a986f0bdf3 100644
--- a/hw/intc/hex-l2vic.c
+++ b/hw/intc/hex-l2vic.c
@@ -299,6 +299,8 @@ static void l2vic_set_irq(void *opaque, int irq, int level)

     if (level) {
         set_bit32(irq, s->int_pending);
+    } else if (!test_bit32(irq, s->int_type)) {
+        clear_bit32(irq, s->int_pending);
     }
     l2vic_update(s, irq);
 }