linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: stefano.stabellini@eu.citrix.com (Stefano Stabellini)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] PSCI: don't call CPU_OFF when it might fail
Date: Mon, 8 Sep 2014 22:44:24 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1409082244110.2334@kaball.uk.xensource.com> (raw)
In-Reply-To: <20140908102405.GB12081@leverpostej>

On Mon, 8 Sep 2014, Mark Rutland wrote:
> On Fri, Sep 05, 2014 at 09:53:05PM +0100, Stefano Stabellini wrote:
> > On Fri, 5 Sep 2014, Mark Rutland wrote:
> > > [Apologies to all who received this already, I typo'd the LAKML address]
> > > 
> > > In certain conditions PSCI's CPU_OFF call may return DENIED (in the presence of
> > > a UP OS on the secure world), or might not exist (in early implementations
> > > prior to PSCI 0.2). Both the arm and arm64 callers fail to handle the former,
> > > and the arm caller doesn't handle the latter.
> > > 
> > > We can determine wether a CPU_OFF call will succeed by calling
> > > MIGRATE_INFO_TYPE. If we receive 2 (A.K.A. PSCI_0_2_TOS_MP) in response we know
> > > that CPU_OFF should succeed, and in other cases it is necessary to discover
> > > which CPU said OS lives on and attempt migration. As there don't seem to be any
> > > UP implementations out there so far, for now we can limit ourselves to only
> > > supporting CPU hotplug in the PSCI_0_2_TOS_MP case. Hotplug support on such
> > > systems will require additional work, but at least they won't blow up by
> > > default.
> > > 
> > > These patches add the necessary checks to the arm and arm64 PSCI callers to
> > > prevent the issues described above. MIGRATE_INFO_TYPE is a mandatory part of
> > > PSCI 0.2, so no conforming implementation should be adversely affected. Both
> > > the ARM Trusted Firmware and KVM respond to MIGRATE_INFO_TYPE with
> > > PSCI_0_2_TOS_MP, so should see no loss of functionality (verified on Juno). 
> > > 
> > > Thanks,
> > > Mark.
> > > 
> > > Mark Rutland (2):
> > >   arm64: psci: respect MIGRATE_INFO_TYPE
> > >   arm: psci: don't call CPU_OFF blindly
> > > 
> > >  arch/arm/kernel/psci_smp.c | 36 +++++++++++++++++++++++++++++-------
> > >  arch/arm64/kernel/psci.c   | 14 ++++++++++++++
> > >  2 files changed, 43 insertions(+), 7 deletions(-)
> >  
> > The patches look good to me and AFACT they would work fine on Xen 4.4
> > and the soon to be release 4.5.
> 
> Cheers.
> 
> Can I take that as an ack?

Yes

      reply	other threads:[~2014-09-08 21:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 11:22 [PATCH 0/2] PSCI: don't call CPU_OFF when it might fail Mark Rutland
2014-09-05 11:22 ` [PATCH 1/2] arm64: psci: respect MIGRATE_INFO_TYPE Mark Rutland
2014-09-05 11:58   ` Sergei Shtylyov
2014-09-05 12:39     ` Mark Rutland
2014-09-05 11:22 ` [PATCH 2/2] arm: psci: don't call CPU_OFF blindly Mark Rutland
2014-09-05 20:48   ` Stefano Stabellini
2014-09-08 10:22     ` Mark Rutland
2014-09-05 20:53 ` [PATCH 0/2] PSCI: don't call CPU_OFF when it might fail Stefano Stabellini
2014-09-08 10:24   ` Mark Rutland
2014-09-08 21:44     ` Stefano Stabellini [this message]

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=alpine.DEB.2.02.1409082244110.2334@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=linux-arm-kernel@lists.infradead.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).