[PATCH v1 1/4] KVM: arm64: Switch reg and val parameter ordering in vcpu_write_sys_reg()
Marc Zyngier
maz at kernel.org
Tue Oct 28 03:38:49 PDT 2025
On Mon, 27 Oct 2025 11:39:40 +0000,
Fuad Tabba <tabba at google.com> wrote:
>
> The vcpu_write_sys_reg() function previously used the signature:
> void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, enum vcpu_sysreg reg);
>
> This was inconsistent with related functions and macros such as
> __vcpu_assign_sys_reg() and __vcpu_rmw_sys_reg(), both of which
> have the register parameter before the value.
> '(vcpu, reg, ...)' ordering.
On the other hand, write_sys_reg() is exactly in the same order as
vcpu_write_sys_reg(). I think that's the model to follow.
The __vcpu_*_sys_reg() helpers are internal things, really, and if
something has to change, I'd rather change those.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list