ARM/ARM64: KVM: Fix CPU_ON emulation for PSCI v0.2
authorAnup Patel <anup.patel@linaro.org>
Tue, 29 Apr 2014 05:54:23 +0000 (11:24 +0530)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:45 +0000 (17:18 +0200)
commit69590f71e0ef474e0d44514484308c2eb826306d
tree7fbfafba8ec15f67125fcf526c5066115129b5d7
parentf11d09d9c9ce2dcca77dd41fcb16c3811cc513d5
ARM/ARM64: KVM: Fix CPU_ON emulation for PSCI v0.2

As-per PSCI v0.2, the source CPU provides physical address of
"entry point" and "context id" for starting a target CPU. Also,
if target CPU is already running then we should return ALREADY_ON.

Current emulation of CPU_ON function does not consider physical
address of "context id" and returns INVALID_PARAMETERS if target
CPU is already running.

This patch updates kvm_psci_vcpu_on() such that it works for both
PSCI v0.1 and PSCI v0.2.

Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
(cherry picked from commit aa8aeefe5e567637bbec7d7a3031cc057e3af303)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/psci.c