KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper
authorMarc Zyngier <maz@kernel.org>
Sun, 3 Jul 2022 13:08:46 +0000 (14:08 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Jul 2022 10:55:32 +0000 (11:55 +0100)
commitda8d120fbafe1d3217d25ac45493538b37cff87c
tree2a0d063a48d40d68080ebf063b1e1ae655079515
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e
KVM: arm64: Add get_reg_by_id() as a sys_reg_desc retrieving helper

find_reg_by_id() requires a sys_reg_param as input, which most
users provide as a on-stack variable, but don't make any use of
the result.

Provide a helper that doesn't have this requirement and simplify
the callers (all but one).

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.h
arch/arm64/kvm/vgic-sys-reg-v3.c