nestedsvm: Crash domain rather than Xen on unexpected VMEXIT
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")
Signed-off-by Ross Lagerwall <[email protected]>
---
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
@@ -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
Quoted 6 lines · Ross Lagerwall
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")Signed-off-by Ross Lagerwall <[email protected]>
Reviewed-by Andrew Cooper <[email protected]>