From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AFB237BE72 for ; Tue, 24 Feb 2026 11:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771932163; cv=none; b=FxhPDs4qfIwGeFZl4KMInapHR7c0V3037WfHjAC3UdDxrm/A4ynIrOhBNz6yZ/6wGBR7Tn2ZihpHvPDDQZwgjJkAkqUgs1RMaXRS8M4Lie+juoUbFmJgwiozgaFlCzESxfnkQeQr/M9vkSwwAvD0khL55cI0Zrl8tKwd33bRmSw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771932163; c=relaxed/simple; bh=L4l/FOenVBHtlTfEzTtLmBPv4vF+0FmANuPZot2vfPc=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=e1o1hxavlY1ygPRmqnlHUPHnMswZyS13EhZEvK4ISAOK8kSxyKRHNKpn0e9h0vLPvob5rmpZrxyqyLztzMT7bvZYsmKj8ropEgX79PkDdJpkUDNSvD5+BW/GqZYGTtS2u/RgQd64llEzG6VuUKimQVk7/ZnsDlzFozWJNfTp0RQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a+XNg1gI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a+XNg1gI" 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.