diff options
| author | Sam Bobroff | 2017-04-27 08:31:53 +0200 |
|---|---|---|
| committer | David Gibson | 2017-05-11 01:45:15 +0200 |
| commit | 063cb7cbc9f65ff4095df884cfcd7eaf3a160555 (patch) | |
| tree | 6b8763965d15d0b80e9f8f27820f9a322ea5d60d | |
| parent | target/ppc: do not reset reserve_addr in exec_enter (diff) | |
| download | qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.tar.gz qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.tar.xz qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.zip | |
ppc/xics: Fix stale irq->status bits after get
ics_get_kvm_state() "or"s set bits into irq->status but does not mask
out clear bits.
Correct this by initializing the IRQ status to zero before adding bits
to it.
Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
| -rw-r--r-- | hw/intc/xics_kvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 42e0e0ef84..03c1fc77cb 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -213,6 +213,7 @@ static void ics_get_kvm_state(ICSState *ics) irq->priority = irq->saved_priority; } + irq->status = 0; if (state & KVM_XICS_PENDING) { if (state & KVM_XICS_LEVEL_SENSITIVE) { irq->status |= XICS_STATUS_ASSERTED; |
