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

2020-10-30 Thread Will Deacon
On Mon, Oct 26, 2020 at 01:49:29PM +, 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 kno

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

2020-10-26 Thread Mark Rutland
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 helper