PSCI: don't call CPU_OFF when it might fail
Get series with b4
b4 am 20140908102405.GB12081@leverpostejVersions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] PSCI: don't call CPU_OFF when it might fail
Quoted 30 lines · Stefano Stabellini
Quoted 29 lines · Mark Rutland
[Apologies to all who received this already, I typo'd the LAKML address]
In certain conditions PSCI's
CPU_OFFcall 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_OFFcall will succeed by callingMIGRATE_INFO_TYPE. If we receive 2 (A.K.A.PSCI_0_2_TOS_MP) in response we know thatCPU_OFFshould 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 thePSCI_0_2_TOS_MPcase. 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_TYPEis a mandatory part of PSCI 0.2, so no conforming implementation should be adversely affected. Both the ARM Trusted Firmware and KVM respond toMIGRATE_INFO_TYPEwithPSCI_0_2_TOS_MP, so should see no loss of functionality (verified on Juno).Thanks,
Mark.Mark Rutland (2):
arm64: psci: respectMIGRATE_INFO_TYPE
arm: psci: don't callCPU_OFFblindly
Quoted 6 lines
Quoted 3 lines
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?
Mark.