[PATCH v1 1/4] KVM: arm64: Switch reg and val parameter ordering in vcpu_write_sys_reg()

Fuad Tabba tabba at google.com
Tue Oct 28 03:40:44 PDT 2025


Hi Marc,

On Tue, 28 Oct 2025 at 10:38, Marc Zyngier <maz at kernel.org> wrote:
>
> 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.

Sure. I'll wait a bit for additional comments on the remaining
patches, and respin changing the order for the __vcpu_*_sys_reg()
helpers.

Thanks,
/fuad

> Thanks,
>
>         M.
>
> --
> Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list