Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933135AbbD1Jes (ORCPT ); Tue, 28 Apr 2015 05:34:48 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]:35166 "EHLO mail-ig0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932976AbbD1Jee convert rfc822-to-8bit (ORCPT ); Tue, 28 Apr 2015 05:34:34 -0400 MIME-Version: 1.0 In-Reply-To: <87wq0wr6dd.fsf@linaro.org> References: <1427814488-28467-1-git-send-email-alex.bennee@linaro.org> <1427814488-28467-7-git-send-email-alex.bennee@linaro.org> <20150414082558.GS6186@cbox> <87y4li6hua.fsf@linaro.org> <20150427200407.GG23335@cbox> <87wq0wr6dd.fsf@linaro.org> From: Peter Maydell Date: Tue, 28 Apr 2015 10:34:12 +0100 Message-ID: Subject: Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: Christoffer Dall , kvm-devel , arm-mail-list , "kvmarm@lists.cs.columbia.edu" , Marc Zyngier , Alexander Graf , Andrew Jones , Paolo Bonzini , Zhichao Huang , "J. Kiszka" , David Hildenbrand , Bharat Bhushan , bp@suse.de, Gleb Natapov , Jonathan Corbet , Russell King , Catalin Marinas , Will Deacon , "open list:DOCUMENTATION" , open list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1136 Lines: 25 On 28 April 2015 at 09:42, Alex Bennée wrote: > Peter Maydell writes: >> Does the kernel already have a conveniently implemented "inject >> exception into guest" lump of code? If so it might be less effort >> to do it that way round, maybe. > > So you pointed out we can't just re-inject the exceptions we get as we > need to map from things like ESR_ELx_EC_WATCHPT_LOW to > ESR_ELx_EC_WATCHPT_CUR before re-injection. > > Of course if it is as simple as modifying the ESR_EL1 register and > returning +ve in the handle_exit path then I can do that but I assumed > if any other wrangling needs doing it should be done in userspace. Well, somebody's got to do it, and it's the same amount of work either way (fiddling with ESR, making sure we direct the guest to the right exception vector entry point, maybe a few other things). -- PMM -- 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/