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 C6C65E9B24E for ; Tue, 24 Feb 2026 11:22:50 +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=Ij6cdWejKy/ffyyWn1sSZBOlQicgWQuMd2VPZ5860kM=; b=vMA7Q9p4qSTGQeuORMyzrXLLif l5s0T8qwK7l2+UY9TrhYUf1e7zja+FhO9hvHuqBGFC8c+/U6ASZ3hB54pavYnDtMPkLdMsZQtJRrP 08wWe/ua9wmuz5DFvylTw8INPDtwps+dZk4HXTRy6w67phv5Ws0rVcHzDFDs0ptg2q0U2IpO8I0k0 gt0Zcx7YznB8fC6QLft4Ry5HU4sa2XUBEiKVdSOWooxItA99SQMn05jC7CvNFvcj7wCLBgpvSIDCX SnsxPZnAiksKuLdc0S6reJOrjjYr458+9JfzptSDLEAnfPmn88mIpMsNnyJbqY4E6ZNgCoqVNaqq5 LfPZZnMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vuqV4-00000001yZP-0a2v; Tue, 24 Feb 2026 11:22:46 +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 1vuqV1-00000001yZ3-3Ijl for linux-arm-kernel@lists.infradead.org; Tue, 24 Feb 2026 11:22:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 54E7C40419; Tue, 24 Feb 2026 11:22:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 230B3C116D0; Tue, 24 Feb 2026 11:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771932163; bh=L4l/FOenVBHtlTfEzTtLmBPv4vF+0FmANuPZot2vfPc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a+XNg1gIghl0ZFdpzRU+Mo2WRjddUGvA/kPhU0LD8NxGpwkqVmGqs+4id8f0Cg+vs VgY3m9Mi0tLN0PQaiz8WeuYdtuK+/8B1aVmeYopmhFnLAQxIBLGpx5jtzKzrGh34i+ fKZlcmJXd4hK2n8aaOUOI1Wi1dnQwpaNRKphUKe9nYPz2uP7FKiuKjQSeWUaLh0XX4 QFNlSFxKAPipwyJpCcjAbz4LR1WXVT3UiJ2mwvzdDsx9hNyvaq1e5JB/BbHecaJdkk O54jsDFu5n9a5fpgMrKvx+rmTJ+Yz7lVtwhHZyE202it2XwQZg3DkwJp/GlM+mB0V7 7dlFhhZW0kwtA== 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 1vuqUz-0000000DK3I-0JYQ; Tue, 24 Feb 2026 11:22:41 +0000 Date: Tue, 24 Feb 2026 11:22:40 +0000 Message-ID: <86fr6q9yin.wl-maz@kernel.org> From: Marc Zyngier To: Leo Yan Cc: James Clark , Will Deacon , kvmarm@lists.linux.dev, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, Oliver Upton , Suzuki K Poulose , Fuad Tabba Subject: Re: [PATCH] KVM: arm64: Disable TRBE Trace Buffer Unit when running in guest context In-Reply-To: <20260220154820.GG136967@e132581.arm.com> References: <20260216130959.19317-1-will@kernel.org> <86a4x8bw38.wl-maz@kernel.org> <868qcsbsbd.wl-maz@kernel.org> <076e013a-b66d-4985-9709-734d7184ad72@linaro.org> <867bscbpmp.wl-maz@kernel.org> <20260220154820.GG136967@e132581.arm.com> 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: leo.yan@arm.com, james.clark@linaro.org, will@kernel.org, kvmarm@lists.linux.dev, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, oupton@kernel.org, suzuki.poulose@arm.com, tabba@google.com 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-20260224_032243_899331_2CF0B16E X-CRM114-Status: GOOD ( 24.43 ) 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, 20 Feb 2026 15:48:20 +0000, Leo Yan wrote: > > On Mon, Feb 16, 2026 at 04:49:02PM +0000, Marc Zyngier wrote: > > [...] > > > > > But that's *not* working. If you trace EL1 only, even with a VHE host, > > > > the result is not usable. > > > > > > > > > > Do you mean not working because of the missing exceptions? I did a bit > > > of testing before and the trace did seem somewhat usable to me. It had > > > EL1 and EL0 atoms in there. > > > > Sure. Now try to look at what that means for NV, where all the > > EL1->EL2 exceptions are emulated, where all the EL2->EL1 exception > > returns are emulated. > > > > What does it give you? A bag of nonsense. > > Sorry for jumping in. > > If we enable TRBE in a VM, whether nested or not, why is it necessary to > capture trace data for the exception transition between the VM and its > higher level host(s)? Because that's what the architecture guarantees. If you can't honour what the architecture guarantees, then you don't have an implementation. > Seems to me, regardless of what happens during exception emulation, once > the VM is switched out, tracing will be stopped, and then re-enabled > when the VM is switched back. In that case, we should be able to record > the complete trace data for whatever occurs while the VM is running. And that's breaking the architecture when the exception return is emulated. Really, I'm getting tired of having to argue this. M. -- Without deviation from the norm, progress is not possible.