Message ID | 20171218100057.7839-2-christoffer.dall@linaro.org |
---|---|
State | Accepted |
Commit | bfe766cf65fb65e68c4764f76158718560bdcee5 |
Headers | show |
Series | [PULL,1/5] arm64: kvm: Prevent restoring stale PMSCR_EL1 for vcpu | expand |
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))