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

From: Sebastian Ott
Date: Wed May 29 2024 - 11:29:46 EST


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..

Sebastian