powerpc/kvm: fix a openpic bug (Liu Yu)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 15 Jan 2009 21:19:54 +0000 (21:19 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 15 Jan 2009 21:19:54 +0000 (21:19 +0000)
An external interrupt should not interrupted in-servicing interrupt with equal priority.

Signed-off-by: Liu Yu <yu.liu@freescale.com>
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6328 c046a42c-6fe2-441c-8c8c-71466251a162

hw/openpic.c

index def20eb..b8da4d7 100644 (file)
@@ -279,7 +279,7 @@ static void IRQ_local_pipe (openpic_t *opp, int n_CPU, int n_IRQ)
     }
     IRQ_get_next(opp, &dst->raised);
     if (IRQ_get_next(opp, &dst->servicing) != -1 &&
-        priority < dst->servicing.priority) {
+        priority <= dst->servicing.priority) {
         DPRINTF("%s: IRQ %d is hidden by servicing IRQ %d on CPU %d\n",
                 __func__, n_IRQ, dst->servicing.next, n_CPU);
         /* Already servicing a higher priority IRQ */