]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Factor out firmware register handling from psci.c
authorRaghavendra Rao Ananta <rananta@google.com>
Mon, 2 May 2022 23:38:45 +0000 (23:38 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 3 May 2022 13:48:54 +0000 (14:48 +0100)
commit97e533f0c0f8a71b564eab1d041d5b28a539d17c
treeaf4b1793b6db9557fcf888268e9a44977ab95048
parent0e63df2d0d54b39e7363398ea63d214be3dfe228
KVM: arm64: Factor out firmware register handling from psci.c

Common hypercall firmware register handing is currently employed
by psci.c. Since the upcoming patches add more of these registers,
it's better to move the generic handling to hypercall.c for a
cleaner presentation.

While we are at it, collect all the firmware registers under
fw_reg_ids[] to help implement kvm_arm_get_fw_num_regs() and
kvm_arm_copy_fw_reg_indices() in a generic way. Also, define
KVM_REG_FEATURE_LEVEL_MASK using a GENMASK instead.

No functional change intended.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
[maz: fixed KVM_REG_FEATURE_LEVEL_MASK]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220502233853.1233742-2-rananta@google.com
arch/arm64/kvm/guest.c
arch/arm64/kvm/hypercalls.c
arch/arm64/kvm/psci.c
include/kvm/arm_hypercalls.h
include/kvm/arm_psci.h