From nobody Tue Feb 10 06:25:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; spf=pass (zoho.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=1568827325; cv=none; d=zoho.com; s=zohoarc; b=YQa22lFJtLoNe9AXn3aXOmcUuSe7hQfUX40c5TeHKrdZOsjDFy4hQknCaTyC0PKT6ACVlRMI373hmlh1rEFGlWtvXGarD9A5UEARU+VBoTlnOcLjhmArKEcrXsJ0zKjvuoFQKYKp4BoLZGsqMt3YSEYEUEIhlNzF4BuF551NEuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568827325; 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:ARC-Authentication-Results; bh=oE7O3nN73nRl/g+pHPgxt2ZyH93GU24CNDGGNfO8DHw=; b=RCDfzrtMOoD6/g8p+914ZvkoG4Q87qUqd2IdtZlFsB50F7z3R0Ufrdhk5ttWhKZKCE6gp91r2XGdmmwV1R6OiirxChkBANPKxR9wBgIVmHG52wv1gz3oFATzWNIt/s2MAS7E3TziRVvxDbV3J6dB+Iwq2IgOTybQxrXP/jFrrHA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 15688273254771004.6230669572731; Wed, 18 Sep 2019 10:22:05 -0700 (PDT) Received: from localhost ([::1]:33240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAdeS-0008N4-D4 for importer@patchew.org; Wed, 18 Sep 2019 13:22:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55510) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAcUI-0003LI-TC for qemu-devel@nongnu.org; Wed, 18 Sep 2019 12:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAcUH-0002o3-Kt for qemu-devel@nongnu.org; Wed, 18 Sep 2019 12:07:26 -0400 Received: from 6.mo4.mail-out.ovh.net ([188.165.36.253]:36343) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iAcUH-0002mZ-FA for qemu-devel@nongnu.org; Wed, 18 Sep 2019 12:07:25 -0400 Received: from player799.ha.ovh.net (unknown [10.109.160.46]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id E63A6207926 for ; Wed, 18 Sep 2019 18:07:23 +0200 (CEST) Received: from kaod.org (lfbn-1-2240-157.w90-76.abo.wanadoo.fr [90.76.60.157]) (Authenticated sender: clg@kaod.org) by player799.ha.ovh.net (Postfix) with ESMTPSA id C96B49F0E4CD; Wed, 18 Sep 2019 16:07:17 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Wed, 18 Sep 2019 18:06:25 +0200 Message-Id: <20190918160645.25126-6-clg@kaod.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190918160645.25126-1-clg@kaod.org> References: <20190918160645.25126-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6213560114297998310 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudekgdeljecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 188.165.36.253 Subject: [Qemu-devel] [PATCH v4 05/25] ppc/xive: Introduce a XiveFabric interface 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: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The XiveFabric QOM interface should be implemented by the machine. It acts as the PowerBUS interface between the interrupt controller and the system. On HW, the XIVE sub-engine is responsible for the communication with the other chip is the Common Queue (CQ) bridge unit. This interface offers a 'match_nvt' handler to perform the CAM line matching when looking for a XIVE Presenter with a dispatched NVT. Signed-off-by: C=C3=A9dric Le Goater --- include/hw/ppc/xive.h | 22 ++++++++++++++++++++++ hw/intc/xive.c | 10 ++++++++++ 2 files changed, 32 insertions(+) diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 39de45b87cb9..3c2910e10e25 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -399,6 +399,28 @@ int xive_presenter_tctx_match(XivePresenter *xptr, Xiv= eTCTX *tctx, uint8_t nvt_blk, uint32_t nvt_idx, bool cam_ignore, uint32_t logic_serv); =20 +/* + * XIVE Fabric (Interface between Interrupt Controller and Machine) + */ + +typedef struct XiveFabric XiveFabric; + +#define TYPE_XIVE_FABRIC "xive-fabric" +#define XIVE_FABRIC(obj) \ + INTERFACE_CHECK(XiveFabric, (obj), TYPE_XIVE_FABRIC) +#define XIVE_FABRIC_CLASS(klass) \ + OBJECT_CLASS_CHECK(XiveFabricClass, (klass), TYPE_XIVE_FABRIC) +#define XIVE_FABRIC_GET_CLASS(obj) \ + OBJECT_GET_CLASS(XiveFabricClass, (obj), TYPE_XIVE_FABRIC) + +typedef struct XiveFabricClass { + InterfaceClass parent; + int (*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); +} XiveFabricClass; + /* * XIVE END ESBs */ diff --git a/hw/intc/xive.c b/hw/intc/xive.c index fff50429f8ac..7a15a64ed7fe 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -1841,8 +1841,18 @@ static const TypeInfo xive_presenter_info =3D { .class_size =3D sizeof(XivePresenterClass), }; =20 +/* + * XIVE Fabric + */ +static const TypeInfo xive_fabric_info =3D { + .name =3D TYPE_XIVE_FABRIC, + .parent =3D TYPE_INTERFACE, + .class_size =3D sizeof(XiveFabricClass), +}; + static void xive_register_types(void) { + type_register_static(&xive_fabric_info); type_register_static(&xive_source_info); type_register_static(&xive_notifier_info); type_register_static(&xive_presenter_info); --=20 2.21.0