File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -608,6 +608,11 @@ static int nested_svm_intercept_db(struct vcpu_svm *svm)
608
608
{
609
609
unsigned long dr6 ;
610
610
611
+ /* Always catch it and pass it to userspace if debugging. */
612
+ if (svm -> vcpu .guest_debug &
613
+ (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP ))
614
+ return NESTED_EXIT_HOST ;
615
+
611
616
/* if we're not singlestepping, it's not ours */
612
617
if (!svm -> nmi_singlestep )
613
618
return NESTED_EXIT_DONE ;
@@ -682,6 +687,9 @@ static int nested_svm_intercept(struct vcpu_svm *svm)
682
687
if (svm -> nested .intercept_exceptions & excp_bits ) {
683
688
if (exit_code == SVM_EXIT_EXCP_BASE + DB_VECTOR )
684
689
vmexit = nested_svm_intercept_db (svm );
690
+ else if (exit_code == SVM_EXIT_EXCP_BASE + BP_VECTOR &&
691
+ svm -> vcpu .guest_debug & KVM_GUESTDBG_USE_SW_BP )
692
+ vmexit = NESTED_EXIT_HOST ;
685
693
else
686
694
vmexit = NESTED_EXIT_DONE ;
687
695
}
You can’t perform that action at this time.
0 commit comments