nestedsvm: Clear GIF when injecting VMEXIT

If L1 executes VMRUN with the GIF set and it fails consistency checks,
Xen will inject a VMEXIT and fail the assert checking the GIF is cleared.

Instead, clear the GIF when injecting a VMEXIT to match what hardware
does.

Fixes: 9a779e4fc1 ("Implement SVM specific part for Nested Virtualization")
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Ross Lagerwall authored and Andrew Cooper committed 2026-05-13 16:44:34 +01:00
1 parent 6a6e1e17d6
commit 5fa2c5849f
1 file changed
+2 -2
+2 -2
View File
@@ -717,9 +717,9 @@ nsvm_vcpu_vmexit_inject(struct vcpu *v, struct cpu_user_regs *regs,
struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb;
if ( vmcb->_vintr.fields.vgif_enable )
ASSERT(vmcb->_vintr.fields.vgif == 0);
vmcb->_vintr.fields.vgif = 0;
else
ASSERT(svm->ns_gif == 0);
svm->ns_gif = 0;
ns_vmcb = nv->nv_vvmcx;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.