KVM: arm64: Split hyp/debug-sr.c to VHE/nVHE
authorDavid Brazdil <dbrazdil@google.com>
Thu, 25 Jun 2020 13:14:15 +0000 (14:14 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 5 Jul 2020 17:38:25 +0000 (18:38 +0100)
commitd400c5b2025c9aeca76213d6bd4138ec39da5cef
tree5ef17c682735ecd0c478340ba8f601543e0963a9
parent09cf57eba304246141367b95c89801fd2047ac96
KVM: arm64: Split hyp/debug-sr.c to VHE/nVHE

debug-sr.c contains KVM's code for context-switching debug registers, with some
code shared between VHE/nVHE. These common routines are moved to a header file,
VHE-specific code is moved to vhe/debug-sr.c and nVHE-specific code to
nvhe/debug-sr.c.

Functions are slightly refactored to move code hidden behind `has_vhe()` checks
to the corresponding .c files.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200625131420.71444-11-dbrazdil@google.com
arch/arm64/kernel/image-vars.h
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/hyp/include/hyp/debug-sr.h [moved from arch/arm64/kvm/hyp/debug-sr.c with 71% similarity]
arch/arm64/kvm/hyp/nvhe/Makefile
arch/arm64/kvm/hyp/nvhe/debug-sr.c [new file with mode: 0644]
arch/arm64/kvm/hyp/vhe/Makefile
arch/arm64/kvm/hyp/vhe/debug-sr.c [new file with mode: 0644]