KVM: arm64: Introduce finalise_el2_state macro
authorQuentin Perret <qperret@google.com>
Wed, 1 Feb 2023 10:37:52 +0000 (10:37 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 2 Feb 2023 21:46:43 +0000 (21:46 +0000)
commite2d4f5ae1771dddf4844fa00742e3d3d3f77d383
tree553041f98c9f2a5e364167a98053a3459943c36c
parent8669651ce0d90a79bab22dfe2758fe07e070a02e
KVM: arm64: Introduce finalise_el2_state macro

Factor out the first half of the finalise_el2 function into a macro to
allow its reuse from the nVHE PSCI relay code. While at it, make the
register allocation parametric for the check_override macros as they are
now more widely exposed.

No functional changes intended.

Signed-off-by: Quentin Perret <qperret@google.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230201103755.1398086-3-qperret@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/el2_setup.h
arch/arm64/kernel/hyp-stub.S