Commit a9626099 authored by Fuad Tabba's avatar Fuad Tabba Committed by Oliver Upton

KVM: arm64: Use the appropriate feature trap register when activating traps

Instead of writing directly to cptr_el2, use the helper that
selects which feature trap register to write to based on the KVM
mode.

Fixes: 75c76ab5 ("KVM: arm64: Rework CPTR_EL2 programming for HVHE configuration")
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
Reviewed-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230724123829.2929609-7-tabba@google.comSigned-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent 90ae31c6
......@@ -63,7 +63,7 @@ static void __activate_traps(struct kvm_vcpu *vcpu)
__activate_traps_fpsimd32(vcpu);
}
write_sysreg(val, cptr_el2);
kvm_write_cptr_el2(val);
write_sysreg(__this_cpu_read(kvm_hyp_vector), vbar_el2);
if (cpus_have_final_cap(ARM64_WORKAROUND_SPECULATIVE_AT)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment