aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/debug-sr.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-12-18 12:57:43 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-12-18 12:57:43 +0100
commit43aabca38aa9668eee3c3c1206207034614c0901 (patch)
tree03029d7ed46fc14ffc598b75ac1536faef26a0d1 /arch/arm64/kvm/hyp/debug-sr.c
parentKVM: Fix stack-out-of-bounds read in write_mmio (diff)
parentKVM: arm/arm64: Fix timer enable flow (diff)
downloadlinux-dev-43aabca38aa9668eee3c3c1206207034614c0901.tar.xz
linux-dev-43aabca38aa9668eee3c3c1206207034614c0901.zip
Merge tag 'kvm-arm-fixes-for-v4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM Fixes for v4.15, Round 2 Fixes: - A bug in our handling of SPE state for non-vhe systems - A bug that causes hyp unmapping to go off limits and crash the system on shutdown - Three timer fixes that were introduced as part of the timer optimizations for v4.15
Diffstat (limited to 'arch/arm64/kvm/hyp/debug-sr.c')
-rw-r--r--arch/arm64/kvm/hyp/debug-sr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c
index 321c9c05dd9e..f4363d40e2cd 100644
--- a/arch/arm64/kvm/hyp/debug-sr.c
+++ b/arch/arm64/kvm/hyp/debug-sr.c
@@ -74,6 +74,9 @@ static void __hyp_text __debug_save_spe_nvhe(u64 *pmscr_el1)
{
u64 reg;
+ /* Clear pmscr in case of early return */
+ *pmscr_el1 = 0;
+
/* SPE present on this CPU? */
if (!cpuid_feature_extract_unsigned_field(read_sysreg(id_aa64dfr0_el1),
ID_AA64DFR0_PMSVER_SHIFT))