]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Change 'pkvm_handle_t' to u16
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:24 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:08 +0000 (16:58 +0100)
commit44887977ab0fdaa0af4d1cc97cda413884c0ef86
treed6f28f5375d7a06e1bc5e86ff7d04bae40431375
parentafa72d207e6b5d49ac597fcd04f0865af63cf589
KVM: arm64: Change 'pkvm_handle_t' to u16

'pkvm_handle_t' doesn't need to be a 32-bit type and subsequent patches
will rely on it being no more than 16 bits so that it can be encoded
into a pte annotation.

Change 'pkvm_handle_t' to a u16 and add a compile-type check that the
maximum handle fits into the reduced type.

Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-24-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/nvhe/pkvm.c