Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbbETMeU (ORCPT ); Wed, 20 May 2015 08:34:20 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:35943 "EHLO socrates.bennee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752759AbbETMeQ (ORCPT ); Wed, 20 May 2015 08:34:16 -0400 References: <1431700035-23479-1-git-send-email-alex.bennee@linaro.org> <1431700035-23479-7-git-send-email-alex.bennee@linaro.org> <20150520091735.GB8986@arm.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Will Deacon Cc: "kvm\@vger.kernel.org" , "linux-arm-kernel\@lists.infradead.org" , "kvmarm\@lists.cs.columbia.edu" , "christoffer.dall\@linaro.org" , Marc Zyngier , "peter.maydell\@linaro.org" , "agraf\@suse.de" , "drjones\@redhat.com" , "pbonzini\@redhat.com" , "zhichao.huang\@linaro.org" , "jan.kiszka\@siemens.com" , "dahi\@linux.vnet.ibm.com" , "r65777\@freescale.com" , "bp\@suse.de" , Gleb Natapov , Jonathan Corbet , Russell King , Catalin Marinas , "open list\:DOCUMENTATION" , open list Subject: Re: [PATCH v4 06/12] KVM: arm64: guest debug, add SW break point support In-reply-to: <20150520091735.GB8986@arm.com> Date: Wed, 20 May 2015 13:33:48 +0100 Message-ID: <87bnhfig2b.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2362 Lines: 71 Will Deacon writes: > Hi Alex, > > On Fri, May 15, 2015 at 03:27:09PM +0100, Alex Bennée wrote: >> This adds support for SW breakpoints inserted by userspace. >> >> We do this by trapping all guest software debug exceptions to the >> hypervisor (MDCR_EL2.TDE). The exit handler sets an exit reason of >> KVM_EXIT_DEBUG with the kvm_debug_exit_arch structure holding the >> exception syndrome information. >> >> It will be up to userspace to extract the PC (via GET_ONE_REG) and >> determine if the debug event was for a breakpoint it inserted. If not >> userspace will need to re-inject the correct exception restart the >> hypervisor to deliver the debug exception to the guest. >> >> Any other guest software debug exception (e.g. single step or HW >> assisted breakpoints) will cause an error and the VM to be killed. This >> is addressed by later patches which add support for the other debug >> types. >> >> Signed-off-by: Alex Bennée >> Reviewed-by: Christoffer Dall >> >> --- >> v2 >> - update to use new exit struct >> - tweak for C setup >> - do our setup in debug_setup/clear code >> - fixed up comments >> v3: >> - fix spacing in KVM_GUESTDBG_VALID_MASK >> - fix and clarify wording on kvm_handle_guest_debug >> - handle error case in kvm_handle_guest_debug >> - re-word the commit message >> v4 >> - rm else leg >> - add r-b-tag >> >> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt >> index ba635c7..33c8143 100644 >> --- a/Documentation/virtual/kvm/api.txt >> +++ b/Documentation/virtual/kvm/api.txt > > Not sure why, but your patches seem to drop the diffstat which makes it > slightly more onerous for reviewers trying to figure out which bits touch > their trees. Are you removing it manually? No - I'm running: git pps -v 4 origin/master..HEAD -o guestdbg.patches Where pps is an alias: pps = format-patch --cover-letter --summary Manually expanding the alias gives the same results. I'll have a dig to see what's going on. > > Will -- Alex Bennée -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/