Re: [PATCH] KVM: arm64: Disable TRBE Trace Buffer Unit when running in guest context

Leo Yan
2026-02-19T19:06:41Z

On Thu, Feb 19, 2026 at 06:58:03PM +0000, Leo Yan wrote:

[...]

> The flow for guest->host might be easy one, anyway, I try to summary for
> review:
>
> Restore TRFCR_EL1;
>
> // Ensure restored sysreg is visible
> isb();
>
> // Enable trace buffer
> TRBLIMITR_EL1.E = 0b1
>
> // Enable trace unit
> TRCPRGCTLR.EN = 0b1
>
> if (2038923)
> isb();

To strictly follow the SDEN, this ISB should be moved to immediately
after enabling the TRBLIMITR_EL1.E bit and before enabling the
TRCPRGCTLR.EN bit.

Sorry for spamming.