]> www.infradead.org Git - nvme.git/commitdiff
KVM: arm64: rename functions for invariant sys regs
authorSebastian Ott <sebott@redhat.com>
Wed, 19 Jun 2024 17:40:35 +0000 (17:40 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 20 Jun 2024 17:16:45 +0000 (17:16 +0000)
Invariant system id registers are populated with host values
at initialization time using their .reset function cb.

These are currently called get_* which is usually used by
the functions implementing the .get_user callback.

Change their function names to reset_* to reflect what they
are used for.

Signed-off-by: Sebastian Ott <sebott@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20240619174036.483943-10-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/sys_regs.c

index d8d2a7880576fb1f3f88b49d579bcef95241234d..71a4ed58f94b1c4210f824e69e39c901662641be 100644 (file)
@@ -3720,8 +3720,8 @@ id_to_sys_reg_desc(struct kvm_vcpu *vcpu, u64 id,
  */
 
 #define FUNCTION_INVARIANT(reg)                                                \
-       static u64 get_##reg(struct kvm_vcpu *v,                        \
-                             const struct sys_reg_desc *r)             \
+       static u64 reset_##reg(struct kvm_vcpu *v,                      \
+                              const struct sys_reg_desc *r)            \
        {                                                               \
                ((struct sys_reg_desc *)r)->val = read_sysreg(reg);     \
                return ((struct sys_reg_desc *)r)->val;                 \
@@ -3733,9 +3733,9 @@ FUNCTION_INVARIANT(aidr_el1)
 
 /* ->val is filled in by kvm_sys_reg_table_init() */
 static struct sys_reg_desc invariant_sys_regs[] __ro_after_init = {
-       { SYS_DESC(SYS_MIDR_EL1), NULL, get_midr_el1 },
-       { SYS_DESC(SYS_REVIDR_EL1), NULL, get_revidr_el1 },
-       { SYS_DESC(SYS_AIDR_EL1), NULL, get_aidr_el1 },
+       { SYS_DESC(SYS_MIDR_EL1), NULL, reset_midr_el1 },
+       { SYS_DESC(SYS_REVIDR_EL1), NULL, reset_revidr_el1 },
+       { SYS_DESC(SYS_AIDR_EL1), NULL, reset_aidr_el1 },
 };
 
 static int get_invariant_sys_reg(u64 id, u64 __user *uaddr)