Received: from eggs.gnu.org ([2001:4830:134:3::10]:39665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3cz7-0006lN-Kp for qemu-devel@nongnu.org; Thu, 27 Apr 2017 02:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3cz4-0003sL-HX for qemu-devel@nongnu.org; Thu, 27 Apr 2017 02:33:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d3cz4-0003rO-7i for qemu-devel@nongnu.org; Thu, 27 Apr 2017 02:32:58 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3R6T9rO122633 for ; Thu, 27 Apr 2017 02:32:57 -0400 Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146]) by mx0a-001b2d01.pphosted.com with ESMTP id 2a34vxmnw3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 27 Apr 2017 02:32:56 -0400 Received: from localhost by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Apr 2017 16:32:53 +1000 Date: Thu, 27 Apr 2017 16:31:53 +1000 From: Sam Bobroff References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Message-Id: <20170427063153.GB11487@tungsten.ozlabs.ibm.com> Subject: [Qemu-devel] [PATCH 1/2] ppc/xics: Fix stale irq->status bits after get List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: qemu-devel@nongnu.org, david@gibson.dropbear.id.au 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 --- hw/intc/xics_kvm.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.12.1.382.gc0f9c7058