Re: [PATCH v7 12/15] KVM: arm64: selftests: Add basic GICv3 support
From: Raghavendra Rao Ananta
Date: Mon Oct 04 2021 - 14:27:11 EST
On Thu, Sep 30, 2021 at 1:06 AM Zenghui Yu <yuzenghui@xxxxxxxxxx> wrote:
>
> On 2021/9/15 6:31, Raghavendra Rao Ananta wrote:
> > +static inline void *gicr_base_gpa_cpu(void *redist_base, uint32_t cpu)
> > +{
> > + /* Align all the redistributors sequentially */
> > + return redist_base + cpu * SZ_64K * 2;
> > +}
> > +
> > +static void gicv3_cpu_init(unsigned int cpu, void *redist_base)
> > +{
> > + void *sgi_base;
> > + unsigned int i;
> > + void *redist_base_cpu;
> > +
> > + GUEST_ASSERT(cpu < gicv3_data.nr_cpus);
> > +
> > + redist_base_cpu = gicr_base_gpa_cpu(redist_base, cpu);
>
> This is not 'gpa' and I'd rather open-code it directly as there's
> just a single caller.
>
> Zenghui
Thanks for catching this. I agree that mentioning 'gpa' oddballs this
function, since it's called from a guest's point of view. If there are
any other major changes in the series, I'll try to change this as
well. Else, I will try to raise a separate patch to resolve this.
Regards,
Raghavendra