From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: Chen Baozi <baozich@gmail.com>, Chen Baozi <cbz@baozis.org>,
julien.grall@linaro.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] xen/arm64: Avoid sending SGI when kicking secondary cpus with spin_table
Date: Wed, 15 Apr 2015 15:57:44 +0100 [thread overview]
Message-ID: <1429109864.15516.318.camel@citrix.com> (raw)
In-Reply-To: <55251DB1.6050504@citrix.com>
On Wed, 2015-04-08 at 13:23 +0100, Julien Grall wrote:
> Hi Chen,
>
> Subject: I think you can drop the "_" in spin_table.
>
> On 07/04/15 08:33, Chen Baozi wrote:
> > From: Chen Baozi <baozich@gmail.com>
> >
> > On arm64, either firmware or xen's smp_up_cpu gate uses WFE on secondary
> > cpus to stand-by when booting. Thus, using SEV is enough for the boot
> > cpu to kick other secondaries. Further more, the current implementation
> > of cpu_up_send_sgi would pass a NULL cpumask pointer to send_SGI, which
> > then lead a data fault on GICv3 send_SGI implementation.
>
> I'm not familiar with spin table on ARM64, so I will let Ian answer
> about it.
For arm32 it's sadly all a bit adhoc and not terribly well documented.
(If I'm wrong I'd love a pointer to the doc). But for arm64 it does seem
to be documented (linux/Documentation/arm64/booting.txt)
So it seems possible that the SGI dates to older arm based systems.
> Aside that, the GICv3 implementation looks buggy to me.
> The GIC code provides two helpers which lead to pass NULL to the
> callback send_SGI:
> - send_SGI_self: AFAICT nobody is using it
I think we ended up with this by analogy to x86's send_IPI_self,
probably expecting we would need it there too.
> - send_SGI_allbutself: Only used by the smp boot code
>
>
> I think the former can be dropped or modify to send_SGI_one.
Yes, either would be ok.
> For the later, I can't find why we need to send an SGI on ARM too. Ian,
> Stefano, any idea?
IIRC there were some platform firmware (u-boot? boot-wrapper? vexpress
first stage firmware?) which needed it (because they used wfi not wfe?).
Or perhaps we cargo-culted from somewhere, or maybe it's just always
been wrong.
ISTR that there is some subtle difference with the Event register
between armv7 and armv8, which might explain this. I don't quite recall
what though.
So, I dunno, it seems like there is a good chance we could remove this,
but that might break some random platform which we have forgotten about.
The GIC NULL issue thing should probably fixed either way, but we could
also try dropping the send SGI from both arm32 and 64 and see what
happens...
Ian.
next prev parent reply other threads:[~2015-04-15 14:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 7:33 [PATCH] xen/arm64: Avoid sending SGI when kicking secondary cpus with spin_table Chen Baozi
2015-04-08 12:23 ` Julien Grall
2015-04-15 14:57 ` Ian Campbell [this message]
2015-04-15 15:56 ` Julien Grall
2015-04-15 16:21 ` Ian Campbell
2015-04-15 17:53 ` Julien Grall
2015-04-15 17:54 ` Julien Grall
2015-05-08 16:38 ` Julien Grall
2015-05-09 12:52 ` Chen Baozi
2015-05-08 16:39 ` Ian Campbell
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=1429109864.15516.318.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=baozich@gmail.com \
--cc=cbz@baozis.org \
--cc=julien.grall@citrix.com \
--cc=julien.grall@linaro.org \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.