From nobody Fri Nov 7 04:10:42 2025 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; 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 1546408921806900.0313332769265; Tue, 1 Jan 2019 22:02:01 -0800 (PST) Received: from localhost ([127.0.0.1]:42144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geZbM-00068Q-DT for importer@patchew.org; Wed, 02 Jan 2019 01:02:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1geZYa-0003hB-Q3 for qemu-devel@nongnu.org; Wed, 02 Jan 2019 00:59:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1geZYX-0006Rp-Ls for qemu-devel@nongnu.org; Wed, 02 Jan 2019 00:59:08 -0500 Received: from 14.mo4.mail-out.ovh.net ([46.105.40.29]:41944) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1geZYX-0006RK-Er for qemu-devel@nongnu.org; Wed, 02 Jan 2019 00:59:05 -0500 Received: from player773.ha.ovh.net (unknown [10.109.159.139]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id 35B5D1C7C23 for ; Wed, 2 Jan 2019 06:59:04 +0100 (CET) Received: from kaod.org (lfbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player773.ha.ovh.net (Postfix) with ESMTPSA id 0407713D1AF4; Wed, 2 Jan 2019 05:58:54 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Wed, 2 Jan 2019 06:57:41 +0100 Message-Id: <20190102055743.5052-9-clg@kaod.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190102055743.5052-1-clg@kaod.org> References: <20190102055743.5052-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 5992039308334828518 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrudehgdeltdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.40.29 Subject: [Qemu-devel] [PATCH 08/10] ppc/xics: allow ICSState to have an offset 0 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" commit 15ed653fa49a ("ppc/xics: An ICS with offset 0 is assumed to be uninitialized") introduced an extra check on the ICS offset which is not strictly necessary. Revert the change to be able to map the XICS IRQ number space on the XIVE IRQ number space. Signed-off-by: C=C3=A9dric Le Goater --- include/hw/ppc/xics.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 7668c381a887..07508cbd217e 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -139,8 +139,7 @@ struct ICSState { =20 static inline bool ics_valid_irq(ICSState *ics, uint32_t nr) { - return (ics->offset !=3D 0) && (nr >=3D ics->offset) - && (nr < (ics->offset + ics->nr_irqs)); + return (nr >=3D ics->offset) && (nr < (ics->offset + ics->nr_irqs)); } =20 struct ICSIRQState { --=20 2.20.1