[PATCH kvmtool] kvmtool/run: Fix debug-single-step

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When executing with --debug-single-step option, the singlestep mode
stops on VM exit. Need to rearm singlestep mode for most of the VM exit
reasons (KVM_EXIT_IO, KVM_EXIT_MMIO).

Signed-off-by: Francois-Frederic Ozog <francois.ozog@xxxxxxxxxx>
---
 kvm-cpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kvm-cpu.c b/kvm-cpu.c
index cc8385f..6138458 100644
--- a/kvm-cpu.c
+++ b/kvm-cpu.c
@@ -183,6 +183,10 @@ int kvm_cpu__start(struct kvm_cpu *cpu)
 
 			if (!ret)
 				goto panic_kvm;
+
+			if (cpu->kvm->cfg.single_step)
+				kvm_cpu__enable_singlestep(cpu);
+
 			break;
 		}
 		case KVM_EXIT_MMIO: {
@@ -202,6 +206,10 @@ int kvm_cpu__start(struct kvm_cpu *cpu)
 
 			if (!ret)
 				goto panic_kvm;
+
+			if (cpu->kvm->cfg.single_step)
+				kvm_cpu__enable_singlestep(cpu);
+
 			break;
 		}
 		case KVM_EXIT_INTR:
-- 
2.9.3




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux