Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbcDKJpj (ORCPT ); Mon, 11 Apr 2016 05:45:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbcDKJph (ORCPT ); Mon, 11 Apr 2016 05:45:37 -0400 Subject: Re: [PATCH v2] kvm-pr: manage single-step mode To: Laurent Vivier , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org References: <1460131500-19560-1-git-send-email-lvivier@redhat.com> Cc: Gleb Natapov , Paolo Bonzini , Alexander Graf , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dgibson@redhat.com From: Thomas Huth Message-ID: <570B723B.7010404@redhat.com> Date: Mon, 11 Apr 2016 11:45:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <1460131500-19560-1-git-send-email-lvivier@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 766 Lines: 19 On 08.04.2016 18:05, Laurent Vivier wrote: > Until now, when we connect gdb to the QEMU gdb-server, the > single-step mode is not managed. > > This patch adds this, only for kvm-pr: > > If KVM_GUESTDBG_SINGLESTEP is set, we enable single-step trace bit in the > MSR (MSR_SE) just before the __kvmppc_vcpu_run(), and disable it just after. > In kvmppc_handle_exit_pr, instead of routing the interrupt to > the guest, we return to host, with KVM_EXIT_DEBUG reason. > > Signed-off-by: Laurent Vivier > --- > v2: split BOOK3S_INTERRUPT_MACHINE_CHECK and BOOK3S_INTERRUPT_TRACE > > arch/powerpc/kvm/book3s_pr.c | 32 +++++++++++++++++++++++++++++++- > 1 file changed, 31 insertions(+), 1 deletion(-) Reviewed-by: Thomas Huth