KVM: arm64: Factor out code for checking (h)VHE mode into a macro
authorFuad Tabba <tabba@google.com>
Mon, 24 Jul 2023 12:38:23 +0000 (13:38 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 26 Jul 2023 17:08:17 +0000 (17:08 +0000)
commitce92232614a5fb16992de8eb85bba7cb90772a1f
tree79e9a3e498c4f11511339cd19024465b67e7eed3
parent733c758e509b86a5d38b9af927817258b88ededd
KVM: arm64: Factor out code for checking (h)VHE mode into a macro

The code for checking whether the kernel is in (h)VHE mode is
repeated, and will be needed again in future patches. Factor it
out in a macro.

No functional change intended.
No change in emitted assembly code intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/kvmarm/20230724123829.2929609-3-tabba@google.com/
Reviewed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/el2_setup.h