From: Yosry Ahmed Date: Tue, 3 Mar 2026 00:34:04 +0000 (+0000) Subject: KVM: nSVM: Clear GIF on nested #VMEXIT(INVALID) X-Git-Tag: v7.1-rc1~118^2~4^2~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f85a6ce06e4a0d49652f57967a649ab09e06287c;p=thirdparty%2Flinux.git KVM: nSVM: Clear GIF on nested #VMEXIT(INVALID) According to the APM, GIF is set to 0 on any #VMEXIT, including an #VMEXIT(INVALID) due to failed consistency checks. Clear GIF on consistency check failures. Fixes: 3d6368ef580a ("KVM: SVM: Add VMRUN handler") Cc: stable@vger.kernel.org Signed-off-by: Yosry Ahmed Link: https://patch.msgid.link/20260303003421.2185681-11-yosry@kernel.org Signed-off-by: Sean Christopherson --- diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 5e0feeb50ba32..ac7d7f82c82bd 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -1035,6 +1035,7 @@ int nested_svm_vmrun(struct kvm_vcpu *vcpu) vmcb12->control.exit_code = SVM_EXIT_ERR; vmcb12->control.exit_info_1 = 0; vmcb12->control.exit_info_2 = 0; + svm_set_gif(svm, false); goto out; }