OSDN Git Service

KVM: arm64: Split hyp/switch.c to VHE/nVHE
authorDavid Brazdil <dbrazdil@google.com>
Thu, 25 Jun 2020 13:14:14 +0000 (14:14 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 5 Jul 2020 17:38:21 +0000 (18:38 +0100)
commit09cf57eba304246141367b95c89801fd2047ac96
tree0ab631e7d085889adb347b021b00f05465e08b35
parente03fa29164ec1db1a81dc0168d0017a9e0366c7c
KVM: arm64: Split hyp/switch.c to VHE/nVHE

switch.c implements context-switching for KVM, with large parts shared between
VHE/nVHE. These common routines are moved to a header file, VHE-specific code
is moved to vhe/switch.c and nVHE-specific code is moved to nvhe/switch.c.

Previously __kvm_vcpu_run needed a different symbol name for VHE/nVHE. This
is cleaned up and the caller in arm.c simplified.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200625131420.71444-10-dbrazdil@google.com
13 files changed:
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kernel/image-vars.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/hyp/hyp-entry.S
arch/arm64/kvm/hyp/include/hyp/switch.h [new file with mode: 0644]
arch/arm64/kvm/hyp/nvhe/Makefile
arch/arm64/kvm/hyp/nvhe/switch.c [new file with mode: 0644]
arch/arm64/kvm/hyp/switch.c [deleted file]
arch/arm64/kvm/hyp/sysreg-sr.c
arch/arm64/kvm/hyp/vhe/Makefile
arch/arm64/kvm/hyp/vhe/switch.c [new file with mode: 0644]