[PATCH v4 05/10] kvm: arm64: Remove hyp_adr/ldr_this_cpu

Marc Zyngier maz at kernel.org
Tue Sep 29 13:46:23 EDT 2020


On 2020-09-29 18:34, Will Deacon wrote:
> On Tue, Sep 22, 2020 at 09:49:05PM +0100, David Brazdil wrote:
>> The hyp_adr/ldr_this_cpu helpers were introduced for use in hyp code
>> because they always needed to use TPIDR_EL2 for base, while
>> adr/ldr_this_cpu from kernel proper would select between TPIDR_EL2 and
>> _EL1 based on VHE/nVHE.
>> 
>> Simplify this now that the hyp mode case can be handled using the
>> __KVM_VHE/NVHE_HYPERVISOR__ macros.
>> 
>> Acked-by: Andrew Scull <ascull at google.com>
>> Acked-by: Will Deacon <will at kernel.org>
>> Signed-off-by: David Brazdil <dbrazdil at google.com>
>> ---
>>  arch/arm64/include/asm/assembler.h | 29 +++++++++++++++++++----------
>>  arch/arm64/include/asm/kvm_asm.h   | 14 +-------------
>>  arch/arm64/kvm/hyp/hyp-entry.S     |  2 +-
>>  3 files changed, 21 insertions(+), 24 deletions(-)
>> 
>> diff --git a/arch/arm64/include/asm/assembler.h 
>> b/arch/arm64/include/asm/assembler.h
>> index 54d181177656..86e0ef79a799 100644
>> --- a/arch/arm64/include/asm/assembler.h
>> +++ b/arch/arm64/include/asm/assembler.h
>> @@ -218,6 +218,23 @@ lr	.req	x30		// link register
>>  	str	\src, [\tmp, :lo12:\sym]
>>  	.endm
>> 
>> +	/*
>> +	 * @dst: destination register (32 or 64 bit wide)
> 
> nit: this comment is wrong as I don't think mrs can take a W register
> as the destination argument. I'm assuming Marc can fix that up.

Indeed. I'll fix it locally.

Another thing is that this patch is going to clash with the Ghostbuster
branch (the hyp-entry.S hunk goes), but we can deal with that.

         M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list