]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm: kvm: fix CPU hotplug
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 22 Sep 2014 14:52:48 +0000 (15:52 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 09:15:10 +0000 (11:15 +0200)
commit296cffc0f8705d35c2bcb754154ee4e829de238b
tree55eacddc0645d7828f4330eef170c74b3b7c15c3
parent628d3e68cb2113cb0c4b935745e35a2efb7e944b
arm: kvm: fix CPU hotplug

commit 37a34ac1d4775aafbc73b9db53c7daebbbc67e6a upstream.

On some platforms with no power management capabilities, the hotplug
implementation is allowed to return from a smp_ops.cpu_die() call as a
function return. Upon a CPU onlining event, the KVM CPU notifier tries
to reinstall the hyp stub, which fails on platform where no reset took
place following a hotplug event, with the message:

CPU1: smp_ops.cpu_die() returned, trying to resuscitate
CPU1: Booted secondary processor
Kernel panic - not syncing: unexpected prefetch abort in Hyp mode at: 0x80409540
unexpected data abort in Hyp mode at: 0x80401fe8
unexpected HVC/SVC trap in Hyp mode at: 0x805c6170

since KVM code is trying to reinstall the stub on a system where it is
already configured.

To prevent this issue, this patch adds a check in the KVM hotplug
notifier that detects if the HYP stub really needs re-installing when a
CPU is onlined and skips the installation call if the stub is already in
place, which means that the CPU has not been reset.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm/kvm/arm.c