Skip to contentSkip to conversation

nestedsvm: Crash domain rather than Xen on unexpected VMEXIT

PATCH In review Ross Lagerwall 2 participants 2 messages Sep 4

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nestedsvm: Crash domain rather than Xen on unexpected VMEXIT

On encountering an unexpected VMEXIT (e.g. because L1 has used an intercept that L0 Xen doesn't know about), crash the domain rather than the hypervisor.

Fixes 9a779e4fc161 ("Implement SVM specific part for Nested Virtualization")

---

This can be triggered running kvm-unit-tests in L1.
Xen undoubtedly needs to handle the intercepts properly but as a first step it shouldn't BUG().

 xen/arch/x86/hvm/svm/nestedsvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/hvm/svm/nestedsvm.c +1 -1
index 3d0e77f5eb24..5adb1bd72c4d 100644
@@ -923,7 +923,7 @@ nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
 
     default:
         gdprintk(XENLOG_ERR, "Illegal exitcode %#"PRIx64"\n", exitcode);
-        BUG();
+        domain_crash(v->domain);
         break;
     }
 
Signature · 1 line
2.53.0