[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJHc60yXKdCCpSejxwGpmqoTenm=3589+ahmzkLkSnmy89+YLQ@mail.gmail.com>
Date: Mon, 4 Oct 2021 11:26:57 -0700
From: Raghavendra Rao Ananta <rananta@...gle.com>
To: Zenghui Yu <yuzenghui@...wei.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Marc Zyngier <maz@...nel.org>,
Andrew Jones <drjones@...hat.com>,
James Morse <james.morse@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
kvm@...r.kernel.org, Catalin Marinas <catalin.marinas@....com>,
Peter Shier <pshier@...gle.com>, linux-kernel@...r.kernel.org,
Will Deacon <will@...nel.org>, kvmarm@...ts.cs.columbia.edu,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v7 12/15] KVM: arm64: selftests: Add basic GICv3 support
On Thu, Sep 30, 2021 at 1:06 AM Zenghui Yu <yuzenghui@...wei.com> 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
Powered by blists - more mailing lists