All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Andre Przywara <andre.przywara@linaro.org>
Cc: Tim Deegan <tim@xen.org>, xen-devel <xen-devel@lists.xen.org>,
	Julien Grall <julien.grall@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Chen Baozi <baozich@gmail.com>,
	Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: xen: arm: beginning the removal of mode_switch.S
Date: Thu, 15 Aug 2013 22:14:18 +0100	[thread overview]
Message-ID: <1376601258.9273.237.camel@hastur.hellion.org.uk> (raw)
In-Reply-To: <520D4047.2070308@linaro.org>

On Thu, 2013-08-15 at 22:55 +0200, Andre Przywara wrote:
> honestly I would not pursue any kind of secure mode / SMP / HYP mode 
> switching inside Xen or a Xen related boot wrapper. This is actually 
> task of the board's firmware, or bootloader if firmware does not do it 
> for one or another reason.
> Naturally it should be the firmware's responsibility of doing this (like 
> Calxeda does), if not there is now an "almost merged"(TM) u-boot 
> implementation by me to solve at least the HYP mode / SMP switching:
> http://lists.denx.de/pipermail/u-boot/2013-August/160501.html
> This currently supports VExpress, I have Arndale support almost ready 
> (still untested). Other boards should be easy to add as this was a 
> design criteria of the patch set.

That's great and as I've said a few times in this thread this is what we
should be aiming for, bootwrapper is not intended to replace or compete
with those patches, they are the right answer for sure.

> My next work item (next week's time frame) is to get some basic 
> multiboot support into u-boot and Xen/ARM to allow the user to tell the 
> bootloader which bits to load.
> 
> This is the approach Linaro agreed upon for Xen in July.

> Alternatively I could teach u-boot to write the addresses in the DTB 
> meeting your Xen code.
> 
> Wouldn't that solve all the problems you try to address with boot-wrapper?

In an ideal world where vendors were responsive to bug reports and cared
enough to fix the virt use case, and where users feel confident enough
to replace the bootloader on the system etc etc then yes it absolutely
solves the problem and is exactly what people should be doing.

bootwrapper is there for the cases where the vendor doesn't care (about
virt, about Xen, etc), or people are unwilling to upgrade u-boot
(perhaps lack of JTAG makes bricking the system too much of a risk,
think random consumer devices), or maybe the vendor u-boot is too old or
too diverged from mainline to allow the patches to be applied without a
lot of development work. bootwrapper is a hack intended to allow people
to still run Xen on those platforms, it is not supposed to be
alternative to doing it properly.

I will happily delete platform code from bootwrapper the moment that a
fixed firmware/bootloader which can be deployed on a platform in a way
which end users can cope with is available. And I will certainly be
encouraging people to figure out how to do that rather than adding
platform support to bootwrapper.

> Since Linux/KVM requires the kernel to be entered in HYP mode anyway, 
> Xen should be on the same page as them, so a joint effort would make 
> sense here, right?

Yes. Xen's requirement is exactly the same as KVMs, we must be entered
in NS HYP mode. Bootwrapper is there to make this true in cases where it
otherwise is not and the firmware/bootloader cannot be fixed.

It's very good that you've fixed (or are fixing) the arndale and
vexpress stuff and have just done The Right Thing on Calxeda platforms
already.

With bootwrapper I'm more concerned about all the random cheap hardware
coming out of China (like the Allwinner derived stuff) which it might be
desirable for community members etc to run Xen on.

> Honestly I'd like to do away with Xen's mode_switch.S as soon as 
> possible.

Me too.

>  I tried to simply add Calxeda's native SMP kicking in there 
> and failed, since the code actually reads:
> If r1 isn't the Arndale machine ID, assume Versatile Express :-(

Right, it sucks. It's a hack and must die.

> We could either require PSCI support for boards supporting Xen or add 
> platform specific SMP ops (boldly copying bits from Linux here).

Yes, this is the plan.

Ian.

  reply	other threads:[~2013-08-15 21:14 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
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 [this message]
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=1376601258.9273.237.camel@hastur.hellion.org.uk \
    --to=ian.campbell@citrix.com \
    --cc=andre.przywara@linaro.org \
    --cc=baozich@gmail.com \
    --cc=christoffer.dall@linaro.org \
    --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 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.