From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9X4v-0005m7-Ir for qemu-devel@nongnu.org; Thu, 17 Dec 2015 06:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9X4q-0002Ik-Nk for qemu-devel@nongnu.org; Thu, 17 Dec 2015 06:50:37 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:59156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9X4q-0002FS-C5 for qemu-devel@nongnu.org; Thu, 17 Dec 2015 06:50:32 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1a9X4f-0003QX-LN for qemu-devel@nongnu.org; Thu, 17 Dec 2015 11:50:21 +0000 From: Peter Maydell Date: Thu, 17 Dec 2015 11:50:13 +0000 Message-Id: <1450353020-13076-19-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1450353020-13076-1-git-send-email-peter.maydell@linaro.org> References: <1450353020-13076-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 18/25] target-arm: kvm - support for single step List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Alex Bennée This adds support for single-step. There isn't much to do on the QEMU side as after we set-up the request for single step via the debug ioctl it is all handled within the kernel. The actual setting of the KVM_GUESTDBG_SINGLESTEP flag is already in the common code. If the kernel doesn't support guest debug the ioctl will simply error. Signed-off-by: Alex Bennée Message-id: 1449599553-24713-4-git-send-email-alex.bennee@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/kvm64.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index 3b3929d..5f96cde 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -534,6 +534,13 @@ bool kvm_arm_handle_debug(CPUState *cs, struct kvm_debug_exit_arch *debug_exit) kvm_cpu_synchronize_state(cs); switch (hsr_ec) { + case EC_SOFTWARESTEP: + if (cs->singlestep_enabled) { + return true; + } else { + error_report("Came out of SINGLE STEP when not enabled"); + } + break; case EC_AA64_BKPT: if (kvm_find_sw_breakpoint(cs, env->pc)) { return true; -- 1.9.1