From: Sam Bobroff Date: Thu, 27 Apr 2017 06:31:53 +0000 (+1000) Subject: ppc/xics: Fix stale irq->status bits after get X-Git-Tag: v2.10.0-rc0~197^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=063cb7cbc9f65ff4095df884cfcd7eaf3a160555;p=thirdparty%2Fqemu.git 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 Signed-off-by: David Gibson --- diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 42e0e0ef848..03c1fc77cbf 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;