Lines Matching +full:run +full:- +full:control
1 // SPDX-License-Identifier: GPL-2.0
83 struct kvm_run *run; in main() local
101 run = vcpu->run; in main()
103 /* Test software BPs - int3 */ in main()
105 debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP; in main()
108 TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && in main()
109 run->debug.arch.exception == BP_VECTOR && in main()
110 run->debug.arch.pc == CAST_TO_RIP(sw_bp), in main()
112 run->exit_reason, run->debug.arch.exception, in main()
113 run->debug.arch.pc, CAST_TO_RIP(sw_bp)); in main()
116 /* Test instruction HW BP over DR[0-3] */ in main()
119 debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP; in main()
125 TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && in main()
126 run->debug.arch.exception == DB_VECTOR && in main()
127 run->debug.arch.pc == CAST_TO_RIP(hw_bp) && in main()
128 run->debug.arch.dr6 == target_dr6, in main()
131 i, run->exit_reason, run->debug.arch.exception, in main()
132 run->debug.arch.pc, CAST_TO_RIP(hw_bp), in main()
133 run->debug.arch.dr6, target_dr6); in main()
138 /* Test data access HW BP over DR[0-3] */ in main()
141 debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP; in main()
148 TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && in main()
149 run->debug.arch.exception == DB_VECTOR && in main()
150 run->debug.arch.pc == CAST_TO_RIP(write_data) && in main()
151 run->debug.arch.dr6 == target_dr6, in main()
154 i, run->exit_reason, run->debug.arch.exception, in main()
155 run->debug.arch.pc, CAST_TO_RIP(write_data), in main()
156 run->debug.arch.dr6, target_dr6); in main()
157 /* Rollback the 4-bytes "mov" */ in main()
158 vcpu_skip_insn(vcpu, -7); in main()
160 /* Skip the 4-bytes "mov" */ in main()
169 debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_SINGLESTEP | in main()
174 TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && in main()
175 run->debug.arch.exception == DB_VECTOR && in main()
176 run->debug.arch.pc == target_rip && in main()
177 run->debug.arch.dr6 == target_dr6, in main()
180 i, run->exit_reason, run->debug.arch.exception, in main()
181 run->debug.arch.pc, target_rip, run->debug.arch.dr6, in main()
187 debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP; in main()
192 TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && in main()
193 run->debug.arch.exception == DB_VECTOR && in main()
194 run->debug.arch.pc == CAST_TO_RIP(bd_start) && in main()
195 run->debug.arch.dr6 == target_dr6, in main()
198 run->exit_reason, run->debug.arch.exception, in main()
199 run->debug.arch.pc, target_rip, run->debug.arch.dr6, in main()
202 /* Disable all debug controls, run to the end */ in main()