From patchwork Thu May 11 04:14:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 760937 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wNg2d5nWkz9s2s for ; Thu, 11 May 2017 14:23:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="VzOHpIYj"; dkim-atps=neutral Received: from localhost ([::1]:45891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8fdH-0004Ec-E6 for incoming@patchwork.ozlabs.org; Thu, 11 May 2017 00:23:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8fUu-0005Hy-Qe for qemu-devel@nongnu.org; Thu, 11 May 2017 00:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8fUt-0001RB-RQ for qemu-devel@nongnu.org; Thu, 11 May 2017 00:14:40 -0400 Received: from ozlabs.org ([103.22.144.67]:53421) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d8fUt-0001MU-Ev; Thu, 11 May 2017 00:14:39 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wNfrQ6TmPz9sNJ; Thu, 11 May 2017 14:14:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1494476070; bh=GIzkDWlQtVJba/lHWxZWHDzqq4IA+DPEOeJ6UKg9tjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VzOHpIYj2JUdABcil1wMWcsZJ3qSoy+YOe4x/W9+ZZ0o2bVT0ydgXAP/Sp6QMm5HX VyPVlyB8bnTGAWvEns6CjCNIKXyuNqRHj3eh97AY4sQGnwFWqKB9uKm2Pj2WMWsOqV H7g1q2DOAae8ZxlkJS+H41cc2clLo0wMP6W1i94o= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 11 May 2017 14:14:11 +1000 Message-Id: <20170511041426.6488-9-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170511041426.6488-1-david@gibson.dropbear.id.au> References: <20170511041426.6488-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 08/23] ppc/xics: Fix stale irq->status bits after get X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mdroth@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, aik@ozlabs.ru, mark.cave-ayland@ilande.co.uk, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, sjitindarsingh@gmail.com, bharata@linux.vnet.ibm.com, sam.bobroff@au1.ibm.com, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Sam Bobroff 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 --- 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 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;