[PATCH v3 5/6] KVM: arm64: rename functions for invariant sys regs

Eric Auger eauger at redhat.com
Wed May 29 10:17:45 PDT 2024


Hi Sebastian,

On 5/29/24 17:29, Sebastian Ott wrote:
> Hej Eric,
> 
> On Wed, 29 May 2024, Eric Auger wrote:
>> On 5/14/24 09:22, Sebastian Ott wrote:
>>> Invariant system id registers are populated with host values
>>> at initialization time using their .reset function cb.
>> get_##reg call read_sysreg(). I don't really understand the above
>> sentence. Please could you elaborate?
>>
> 
> struct sys_reg_desc has 2 function pointers (among others):
> .reset and .get_user . The functions implementing these are
> usually named accordingly. For invariant registers only
> .reset is used but set to functions that are called get_*
> (which is usually used to implement .get_user).
> 
> E.g.: invariant_sys_regs[0].reset == get_midr_el1
> 
> When trying to figure out this code I was confused by this, hence
> this patch..

Ah OK, since ".reset=" was not used in the initilization I missed that.

feel free to add my
Reviewed-by: Eric Auger <eric.auger at redhat.com>


Eric
> 
> Sebastian
> 




More information about the linux-arm-kernel mailing list