* [PATCH 0/2] KVM: arm64: Fix RAS trapping and MTE_frac validation
@ 2026-12-04 9:12 Minhang Zhang
0 siblings, 0 replies; only message in thread
From: Minhang Zhang @ 2026-12-04 9:12 UTC (permalink / raw)
To: Marc Zyngier, Oliver Upton
Cc: Fuad Tabba, Joey Gouly, Steffen Eiden, Suzuki K Poulose,
Zenghui Yu, Catalin Marinas, Will Deacon, Mark Rutland,
Cornelia Huck, Christoffer Dall, Dongjiu Geng, James Morse,
Ben Horgan, linux-arm-kernel, kvmarm, Minhang Zhang
From: Minhang Zhang <zhangminhang@kylinos.cn>
This series fixes two independent issues in arm64 KVM.
Patch 1 enables trapping of RAS error record accesses whenever the host's
sanitised ID registers report RAS, including when CONFIG_ARM64_RAS_EXTN
is disabled. Update both the host and hyp HCR initialisation paths so
that this also applies in protected mode, where hyp rebuilds HCR_EL2.
This keeps guest accesses under KVM's emulation, including when userspace
hides RAS from the guest.
Patch 2 uses KVM's sanitised MTE field to decide whether to apply the
MTE_frac compatibility rewrite. This avoids changing the zero MTE_frac
reported for VMs where MTE is hidden, including nested virtualisation,
while preserving compatibility with older KVM versions for MTE guests.
The patches are independent.
Build-checked arch/arm64/kvm/sys_regs.o and the nVHE aggregate object
arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o with arm64 defconfig, CONFIG_KVM=y,
and CONFIG_ARM64_RAS_EXTN both enabled and disabled, based on v7.4-rc5
(fe6ff8d5d675). No KVM runtime testing or hardware reproduction was
performed for either issue.
Minhang Zhang (2):
KVM: arm64: Trap RAS error records whenever the host has RAS
KVM: arm64: Only clamp MTE_frac when the VM has MTE
arch/arm64/kvm/hyp/nvhe/pkvm.c | 8 +++++---
arch/arm64/kvm/sys_regs.c | 17 +++++++++++++----
2 files changed, 18 insertions(+), 7 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-04 9:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 9:12 [PATCH 0/2] KVM: arm64: Fix RAS trapping and MTE_frac validation Minhang Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox