summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorNikunj A Dadhania2016-09-19 08:29:29 +0200
committerDavid Gibson2016-09-23 04:39:07 +0200
commit056b977521a907e9b84c0ad0017a082ff56e69f3 (patch)
treef834c3a552c1e187f78e3a310a2cd6d585ac6a0f /hw
parentEnable H_CLEAR_MOD and H_CLEAR_REF hypercalls on KVM/PPC64. (diff)
downloadqemu-056b977521a907e9b84c0ad0017a082ff56e69f3.tar.gz
qemu-056b977521a907e9b84c0ad0017a082ff56e69f3.tar.xz
qemu-056b977521a907e9b84c0ad0017a082ff56e69f3.zip
ppc/xics: account correct irq status
Fix inconsistent irq status, because of this in the trace logs, for e.g. LSI status was 0x7, i.e. XICS_STATUS_ASSERTED, XICS_STATUS_SENT and XICS_STATUS_REJECTED all set, which did not make sense. So the REJECTED would have been set in earlier interrupt cycle, and then asserted and sent in this current one. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/intc/xics.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index cd48f42046..69162f0328 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -505,8 +505,11 @@ static void ics_reject(ICSState *ics, int nr)
ICSIRQState *irq = ics->irqs + nr - ics->offset;
trace_xics_ics_reject(nr, nr - ics->offset);
- irq->status |= XICS_STATUS_REJECTED; /* Irrelevant but harmless for LSI */
- irq->status &= ~XICS_STATUS_SENT; /* Irrelevant but harmless for MSI */
+ if (irq->flags & XICS_FLAGS_IRQ_MSI) {
+ irq->status |= XICS_STATUS_REJECTED;
+ } else if (irq->flags & XICS_FLAGS_IRQ_LSI) {
+ irq->status &= ~XICS_STATUS_SENT;
+ }
}
static void ics_resend(ICSState *ics)