From: Ian Campbell <ian.campbell@citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: Julien Grall <julien.grall@citrix.com>,
Chen Baozi <baozich@gmail.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: xen: arm: beginning the removal of mode_switch.S
Date: Thu, 15 Aug 2013 15:07:01 +0100 [thread overview]
Message-ID: <1376575621.9273.175.camel@hastur.hellion.org.uk> (raw)
In-Reply-To: <20130815134610.GB60836@ocelot.phlegethon.org>
On Thu, 2013-08-15 at 14:46 +0100, Tim Deegan wrote:
> At 12:51 +0100 on 15 Aug (1376571083), Ian Campbell wrote:
> > At the moment it is sufficient to allow us to do away with the
> > enter_hyp_mode bits and the clock frequency, gic setup etc, along the
> > lines of the patch below.
> >
> > It doesn't yet allow us to get rid of the kick_cpus stuff. My plan for
> > platforms which don't do the right thing here would be to add a
> > mechanism to use dtb /memreserve/ (and teach Xen about that construct)
> > to carve out a little bit of memory which secondary CPUs could safely be
> > left spinning in. The platform code would expose its normal interface
> > (e.g. SYS_FLAGS on vexpress and fastmodel), eventually maybe we'd do
> > PSCI too (which might let us skip reserving some memory since 2ndary
> > cpus would be in secure mode and could use the special ram regions
> > reserved for that)
>
> Sorry, I'm not quite clear -- do you plan to have this bootwrapper
> handle the spinning CPUs, with a semihosting callback from Xen to
> release them? That sounds pretty good.
Yes to spinning, no to semihosting (that's model specific).
On vexpress native this would be handled by writing the start paddr to
SYS_FLAGS and doing a "sev", which will wake up the secondaries (which
are spinning doing wfe) and cause them to jump to that address, so I
would expect the wrapper to implement the same but spinning in NS HYP
mode instead -- in fact the code is there already but I haven't tried it
(bet its broken).
Other platforms have similar mechanisms and I would expect the
bootwrapper to do something similar and mimic whatever the mechanism is
in NS HYP mode.
Thinking about PSCI a bit more, it is likely that if the platform
implements PSCI then it will do it correctly and bring up secondaries in
HYP mode. Probably there would be no possibility of boot-wrapper using
monitor mode anyway just by the nature of PSCI, so we'd be between a
rock and a hard place. I think it'll just work though with no
bootwrapper needed.
> The bootloader looks broadly good to me, including all the kconfig
> stuff. Do you think we'd maintain that in xen.org or upstream?
I'm not sure, I'm happy to keep it as a local Xen.org hack and when I've
spoken to the upstream in the past they considered it a hack too and
seemed hppy with the idea of us forking. I think they only really care
about models anyway since they don't need to paper over issues on native
so much. Or maybe KVM to care about this. I'll sound them out...
Ian.
next prev parent reply other threads:[~2013-08-15 14:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 11:51 xen: arm: beginning the removal of mode_switch.S Ian Campbell
2013-08-15 13:46 ` Tim Deegan
2013-08-15 14:07 ` Ian Campbell [this message]
2013-08-15 16:53 ` Tim Deegan
2013-08-15 20:48 ` Ian Campbell
2013-08-15 17:05 ` Julien Grall
2013-08-15 20:51 ` Ian Campbell
2013-08-16 10:12 ` Julien Grall
2013-08-16 15:04 ` Ian Campbell
2013-08-16 15:11 ` Andre Przywara
2013-08-16 15:44 ` Julien Grall
2013-08-20 14:11 ` Ian Campbell
2013-08-21 12:36 ` Julien Grall
2013-08-21 12:42 ` Andre Przywara
2013-08-22 7:19 ` Ian Campbell
2013-08-15 20:55 ` Andre Przywara
2013-08-15 21:14 ` Ian Campbell
2013-08-19 17:46 ` Christoffer Dall
2013-08-20 9:37 ` 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=1376575621.9273.175.camel@hastur.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=baozich@gmail.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).