]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: pkvm: Report optional ID register traps with a 0x18 syndrome
authorMarc Zyngier <maz@kernel.org>
Thu, 8 Jan 2026 17:32:32 +0000 (17:32 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 15 Jan 2026 11:58:57 +0000 (11:58 +0000)
commit592dc2c020686536dae1c427c78cf558a3df4414
tree7543af865dde48335adc70e0e618b027b044355c
parente5d40a5a97c1d57e89aa5f324734065c6580b436
KVM: arm64: pkvm: Report optional ID register traps with a 0x18 syndrome

With FEAT_IDST, unimplemented system registers in the feature ID space
must be reported using EC=0x18 at the closest handling EL, rather than
with an UNDEF.

Most of these system registers are always implemented thanks to their
dependency on FEAT_AA64, except for a set of (currently) three registers:
GMID_EL1 (depending on MTE2), CCSIDR2_EL1 (depending on FEAT_CCIDX),
and SMIDR_EL1 (depending on SME).

For these three registers, report their trap as EC=0x18 if they
end-up trapping into KVM and that FEAT_IDST is implemented in the guest.
Otherwise, just make them UNDEF.

Link: https://patch.msgid.link/20260108173233.2911955-9-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/nvhe/sys_regs.c