From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7272BC52D6F for ; Wed, 7 Aug 2024 20:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xWZLjmHVUaFbudn6mhIyw0Tt+L18x2TkIcL6QcrIeDk=; b=nTItLlYYH895epkRdYjrNK7cSW h7T5ugmBaoXCEc4p7ME3CPuKPH3akkPnCwsIOtP1WsyjXzoB1DnDK/CDRwHwasZ2K2ldKhhzk3A+C NswQ/JWTemnoUM7a6cE/QveyfQfuOqFuzGHRpzSEIDlljOWhL2JmIQLw0NW7Y5kIfxm/B52VVdPqi +pR3IxmnLFw3xALdWp6LyUD4WSxIV2OeVD7ilcrptyfONH/lHwkmRYm4HdeD2x3V8AfNxHI84FHsU KCEuOKEeX+UpnInNNxenB1VrDcVHdBIiu/4qzmHVRAzJZxbSVJSEke7X3CL6T68JlzbNf7onesHGM 3IRE+VuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbmsX-000000068Ti-22v4; Wed, 07 Aug 2024 20:03:25 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbmrx-000000068Jh-0lg6; Wed, 07 Aug 2024 20:02:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id ED668CE1268; Wed, 7 Aug 2024 20:02:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E624C32781; Wed, 7 Aug 2024 20:02:42 +0000 (UTC) Date: Wed, 7 Aug 2024 16:02:41 -0400 From: Steven Rostedt To: Liju-clr Chen Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Catalin Marinas , Will Deacon , Masami Hiramatsu , Mathieu Desnoyers , Richard Cochran , Matthias Brugger , AngeloGioacchino Del Regno , Yingshiuan Pan , Ze-yu Wang , , , , , , , , Shawn Hsiao , PeiLun Suei , Chi-shen Yeh , Kevenny Hsieh Subject: Re: [PATCH v12 20/24] virt: geniezone: Add tracing support for hyp call and vcpu exit_reason Message-ID: <20240807160241.2370ae9b@gandalf.local.home> In-Reply-To: <20240730082436.9151-21-liju-clr.chen@mediatek.com> References: <20240730082436.9151-1-liju-clr.chen@mediatek.com> <20240730082436.9151-21-liju-clr.chen@mediatek.com> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_130249_423027_6525AA95 X-CRM114-Status: GOOD ( 15.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 30 Jul 2024 16:24:32 +0800 Liju-clr Chen wrote: > From: Liju Chen >=20 > Add tracepoints for hypervisor calls and VCPU exit reasons in GenieZone > driver. It aids performance debugging by providing more information > about hypervisor operations and VCPU behavior. >=20 > Command Usage: > echo geniezone:* >> /sys/kernel/tracing/set_event > echo 1 > /sys/kernel/tracing/tracing_on > echo 0 > /sys/kernel/tracing/tracing_on > cat /sys/kernel/tracing/trace >=20 > For example: > crosvm_vcpu0-4874 [007] ..... 94.757349: mtk_hypcall_enter: id=3D0x= fb001005 > crosvm_vcpu0-4874 [007] ..... 94.760902: mtk_hypcall_leave: id=3D0x= fb001005 invalid=3D0 > crosvm_vcpu0-4874 [007] ..... 94.760902: mtk_vcpu_exit: vcpu exit_r= eason=3DIRQ(0x92920003) >=20 > This example tracks a hypervisor function call by an ID (`0xbb001005`) > from initiation to termination, which is supported (invalid=3D0). A vCPU > exit is triggered by an Interrupt Request (IRQ) (exit reason: 0x92920003). >=20 > /* VM exit reason */ > enum { > GZVM_EXIT_UNKNOWN =3D 0x92920000, > GZVM_EXIT_MMIO =3D 0x92920001, > GZVM_EXIT_HYPERCALL =3D 0x92920002, > GZVM_EXIT_IRQ =3D 0x92920003, > GZVM_EXIT_EXCEPTION =3D 0x92920004, > GZVM_EXIT_DEBUG =3D 0x92920005, > GZVM_EXIT_FAIL_ENTRY =3D 0x92920006, > GZVM_EXIT_INTERNAL_ERROR =3D 0x92920007, > GZVM_EXIT_SYSTEM_EVENT =3D 0x92920008, > GZVM_EXIT_SHUTDOWN =3D 0x92920009, > GZVM_EXIT_GZ =3D 0x9292000a, > }; >=20 > Signed-off-by: Yi-De Wu > Signed-off-by: Liju Chen =46rom a tracing POV, I don't see any issues with this patch. Reviewed-by: Steven Rostedt (Google) -- Steve > --- > arch/arm64/geniezone/vm.c | 4 ++ > drivers/virt/geniezone/gzvm_vcpu.c | 3 ++ > include/trace/events/geniezone.h | 84 ++++++++++++++++++++++++++++++ > 3 files changed, 91 insertions(+) > create mode 100644 include/trace/events/geniezone.h