[PATCH 0/2] KVM: arm64: Reenable MTE on VHE guest exit
Catalin Marinas
catalin.marinas at arm.com
Tue Oct 27 10:29:43 PDT 2026
On Mon, Oct 26, 2026 at 08:23:03AM +0000, Marc Zyngier wrote:
> Upton taking an exception, the CPU sets PSTATE.TCO to ensure that no
> tag fault can be taken while handling the exception. It is SW's job to
> eventually clear it when it is safe to do so.
>
> It appears that when MTE is enabled and that the kernel is running
> VHE, nothing eventually clears TCO when we come back from the guest,
> so things such as KASAN_HW_TAGS will not work until the next exit to
> userspace.
>
> This series aims at fixing this. This is not a stable candidate, as
> KASAN is only a debug option.
>
> Marc Zyngier (2):
> arm64: Add return value to mte_disable_tco_entry()
> KVM: arm64: Reenable MTE tag checking on exit from guest when running
> VHE
>
> arch/arm64/include/asm/mte.h | 10 +++++++---
> arch/arm64/kvm/hyp/vhe/switch.c | 7 +++++++
> 2 files changed, 14 insertions(+), 3 deletions(-)
For both patches:
Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
More information about the linux-arm-kernel
mailing list