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>
Wed, 30 Apr 2014 11:18:58 +0000 (04:18 -0700)
commitaa8aeefe5e567637bbec7d7a3031cc057e3af303
tree456989d612026d8cc55aa2171143e29b1cfbe08a
parentbab0b43012a8ad64877fa46134370a7f5c6ce861
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>
arch/arm/kvm/psci.c