On 18/05/20 23:36, Felipe Franciosi wrote: > 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); Almost: if (r && (ctxt->tf || (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)) This is because if r == 0 you have to exit to userspace with KVM_EXIT_MMIO and KVM_EXIT_IO before completing execution of the instruction. Once this is done, you'll get here again and you'll be able to go through kvm_vcpu_do_singlestep. Thanks, Paolo