]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu
authorChristoffer Dall <christoffer.dall@arm.com>
Sat, 1 Dec 2018 16:41:28 +0000 (08:41 -0800)
committerMarc Zyngier <maz@kernel.org>
Thu, 28 May 2020 10:57:10 +0000 (11:57 +0100)
commitfc5d1f1a42fba6266ab95dc3b84937933a9b5a66
treeab3398333d445c1b005a4f6d890c718aeca98b77
parent0a78791c0d12fcd5d3f486668defb9ab055e3729
KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu

If we move the used_lrs field to the version-specific cpu interface
structure, the following functions only operate on the struct
vgic_v3_cpu_if and not the full vcpu:

  __vgic_v3_save_state
  __vgic_v3_restore_state
  __vgic_v3_activate_traps
  __vgic_v3_deactivate_traps
  __vgic_v3_save_aprs
  __vgic_v3_restore_aprs

This is going to be very useful for nested virt, so move the used_lrs
field and change the prototypes and implementations of these functions to
take the cpu_if parameter directly.

No functional change.

Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/hyp/switch.c
arch/arm64/kvm/hyp/vgic-v3-sr.c
arch/arm64/kvm/vgic/vgic-v2.c
arch/arm64/kvm/vgic/vgic-v3.c
arch/arm64/kvm/vgic/vgic.c
include/kvm/arm_vgic.h