Skip to contentSkip to conversation

KVM: arm64: nv: Drop bogus WARN for write to ZCR_EL2

PATCH Applied Oliver Upton 2 participants 2 messages Jun 15 – Jun 17

Subsystems (3)
lore
Share & tools
lore

Oliver Upton

author maintainer
#0 lore raw

PATCH 1/1 KVM: arm64: nv: Drop bogus WARN for write to ZCR_EL2

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...

Fixes 0cfc85b8f5cf ("KVM: arm64: nv: Load guest FP state for ZCR_EL2 trap")
---
 arch/arm64/kvm/hyp/include/hyp/switch.h | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/kvm/hyp/include/hyp/switch.h +0 -2
index 161bb2a3e1d9..2e96ac3b08c0 100644
@@ -595,8 +595,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)

base-commit: 1ee27dacbe5dc4def481794d899d67b0d4570094

Signature · 1 line
2.47.3
maintainer Applied
#1 lore raw
Quoted 8 lines · Oliver Upton

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...

[...]

Applied to fixes, thanks!

[1/1] KVM: arm64: nv: Drop bogus WARN for write to ZCR_EL2

      commit: 9f1667098c6ae7ec81a9a56859cfdacb822aa0d0

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.