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/xics_kvm.c | |
parent | 139d9023f1410591726bbe35908dcfd9d127aad2 (diff) |
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/xics_kvm.c')
-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; |