[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1304261132470.4180@kaball.uk.xensource.com>
Date: Fri, 26 Apr 2013 11:33:50 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Ian Campbell <Ian.Campbell@...rix.com>
CC: Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
Subject: Re: [PATCH v4 2/7] xen/arm: SMP support
On Fri, 26 Apr 2013, Ian Campbell wrote:
> On Fri, 2013-04-26 at 11:27 +0100, Stefano Stabellini wrote:
> > On Fri, 26 Apr 2013, Ian Campbell wrote:
> > > On Thu, 2013-04-25 at 19:45 +0100, Stefano Stabellini wrote:
> > > > On Thu, 25 Apr 2013, Ian Campbell wrote:
> > > > > > > > @@ -216,6 +245,8 @@ static int __init xen_guest_init(void)
> > > > > > > > * is required to use VCPUOP_register_vcpu_info to place vcpu info
> > > > > > > > * for secondary CPUs as they are brought up. */
> > > > > > > > per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];
> > > > > > > > + for_each_online_cpu(i)
> > > > > > > > + xen_secondary_init(i);
> > > > > > > >
> > > > > > > > gnttab_init();
> > > > > > > > if (!xen_initial_domain())
> > > > > > > [...]
> > > > > > > > @@ -244,7 +280,7 @@ static int __init xen_init_events(void)
> > > > > > > > return -EINVAL;
> > > > > > > > }
> > > > > > > >
> > > > > > > > - enable_percpu_irq(xen_events_irq, 0);
> > > > > > > > + on_each_cpu(xen_percpu_enable_events, NULL, 0);
> > > > > > >
> > > > > > > It feels like there ought to be some sort of per-cpu bringup callback
> > > > > > > which takes care of these dynamically. Maybe that doesn't matter until
> > > > > > > we get vcpu hotplug going?
> > > > > >
> > > > > > I suspect there isn't one, considering that on_each_cpu is also used by
> > > > > > kvm_vgic_hyp_init, kvm_timer_hyp_init and others.
> > > > >
> > > > > Could we use cpu_notifiers for this?
> > > >
> > > > cpu_notifiers are for cpu hotplug, not for secondary cpu bringup
> > >
> > > Are you sure they don't also trigger during bringup, because the
> > > distinction is a little bit academic...
> >
> > My mistake, they do run on secondary cpus, but not in our case because
> > xen_guest_init is called *after* cpu_notifiers are called.
> > So, they are too early for Xen.
>
> Another reason to consider calling xen_guest_init much earlier then
> IMHO. although we can live with the solution you have now I suppose.
Yeah, moving the call to xen_guest_init earlier might be a good idea,
but I wouldn't want to do it in this patch series, at this point of the
Linux release cycle.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists