summaryrefslogtreecommitdiffstats
path: root/arch/alpha/mm
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2020-12-02 18:41:18 +0000
committerMarc Zyngier <maz@kernel.org>2020-12-04 10:08:35 +0000
commitabf16336dd22d018cd2577f0789b01ed705484d7 (patch)
tree14af1d57627e90aa0f9e7217c66e2ba0bab22b27 /arch/alpha/mm
parentcdf367192766ad11a03e8d5098556be43b8eb6b0 (diff)
downloadlinux-abf16336dd22d018cd2577f0789b01ed705484d7.tar.bz2
KVM: arm64: Intercept host's CPU_SUSPEND PSCI SMCs
Add a handler of CPU_SUSPEND host PSCI SMCs. The SMC can either enter a sleep state indistinguishable from a WFI or a deeper sleep state that behaves like a CPU_OFF+CPU_ON except that the core is still considered online while asleep. The handler saves r0,pc of the host and makes the same call to EL3 with the hyp CPU entry point. It either returns back to the handler and then back to the host, or wakes up into the entry point and initializes EL2 state before dropping back to EL1. No EL2 state needs to be saved/restored for this purpose. CPU_ON and CPU_SUSPEND are both implemented using struct psci_boot_args to store the state upon powerup, with each CPU having separate structs for CPU_ON and CPU_SUSPEND so that CPU_SUSPEND can operate locklessly and so that a CPU_ON call targeting a CPU cannot interfere with a concurrent CPU_SUSPEND call on that CPU. Signed-off-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201202184122.26046-23-dbrazdil@google.com
Diffstat (limited to 'arch/alpha/mm')
0 files changed, 0 insertions, 0 deletions