Skip to content

Commit 334a1a1

Browse files
mrutland-armMarc Zyngier
authored andcommitted
KVM: arm64: Fix comment in fpsimd_lazy_switch_to_host()
The comment in fpsimd_lazy_switch_to_host() erroneously says guest traps for FPSIMD/SVE/SME are disabled by fpsimd_lazy_switch_to_guest(). In reality, the traps are disabled by __activate_cptr_traps(), and fpsimd_lazy_switch_to_guest() only manipulates the SVE vector length. This was mistake; I accidentally copy+pasted the wrong function name in commit: 59419f1 ("KVM: arm64: Eagerly switch ZCR_EL{1,2}") Fix the comment. Fixes: 59419f1 ("KVM: arm64: Eagerly switch ZCR_EL{1,2}") Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Fuad Tabba <tabba@google.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Mark Brown <broonie@kernel.org> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Will Deacon <will@kernel.org> Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Link: https://patch.msgid.link/20260106173707.3292074-2-mark.rutland@arm.com Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 9ace475 commit 334a1a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/arm64/kvm/hyp/include/hyp/switch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static inline void fpsimd_lazy_switch_to_host(struct kvm_vcpu *vcpu)
495495
/*
496496
* When the guest owns the FP regs, we know that guest+hyp traps for
497497
* any FPSIMD/SVE/SME features exposed to the guest have been disabled
498-
* by either fpsimd_lazy_switch_to_guest() or kvm_hyp_handle_fpsimd()
498+
* by either __activate_cptr_traps() or kvm_hyp_handle_fpsimd()
499499
* prior to __guest_entry(). As __guest_entry() guarantees a context
500500
* synchronization event, we don't need an ISB here to avoid taking
501501
* traps for anything that was exposed to the guest.

0 commit comments

Comments
 (0)