Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: Reenable MTE on VHE guest exit
@ 2026-10-26  8:23 Marc Zyngier
  2026-10-26  8:23 ` [PATCH 1/2] arm64: Add return value to mte_disable_tco_entry() Marc Zyngier
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marc Zyngier @ 2026-10-26  8:23 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel
  Cc: Steffen Eiden, Joey Gouly, Suzuki K Poulose, Oliver Upton,
	Zenghui Yu, Fuad Tabba, Catalin Marinas, Will Deacon,
	Mark Rutland

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(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-27 17:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26  8:23 [PATCH 0/2] KVM: arm64: Reenable MTE on VHE guest exit Marc Zyngier
2026-10-26  8:23 ` [PATCH 1/2] arm64: Add return value to mte_disable_tco_entry() Marc Zyngier
2026-10-26  8:23 ` [PATCH 2/2] KVM: arm64: Reenable MTE tag checking on exit from guest when running VHE Marc Zyngier
2026-10-26 14:06 ` [PATCH 0/2] KVM: arm64: Reenable MTE on VHE guest exit Fuad Tabba
2026-10-27 17:29 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox