mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Subject: Re: [PATCH v4 2/7] xen/arm: SMP support
Date: Fri, 26 Apr 2013 11:30:56 +0100	[thread overview]
Message-ID: <1366972256.3142.60.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1304261125440.4180@kaball.uk.xensource.com>

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.

Ian.


  reply	other threads:[~2013-04-26 10:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 19:25 [PATCH v4 0/7] xen/arm: move to mach-virt and support SMP Stefano Stabellini
2013-04-24 19:28 ` [PATCH v4 1/7] xen/arm: actually pass a non-NULL percpu pointer to request_percpu_irq Stefano Stabellini
2013-04-25 13:48   ` Ian Campbell
2013-04-24 19:28 ` [PATCH v4 2/7] xen/arm: SMP support Stefano Stabellini
2013-04-25 13:40   ` Ian Campbell
2013-04-25 16:48     ` Stefano Stabellini
2013-04-25 16:59       ` Ian Campbell
2013-04-25 18:45         ` Stefano Stabellini
2013-04-26  8:51           ` Ian Campbell
2013-04-26 10:27             ` Stefano Stabellini
2013-04-26 10:30               ` Ian Campbell [this message]
2013-04-26 10:33                 ` Stefano Stabellini
2013-04-24 19:28 ` [PATCH v4 3/7] xen: move the xenvm machine to mach-virt Stefano Stabellini
2013-04-24 19:28 ` [PATCH v4 4/7] xen/arm: implement HYPERVISOR_vcpu_op Stefano Stabellini
2013-04-25 13:41   ` Ian Campbell
2013-04-24 19:28 ` [PATCH v4 5/7] xen/arm: XEN selects ARM_PSCI Stefano Stabellini
2013-04-24 19:28 ` [PATCH v4 6/7] xenvm: add a simple PSCI node and a second cpu Stefano Stabellini
2013-04-24 19:28 ` [PATCH v4 7/7] mach-virt: support Xen hypercalls for shutdown and reboot Stefano Stabellini
2013-04-24 22:14   ` Stefano Stabellini
2013-04-25  8:54     ` Will Deacon
2013-04-25 10:14       ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366972256.3142.60.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®