]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: nv: Drop bogus WARN for write to ZCR_EL2
authorOliver Upton <oupton@kernel.org>
Mon, 15 Jun 2026 05:13:24 +0000 (22:13 -0700)
committerMarc Zyngier <maz@kernel.org>
Wed, 17 Jun 2026 11:49:11 +0000 (12:49 +0100)
It is entirely possible for a guest to write to the ZCR_EL2 sysreg alias
while in a nested context, as it is expected if FEAT_NV2 is advertised
to the L1 hypervisor.

Get rid of the bogus WARN which, since the hyp vectors were installed at
this point, has the effect of a hyp_panic...

Cc: stable@vger.kernel.org
Fixes: 0cfc85b8f5cf ("KVM: arm64: nv: Load guest FP state for ZCR_EL2 trap")
Signed-off-by: Oliver Upton <oupton@kernel.org>
Link: https://patch.msgid.link/20260615051324.830045-1-oupton@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/include/hyp/switch.h

index d56371b189bf85c95a1eab70094b10ff8f92453a..ea22d1b50512233d61d32418747f0d344d3e1983 100644 (file)
@@ -598,8 +598,6 @@ static inline bool kvm_hyp_handle_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code)
                        return false;
                break;
        case ESR_ELx_EC_SYS64:
-               if (WARN_ON_ONCE(!is_hyp_ctxt(vcpu)))
-                       return false;
                fallthrough;
        case ESR_ELx_EC_SVE:
                if (!sve_guest)