[PATCHv2 1/3] arm64: kvm: factor out is_{vhe,nvhe}_hyp_code()

Will Deacon will at kernel.org
Fri Oct 30 04:21:31 EDT 2020


On Mon, Oct 26, 2020 at 01:49:29PM +0000, Mark Rutland wrote:
> Currently has_vhe() detects whether it is being compiled for VHE/NVHE
> hyp code based on preprocessor definitions, and uses this knowledge to
> avoid redundant runtime checks.
> 
> There are other cases where we'd like to use this knowledge, so let's
> factor the preprocessor checks out into separate helpers.
> 
> There should be no functional change as a result of this patch.
> 
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Cc: David Brazdil <dbrazdil at google.com>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Will Deacon <will at kernel.org>
> ---
>  arch/arm64/include/asm/virt.h | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)

Acked-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list