[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180426101256.GC19872@C02W217FHV2R.local>
Date: Thu, 26 Apr 2018 12:12:56 +0200
From: Christoffer Dall <christoffer.dall@....com>
To: Auger Eric <eric.auger@...hat.com>
Cc: eric.auger.pro@...il.com, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, kvmarm@...ts.cs.columbia.edu,
marc.zyngier@....com, cdall@...nel.org, peter.maydell@...aro.org,
andre.przywara@....com, drjones@...hat.com, wei@...hat.com
Subject: Re: [PATCH v3 08/12] KVM: arm/arm64: Check vcpu redist base before
registering an iodev
On Thu, Apr 26, 2018 at 11:25:06AM +0200, Auger Eric wrote:
> Hi Christoffer,
>
> On 04/24/2018 11:07 PM, Christoffer Dall wrote:
> > On Fri, Apr 13, 2018 at 10:20:54AM +0200, Eric Auger wrote:
> >> As we are going to register several redist regions,
> >> vgic_register_all_redist_iodevs() may be called several times. We need
> >> to register a redist_iodev for a given vcpu only once.
> >
> > Wouldn't it be more natural to change that caller to only register the
> > iodevs for that region?
>
> vgic_register_redist_iodev() is the place where we decide where we map a
> given vcpu redist into a given redist region.
>
> Calling vgic_register_redist_iodev for only the vcpus mapping to the
> redist region would force to inverse the logic. I think it would bring
> more upheavals in the code than bringing benefit?
>
> This new check somehow corresponds to what we had before:
> "
> if (IS_VGIC_ADDR_UNDEF(vgic->vgic_redist_base))
> return 0;
> "
Ah, this is because we don't enforce any ordering between creating the
redistributors and initializing the vcpus, this always confuses me.
Fine, let's leave it as you suggest here.
Thanks,
-Christoffer
Powered by blists - more mailing lists