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 F315CD7237B for ; Fri, 23 Jan 2026 12:47:27 +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-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mX6mZXpzNbCV2TDnbq4WSLxIQVd6E20AX9MWOyS2Ky8=; b=o+KllaSCW0efbjl89DME0Rv7wz 9V+Segq+XdEm/pxNPffeqLRZL7nP9NztSnkCAmY2oRx/q0DnwLkD3WertS6lNlwxnPPhxgffELvBY h8LDcp2iH+lKIoGANIyRP0812xHe0ifPrnH28hYkkOa2Hmgkw8rw5RHR21OxGcD86/Ne4J2DDkN0P F3ViTd8Ogm0XCj9wM58Mw0iUlkegloM6Pi0eroaCyhMTRQl4bmdOC72+yOh2VtZRfEi7NH8roJNph vstA2xHhRoOe3VcrTH1j3cfUS3I6XNFyHzS1W/SI1neL6/0T/UrN4x9NHnta0TOPTPqQTUsmZtIGr kNu0H2gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vjGZN-00000008vem-2a0j; Fri, 23 Jan 2026 12:47:21 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vjGZL-00000008veR-1UMW for linux-arm-kernel@lists.infradead.org; Fri, 23 Jan 2026 12:47:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 99B3F44093; Fri, 23 Jan 2026 12:47:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70597C4CEF1; Fri, 23 Jan 2026 12:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769172438; bh=SpX5nlI+FpfkHYgP+EVPBN97fd681gAviX/lFFZNJ+8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ElqLJZSz5em091t3wwNsbj3EjkzZsPNajERR83xC126xn2ZlETjjwYY5Xfhc+Eq0T Ry7QyC9VVuyUs36KXpRrAd3yrMFaohmY69mkcc/mKhPsWdSihRmHNEDcrbZHTvKmrU aElVMF+AiEyTg5qRXU1l/IE/4PVNnNU/AgfhJ6scksN5htvf6kwlSvFC848cjaUhud 11MFzjsrAkfzSzlgUhAoiNOxbRvht4Fh7fl5eLs9ObYC7DCZkpjm5nhQln9FxRDx8b WJUHkkV70HlRrVr9OGDba1wkRNIR4gv+PaU9e7qvsy/ijccFRLwandNAF3AFWeJy0r d5h0eX5253SZA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vjGZI-000000053M0-0V7n; Fri, 23 Jan 2026 12:47:16 +0000 Date: Fri, 23 Jan 2026 12:47:15 +0000 Message-ID: <86o6mkbing.wl-maz@kernel.org> From: Marc Zyngier To: Vincent Donnefort Cc: rostedt@goodmis.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, linux-trace-kernel@vger.kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jstultz@google.com, qperret@google.com, will@kernel.org, aneesh.kumar@kernel.org, kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 29/30] KVM: arm64: Add selftest event support to nVHE/pKVM hyp In-Reply-To: References: <20251202093623.2337860-1-vdonnefort@google.com> <20251202093623.2337860-30-vdonnefort@google.com> <868qe9mnx5.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vdonnefort@google.com, rostedt@goodmis.org, mhiramat@kernel.org, mathieu.desnoyers@efficios.com, linux-trace-kernel@vger.kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, jstultz@google.com, qperret@google.com, will@kernel.org, aneesh.kumar@kernel.org, kernel-team@android.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260123_044719_884061_781C4259 X-CRM114-Status: GOOD ( 21.57 ) 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 Fri, 23 Jan 2026 12:14:34 +0000, Vincent Donnefort wrote: > > On Wed, Jan 07, 2026 at 03:40:22PM +0000, Marc Zyngier wrote: > > On Tue, 02 Dec 2025 09:36:22 +0000, > > Vincent Donnefort wrote: > > > > > Not strictly related to this patch, but I find that the trace itself > > lacks context. For example: > > > > [001] 323.847422: hyp_enter reason=hvc > > [001] 323.847423: hyp_exit reason=eret_host > > [001] 323.847688: hyp_enter reason=hvc > > [001] 323.847688: hyp_exit reason=eret_host > > [001] 323.847706: hyp_enter reason=hvc > > [001] 323.847707: hyp_exit reason=eret_host > > [001] 323.847722: hyp_enter reason=hvc > > [001] 323.847723: hyp_exit reason=eret_host > > > > That's all fine as long as I'm dealing with a single guest, or even > > with a single vcpu. Trying to trace multiple guests, or even multiple > > vcpus makes the whole thing completely unusable, because I have no > > idea what I'm looking at. > > > > To make this useful, having some context provided by the host really > > is required. > > I could add to the event header the VM pid related to the currently loaded vCPU > (if any). I can access it easily with host_kvm->userspace_pid. WDYS? It really should be the thread name, just like we already have for the kernel tracing. For example: vgic_irq-2007 [005] ..... 180926.476735: kvm_sys_access: PC: 4119e4 SYS_ICC_DIR_EL1 (3,0,12,11,1) write vgic_irq-2010 [005] ..... 180926.534771: kvm_sys_access: PC: 40254c SYS_CNTV_CVAL_EL0 (3,3,14,3,2) write vgic_irq-2010 [005] ..... 180926.534777: kvm_sys_access: PC: 402554 SYS_CNTV_CTL_EL0 (3,3,14,3,1) write vgic_irq-2010 [005] ..... 180926.534789: kvm_sys_access: PC: 4025b8 SYS_CNTV_CTL_EL0 (3,3,14,3,1) write vgic_irq-2011 [010] ..... 180926.534790: kvm_sys_access: PC: 40254c SYS_CNTV_CVAL_EL0 (3,3,14,3,2) write vgic_irq-2010 [005] ..... 180926.534793: kvm_sys_access: PC: 4119e4 SYS_ICC_DIR_EL1 (3,0,12,11,1) write This is a single guest, with concurrent vcpus. I'd like to be able to correlate that with what the hypervisor tracing outputs. At the very least the thread's PID. But the VM itself is pretty much irrelevant. Thanks, M. -- Without deviation from the norm, progress is not possible.