From nobody Tue Feb 10 22:18:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516381322690216.1142307320904; Fri, 19 Jan 2018 09:02:02 -0800 (PST) Received: from localhost ([::1]:59369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eca3G-0004JQ-0h for importer@patchew.org; Fri, 19 Jan 2018 12:02:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecY7W-0002pE-9v for qemu-devel@nongnu.org; Fri, 19 Jan 2018 09:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecY7V-0003mf-Fq for qemu-devel@nongnu.org; Fri, 19 Jan 2018 09:58:18 -0500 Received: from greensocs.com ([193.104.36.180]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecY7P-0003iK-W6; Fri, 19 Jan 2018 09:58:12 -0500 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id A23FE5E2F8; Fri, 19 Jan 2018 15:58:03 +0100 (CET) Received: from greensocs.com ([127.0.0.1]) by localhost (gs-01.greensocs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O-rtn_aslmTM; Fri, 19 Jan 2018 15:58:02 +0100 (CET) Received: by greensocs.com (Postfix, from userid 998) id C3E0965A17; Fri, 19 Jan 2018 15:58:00 +0100 (CET) Received: from michell-laptop.hive.antfield.fr (tima-dhcp-h14.imag.fr [147.171.132.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luc.michel@greensocs.com) by greensocs.com (Postfix) with ESMTPSA id 5AED2319FD0; Fri, 19 Jan 2018 15:58:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1516373883; bh=FlcRuHgM7HCaRegPGAVU37r0+yEoKHRp0N1iIQwTaDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pQSyzoOe8YEX3VzsCnuqBiU0qYrk40pUDsWguGegoVpIR/k7ISPSm8kpbGNWzSd+C rAVeP/0BgzXW0R3YkSfex9vlHAQXx4iLA2OeUlnY+EHnoPgzvgUl7xpvtjDWXlFNqW ydHM0wLmEPmwVIy0igClzSSWJsl07AYsMN1S+aro= X-Virus-Scanned: amavisd-new at greensocs.com Authentication-Results: gs-01.greensocs.com (amavisd-new); dkim=pass (1024-bit key) header.d=greensocs.com header.b=pOv5g5cu; dkim=pass (1024-bit key) header.d=greensocs.com header.b=pOv5g5cu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1516373880; bh=FlcRuHgM7HCaRegPGAVU37r0+yEoKHRp0N1iIQwTaDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pOv5g5cuZZ7Zj7Pm5RiUa7aUMzq0foA9mpsEnqQkKfkM+duwlYilfj9oW1hUQOk6T boLvYnedTZ+cIRgBp4I5b7XQlICVLd3LPsSmW7ProsgIu9P35UGVmVAa1l+YPcV/Z/ tLKbzu0l72EBfvJR9yowiSUcTAo4Fb8kjPbEaUzY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1516373880; bh=FlcRuHgM7HCaRegPGAVU37r0+yEoKHRp0N1iIQwTaDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pOv5g5cuZZ7Zj7Pm5RiUa7aUMzq0foA9mpsEnqQkKfkM+duwlYilfj9oW1hUQOk6T boLvYnedTZ+cIRgBp4I5b7XQlICVLd3LPsSmW7ProsgIu9P35UGVmVAa1l+YPcV/Z/ tLKbzu0l72EBfvJR9yowiSUcTAo4Fb8kjPbEaUzY= From: luc.michel@greensocs.com To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 15:57:55 +0100 Message-Id: <20180119145756.7629-5-luc.michel@greensocs.com> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180119145756.7629-1-luc.michel@greensocs.com> References: <20180119145756.7629-1-luc.michel@greensocs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 193.104.36.180 X-Mailman-Approved-At: Fri, 19 Jan 2018 11:42:55 -0500 Subject: [Qemu-devel] [PATCH 3/4] hw/intc/arm_gic: Fix group priority computation for group 1 IRQs 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: "Edgar E . Iglesias" , Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, Luc MICHEL Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (found 2 invalid signatures) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Luc MICHEL When determining the group priority of a group 1 IRQ, if C_CTRL.CBPR is 0, the non-secure BPR value is used. However, this value must be incremented by one so that it matches the secure world number of implemented priority bits (NS world has one less priority bit compared to the Secure world). Signed-off-by: Luc MICHEL --- hw/intc/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 713de3084f..d0a41a89ae 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -256,7 +256,7 @@ static int gic_get_group_priority(GICState *s, int cpu,= int irq) if (gic_has_groups(s) && !(s->cpu_ctlr[cpu] & GICC_CTLR_CBPR) && GIC_TEST_GROUP(irq, (1 << cpu))) { - bpr =3D s->abpr[cpu]; + bpr =3D s->abpr[cpu] - 1; } else { bpr =3D s->bpr[cpu]; } --=20 2.16.0