[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH] openpic: Initialize destmask at reset
From: |
Paul Janzen |
Subject: |
[Qemu-ppc] [PATCH] openpic: Initialize destmask at reset |
Date: |
Tue, 20 May 2014 21:44:43 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) |
The openpic emulation code maintains an allowable-CPU's bitmap
("destmask") for each IRQ which is calculated from the IDR register
value whenever the guest OS writes to it. However, if the guest OS
relies on the system to set the IDR register to a default value at
reset, and does not write IDR, then destmask does not get updated, and
interrupts do not get propagated to the guest. Initialize destmask from
the provided idr_reset value in openpic_reset().
Signed-off-by: Paul Janzen <address@hidden>
---
hw/intc/openpic.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index be76fbd..53aa006 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -551,6 +551,7 @@ static void openpic_reset(DeviceState *d)
for (i = 0; i < opp->max_irq; i++) {
opp->src[i].ivpr = opp->ivpr_reset;
opp->src[i].idr = opp->idr_reset;
+ opp->src[i].destmask = opp->idr_reset & ((1UL << opp->nb_cpus) - 1);
switch (opp->src[i].type) {
case IRQ_TYPE_NORMAL:
--
1.7.1
- [Qemu-ppc] [PATCH] openpic: Initialize destmask at reset,
Paul Janzen <=