[PATCH v3 08/13] KVM: arm64: Insert PS field at TCR_EL2 assembly time

Ryan Roberts ryan.roberts at arm.com
Wed Sep 27 01:37:29 PDT 2023


On 27/09/2023 08:20, Oliver Upton wrote:
> 'Assembly' is overloaded in this context, I had to reread the shortlog
> to make sense of it. Maybe:
> 
>   KVM: arm64: Prepare TCR_EL2.PS in cpu_prepare_hyp_mode()

Yep, will fix it in the next version.

> 
> On Mon, Sep 18, 2023 at 07:57:35AM +0100, Ryan Roberts wrote:
> 
> [...]
> 
>>  	tcr &= ~TCR_T0SZ_MASK;
>>  	tcr |= TCR_T0SZ(hyp_va_bits);
>> +	tcr |= kvm_get_parange(mmfr0) << TCR_EL2_PS_SHIFT;
> 
> nit: FIELD_PREP() is slightly more defensive than shifting an unmasked
> value.
> 

Yep, good idea, will fix it in the next version.


Do let me know if you have any other comments across the series; If I don't hear
anything further, I'll aim to get a new version with your proposed changes
posted sometime next week.

Thanks,
Ryan




More information about the linux-arm-kernel mailing list