From nobody Thu Nov 13 07:36:24 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1578462278; cv=none; d=zohomail.com; s=zohoarc; b=IccLxeIfKCIf/Ltvnqmj61P2SdAqQ1kvAT+jWSJ6KPTkTW6DjZS6C5R1TBMN7yqsEoTOE/PEVu/yXS8drD4RqPgZSc0UWOMeJVwzBxqfoB9XyC7QNYg2C5hGEux5mKRcq3cSTcaZpvJNGrnYAjLJnsGo0pAw83RjWacGxUYw2G0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578462278; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zgVuvEObvDBOlFoES00YLVPDsi2fHpDa28HxzjUA2p0=; b=GRkN1Zli37sRlfp6lyCn+f+8sQXO2Gt2WAtLGtjCSoEDAgyxg37tD69UZtfHko1rMtb29nDowNDwxsUnRHGYwAxowH30eivBEGR+/P/zGpOvmsux1uv2n8+j3/NuUC74/X40TrkEu7ZZ4anrqfY1sYojTUNFRSXy2g0MDP2kB/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578462278014523.1406680494978; Tue, 7 Jan 2020 21:44:38 -0800 (PST) Received: from localhost ([::1]:37276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ip48y-00087k-NU for importer@patchew.org; Wed, 08 Jan 2020 00:44:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48074) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ip3oy-0004T2-OE for qemu-devel@nongnu.org; Wed, 08 Jan 2020 00:23:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ip3ox-0003L1-Hw for qemu-devel@nongnu.org; Wed, 08 Jan 2020 00:23:56 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:41053 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ip3ox-0002mS-6D; Wed, 08 Jan 2020 00:23:55 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 47syMF2rBhz9sSc; Wed, 8 Jan 2020 16:23:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1578461001; bh=DofJhxtpmIKnTqtj9CNLAQXbsiC/mOgeOIPt8kusFHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eSQkt3IhvfEaMU1kMztptQ1qc/ouMllwOmuwNveZRTTqbpZs5SQdYIxaaGGzQMixx rKKFPLn67UD54ic0MdWxxYqKkXzbwjt0rPuTDaxkrukK3Xg1S5reVCOFBc3xR60h4G 7D9gbHsMUYqpCAwOoQia3falgPbWXm5u3PhCTBZA= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 12/26] spapr/xive: remove redundant check in spapr_match_nvt() Date: Wed, 8 Jan 2020 16:22:58 +1100 Message-Id: <20200108052312.238710-13-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200108052312.238710-1-david@gibson.dropbear.id.au> References: <20200108052312.238710-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 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: 203.11.71.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater spapr_match_nvt() is a XIVE operation and is used by the machine to look for a matching target when an event notification is being delivered. An assert checks that spapr_match_nvt() is called only when the machine has selected the XIVE interrupt mode but it is redundant with the XIVE_PRESENTER() dynamic cast. Apply the cast to spapr->active_intc and remove the assert. Signed-off-by: C=C3=A9dric Le Goater Message-Id: <20200106163207.4608-1-clg@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index eb0b84d300..30a5fbd3be 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4195,19 +4195,19 @@ static void spapr_pic_print_info(InterruptStatsProv= ider *obj, kvm_irqchip_in_kernel() ? "in-kernel" : "emulated"); } =20 +/* + * This is a XIVE only operation + */ static int spapr_match_nvt(XiveFabric *xfb, uint8_t format, uint8_t nvt_blk, uint32_t nvt_idx, bool cam_ignore, uint8_t priority, uint32_t logic_serv, XiveTCTXMatch *match) { SpaprMachineState *spapr =3D SPAPR_MACHINE(xfb); - XivePresenter *xptr =3D XIVE_PRESENTER(spapr->xive); + XivePresenter *xptr =3D XIVE_PRESENTER(spapr->active_intc); XivePresenterClass *xpc =3D XIVE_PRESENTER_GET_CLASS(xptr); int count; =20 - /* This is a XIVE only operation */ - assert(spapr->active_intc =3D=3D SPAPR_INTC(spapr->xive)); - count =3D xpc->match_nvt(xptr, format, nvt_blk, nvt_idx, cam_ignore, priority, logic_serv, match); if (count < 0) { --=20 2.24.1