--- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6908,7 +6908,7 @@ restart: if (!ctxt->have_exception || exception_type(ctxt->exception.vector) == EXCPT_TRAP) { kvm_rip_write(vcpu, ctxt->eip); - if (r && ctxt->tf) + if (r && (ctxt->tf || (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP))) r = kvm_vcpu_do_singlestep(vcpu); if (kvm_x86_ops->update_emulated_instruction) kvm_x86_ops->update_emulated_instruction(vcpu);