From nobody Mon Feb 9 20:12:23 2026 Delivered-To: importer@patchew.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=1612938531; cv=none; d=zohomail.com; s=zohoarc; b=bp8De2vMTJ3v5PZhqtfcpOp/Vc7yqEsZQ6MJTI/xn72QKXGftrvTjcJe5yxiJ1FgGvQ5pQ/bMVYnqEoyM9GDuIF8mCTzOc+91AqIhO6Z73jVtB8tPzj6BAOw3+3ADCBreWwdyl8oyRKY2Dji60e2vr4o1mmXyY24P/f1Sjy6Q+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612938531; 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=+bnXaZq1ea5UwjttDqdxyVqf+RXMovNQqWWrsCdWnRk=; b=RnwWDBchpqwYx48nQvjTbYnfF+hoR5jimOKQxXcR9v3/UknNKH+b2bDJldzM9zZzdOFds746jpI/9vjWVtjgIjkAaBLJRlifuivXKwKE4NCuwclJdqUVti16+O327CQ1x0zKc15dQirjKTbcjVAuNQPD67W18Rl78DZMsvG4Dfk= 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 1612938531431954.210963584378; Tue, 9 Feb 2021 22:28:51 -0800 (PST) Received: from localhost ([::1]:38834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9iza-00063r-Cq for importer@patchew.org; Wed, 10 Feb 2021 01:28:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9ip4-0001Z7-Um; Wed, 10 Feb 2021 01:17:58 -0500 Received: from ozlabs.org ([203.11.71.1]:47673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9ip1-0000Ln-0L; Wed, 10 Feb 2021 01:17:58 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 4Db8gl0ntwz9sW2; Wed, 10 Feb 2021 17:17:38 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1612937859; bh=m0UzTBFIlniLw6okDxCKohuffYVMR2kGQJPBn0vUYhw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lc+MxiqQ4mCdrbXtzXBkTJREj/9JNCUFH88rGnOGkuDDh+rNhQixLq4OPGQUTpWKm 9HftH09HsJZm3j04f8bDWboT4XhSaBFIbJdqAL3eL3tZYfoso3DQ/JfkdNxz9lgIqT QspjgznTEZUa077nAB+Up86CXdmAKV1VfNUAl+pE= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 05/19] ppc/pnv: Add trace events for PCI event notification Date: Wed, 10 Feb 2021 17:17:21 +1100 Message-Id: <20210210061735.304384-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210210061735.304384-1-david@gibson.dropbear.id.au> References: <20210210061735.304384-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: David Gibson , 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" X-ZohoMail-DKIM: fail (Header signature does not verify) From: C=C3=A9dric Le Goater On POWER9 systems, PHB controllers signal the XIVE interrupt controller of a source interrupt notification using a store on a MMIO region. Add traces for such events. Signed-off-by: C=C3=A9dric Le Goater Message-Id: <20210126171059.307867-2-clg@kaod.org> Signed-off-by: David Gibson --- hw/intc/pnv_xive.c | 3 +++ hw/intc/trace-events | 3 +++ hw/pci-host/pnv_phb4.c | 3 +++ hw/pci-host/trace-events | 3 +++ 4 files changed, 12 insertions(+) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 5f69626b3a..ad43483612 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -24,6 +24,7 @@ #include "hw/ppc/xive_regs.h" #include "hw/qdev-properties.h" #include "hw/ppc/ppc.h" +#include "trace.h" =20 #include =20 @@ -1319,6 +1320,8 @@ static void pnv_xive_ic_hw_trigger(PnvXive *xive, hwa= ddr addr, uint64_t val) uint8_t blk; uint32_t idx; =20 + trace_pnv_xive_ic_hw_trigger(addr, val); + if (val & XIVE_TRIGGER_END) { xive_error(xive, "IC: END trigger at @0x%"HWADDR_PRIx" data 0x%"PR= Ix64, addr, val); diff --git a/hw/intc/trace-events b/hw/intc/trace-events index 8ed397a0d5..45ddaf48df 100644 --- a/hw/intc/trace-events +++ b/hw/intc/trace-events @@ -236,3 +236,6 @@ xive_tctx_tm_write(uint64_t offset, unsigned int size, = uint64_t value) "@0x0x%"P xive_tctx_tm_read(uint64_t offset, unsigned int size, uint64_t value) "@0x= 0x%"PRIx64" sz=3D%d val=3D0x%" PRIx64 xive_presenter_notify(uint8_t nvt_blk, uint32_t nvt_idx, uint8_t ring) "fo= und NVT 0x%x/0x%x ring=3D0x%x" xive_end_source_read(uint8_t end_blk, uint32_t end_idx, uint64_t addr) "EN= D 0x%x/0x%x @0x0x%"PRIx64 + +# pnv_xive.c +pnv_xive_ic_hw_trigger(uint64_t addr, uint64_t val) "@0x%"PRIx64" val=3D0x= %"PRIx64 diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 6328e985f8..54f57c660a 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -22,6 +22,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "qom/object.h" +#include "trace.h" =20 #define phb_error(phb, fmt, ...) \ qemu_log_mask(LOG_GUEST_ERROR, "phb4[%d:%d]: " fmt "\n", \ @@ -1257,6 +1258,8 @@ static void pnv_phb4_xive_notify(XiveNotifier *xf, ui= nt32_t srcno) uint64_t data =3D XIVE_TRIGGER_PQ | offset | srcno; MemTxResult result; =20 + trace_pnv_phb4_xive_notify(notif_port, data); + address_space_stq_be(&address_space_memory, notif_port, data, MEMTXATTRS_UNSPECIFIED, &result); if (result !=3D MEMTX_OK) { diff --git a/hw/pci-host/trace-events b/hw/pci-host/trace-events index d19ca9aef6..7d8063ac42 100644 --- a/hw/pci-host/trace-events +++ b/hw/pci-host/trace-events @@ -20,3 +20,6 @@ unin_data_write(uint64_t addr, unsigned len, uint64_t val= ) "write addr 0x%"PRIx6 unin_data_read(uint64_t addr, unsigned len, uint64_t val) "read addr 0x%"P= RIx64 " len %d val 0x%"PRIx64 unin_write(uint64_t addr, uint64_t value) "addr=3D0x%" PRIx64 " val=3D0x%"= PRIx64 unin_read(uint64_t addr, uint64_t value) "addr=3D0x%" PRIx64 " val=3D0x%"P= RIx64 + +# pnv_phb4.c +pnv_phb4_xive_notify(uint64_t notif_port, uint64_t data) "notif=3D@0x%"PRI= x64" data=3D0x%"PRIx64 --=20 2.29.2