]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Deduplicate ASID retrieval code
authorMarc Zyngier <maz@kernel.org>
Wed, 25 Feb 2026 10:47:18 +0000 (10:47 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 25 Feb 2026 12:19:33 +0000 (12:19 +0000)
commit54e367cb94d6bef941bbc1132d9959dc73bd4b6f
treea0d46467b77895669e70add8b08c1c5d701c85dd
parent29c8b85adb47daefc213381bc1831787f512d89b
KVM: arm64: Deduplicate ASID retrieval code

We currently have three versions of the ASID retrieval code, one
in the S1 walker, and two in the VNCR handling (although the last
two are limited to the EL2&0 translation regime).

Make this code common, and take this opportunity to also simplify
the code a bit while switching over to the TTBRx_EL1_ASID macro.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20260225104718.14209-1-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_nested.h
arch/arm64/kvm/at.c
arch/arm64/kvm/nested.c