android_kernel_motorola_sm6225/arch/arm64
Marc Zyngier b20c9f29c5 arm/arm64: KVM: detect CPU reset on CPU_PM_EXIT
Commit 1fcf7ce0c6 (arm: kvm: implement CPU PM notifier) added
support for CPU power-management, using a cpu_notifier to re-init
KVM on a CPU that entered CPU idle.

The code assumed that a CPU entering idle would actually be powered
off, loosing its state entierely, and would then need to be
reinitialized. It turns out that this is not always the case, and
some HW performs CPU PM without actually killing the core. In this
case, we try to reinitialize KVM while it is still live. It ends up
badly, as reported by Andre Przywara (using a Calxeda Midway):

[    3.663897] Kernel panic - not syncing: unexpected prefetch abort in Hyp mode at: 0x685760
[    3.663897] unexpected data abort in Hyp mode at: 0xc067d150
[    3.663897] unexpected HVC/SVC trap in Hyp mode at: 0xc0901dd0

The trick here is to detect if we've been through a full re-init or
not by looking at HVBAR (VBAR_EL2 on arm64). This involves
implementing the backend for __hyp_get_vectors in the main KVM HYP
code (rather small), and checking the return value against the
default one when the CPU notifier is called on CPU_PM_EXIT.

Reported-by: Andre Przywara <osp@andrep.de>
Tested-by: Andre Przywara <osp@andrep.de>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Rob Herring <rob.herring@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-02-27 19:27:10 +01:00
..
boot arm64: dts: Reduce size of virtio block device for foundation model 2013-12-20 16:20:21 +00:00
configs arm64: defconfig: Expand default enabled features 2014-02-07 17:17:28 +00:00
include A small error handling problem and a compile breakage for ARM64. 2014-02-14 11:10:49 -08:00
kernel arm64: atomics: fix use of acquire + release for full barrier semantics 2014-02-07 16:45:43 +00:00
kvm arm/arm64: KVM: detect CPU reset on CPU_PM_EXIT 2014-02-27 19:27:10 +01:00
lib arm64: atomics: fix use of acquire + release for full barrier semantics 2014-02-07 16:45:43 +00:00
mm arm64: simplify pgd_alloc 2014-02-05 10:45:07 +00:00
xen xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
Kconfig arm64: defconfig: Expand default enabled features 2014-02-07 17:17:28 +00:00
Kconfig.debug arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
Makefile arm64: big-endian: add big-endian support to top-level arch Makefile 2013-10-25 15:59:31 +01:00