diff options
| author | Joey Gouly <joey.gouly@arm.com> | 2026-06-04 11:54:34 +0100 |
|---|---|---|
| committer | Marc Zyngier <maz@kernel.org> | 2026-06-05 11:48:24 +0100 |
| commit | cbaffe843a942c0d3102e0f9bce0e72b029b2594 (patch) | |
| tree | 684d1bc5ba99ceef37617856bad6ea0ec773f4c5 | |
| parent | f2ca45b50d4216c9cc7ffabf50d9ad1932209251 (diff) | |
KVM: arm64: Restore POR_EL0 access to host EL0
CPTR_EL2.E0POE was being cleared in __deactivate_cptr_traps_vhe(), which meant
that any accesses to POR_EL0 from host EL0 would trap and be reported to
userspace as an Illegal instruction. This would happen after running any VM,
regardless if it used POE or not.
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Link: https://sashiko.dev/#/patchset/20260602155430.2088142-1-maz@kernel.org?part=1
Link: https://patch.msgid.link/20260604105434.2297268-1-joey.gouly@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger,kernel.org
| -rw-r--r-- | arch/arm64/kvm/hyp/include/hyp/switch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/include/hyp/switch.h b/arch/arm64/kvm/hyp/include/hyp/switch.h index 320cd45d49c5..e9b36a3b27bb 100644 --- a/arch/arm64/kvm/hyp/include/hyp/switch.h +++ b/arch/arm64/kvm/hyp/include/hyp/switch.h @@ -181,6 +181,8 @@ static inline void __deactivate_cptr_traps_vhe(struct kvm_vcpu *vcpu) val |= CPACR_EL1_ZEN; if (cpus_have_final_cap(ARM64_SME)) val |= CPACR_EL1_SMEN; + if (cpus_have_final_cap(ARM64_HAS_S1POE)) + val |= CPACR_EL1_E0POE; write_sysreg(val, cpacr_el1); } |
