File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 61
61
#endif
62
62
#define PAGE_SIZE qemu_real_host_page_size
63
63
64
+ #ifndef KVM_GUESTDBG_BLOCKIRQ
65
+ #define KVM_GUESTDBG_BLOCKIRQ 0
66
+ #endif
67
+
64
68
//#define DEBUG_KVM
65
69
66
70
#ifdef DEBUG_KVM
@@ -2574,6 +2578,15 @@ static int kvm_init(MachineState *ms)
2574
2578
kvm_sstep_flags = 0 ;
2575
2579
if (kvm_has_guest_debug ) {
2576
2580
kvm_sstep_flags = SSTEP_ENABLE ;
2581
+
2582
+ #if defined KVM_CAP_SET_GUEST_DEBUG2
2583
+ int guest_debug_flags =
2584
+ kvm_check_extension (s , KVM_CAP_SET_GUEST_DEBUG2 );
2585
+
2586
+ if (guest_debug_flags & KVM_GUESTDBG_BLOCKIRQ ) {
2587
+ kvm_sstep_flags |= SSTEP_NOIRQ ;
2588
+ }
2589
+ #endif
2577
2590
}
2578
2591
2579
2592
kvm_state = s ;
@@ -3205,6 +3218,10 @@ int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
3205
3218
3206
3219
if (cpu -> singlestep_enabled ) {
3207
3220
data .dbg .control |= KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_SINGLESTEP ;
3221
+
3222
+ if (cpu -> singlestep_enabled & SSTEP_NOIRQ ) {
3223
+ data .dbg .control |= KVM_GUESTDBG_BLOCKIRQ ;
3224
+ }
3208
3225
}
3209
3226
kvm_arch_update_guest_debug (cpu , & data .dbg );
3210
3227
You can’t perform that action at this time.
0 commit comments