diff options
author | Sam Bobroff <sam.bobroff@au1.ibm.com> | 2017-04-27 16:31:53 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-05-11 09:45:15 +1000 |
commit | 063cb7cbc9f65ff4095df884cfcd7eaf3a160555 (patch) | |
tree | 6b8763965d15d0b80e9f8f27820f9a322ea5d60d /hw/intc | |
parent | 139d9023f1410591726bbe35908dcfd9d127aad2 (diff) | |
download | qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.zip qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.tar.gz qemu-063cb7cbc9f65ff4095df884cfcd7eaf3a160555.tar.bz2 |
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>
Diffstat (limited to 'hw/intc')
-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 42e0e0e..03c1fc7 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; |