Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Wed, Apr 29, 2015 at 5:08 PM, Alex Bennée wrote: > > Christoffer Dall writes: > >> On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: >>> >>> Christoffer Dall writes: >>> >>> > On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: >>> >> >>> >> Christoffer Dall writes: >>>

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Alex Bennée
Christoffer Dall writes: > On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: >> >> Christoffer Dall writes: >> >> > On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: >> >> >> >> Christoffer Dall writes: >> >> >> >> > On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: > >> > >> Christoffer Dall writes: > >> > >> > On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: > >> >> On 28 April 2015

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Alex Bennée
Christoffer Dall writes: > On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: >> >> Christoffer Dall writes: >> >> > On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: >> >> On 28 April 2015 at 09:42, Alex Bennée wrote: >> >> > Peter Maydell writes: >> >> >> Does the

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: > >> On 28 April 2015 at 09:42, Alex Bennée wrote: > >> > Peter Maydell writes: > >> >> Does the kernel already have a conveniently

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Alex Bennée
Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Christoffer Dall
On Wed, Apr 29, 2015 at 5:08 PM, Alex Bennée alex.ben...@linaro.org wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-29 Thread Alex Bennée
Christoffer Dall christoffer.d...@linaro.org writes: On Wed, Apr 29, 2015 at 10:18:18AM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 03:37:01PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes:

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Alex Bennée
Christoffer Dall writes: > On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: >> 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

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: > 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

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Peter Maydell
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

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Alex Bennée
Peter Maydell writes: > On 27 April 2015 at 21:04, Christoffer Dall > wrote: >> On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: >>> >>> Christoffer Dall writes: >>> >>> > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: >>> >> + * just need to report the PC and the

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Christoffer Dall
On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org writes: Does the kernel already have a conveniently implemented inject exception into guest lump of code? If so it might

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Alex Bennée
Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Apr 28, 2015 at 10:34:12AM +0100, Peter Maydell wrote: On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org writes: Does the kernel already have a conveniently implemented

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Alex Bennée
Peter Maydell peter.mayd...@linaro.org writes: On 27 April 2015 at 21:04, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-28 Thread Peter Maydell
On 28 April 2015 at 09:42, Alex Bennée alex.ben...@linaro.org wrote: Peter Maydell peter.mayd...@linaro.org 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

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-27 Thread Peter Maydell
On 27 April 2015 at 21:04, Christoffer Dall wrote: > On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: >> >> Christoffer Dall writes: >> >> > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: >> >> + * just need to report the PC and the HSR values to userspace. >> >> + *

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-27 Thread Christoffer Dall
On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: > >> This adds support for SW breakpoints inserted by userspace. > >> > >> We do this by trapping all BKPT exceptions in the > >>

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-27 Thread Christoffer Dall
On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-27 Thread Peter Maydell
On 27 April 2015 at 21:04, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Apr 23, 2015 at 03:26:53PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: + * just need to report the PC and

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-23 Thread Alex Bennée
Christoffer Dall writes: > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: >> This adds support for SW breakpoints inserted by userspace. >> >> We do this by trapping all BKPT exceptions in the >> hypervisor (MDCR_EL2_TDE). > > you mean trapping all exceptions in the guest to the

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-23 Thread Alex Bennée
Christoffer Dall christoffer.d...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). you mean trapping all exceptions in

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-22 Thread Alex Bennée
Zhichao Huang writes: > On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: >> This adds support for SW breakpoints inserted by userspace. >> >> We do this by trapping all BKPT exceptions in the >> hypervisor (MDCR_EL2_TDE). > > why should we trap all debug exceptions? > > The trap for

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-22 Thread Alex Bennée
Zhichao Huang zhichao.hu...@linaro.org writes: On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). why should we trap all debug exceptions?

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: > This adds support for SW breakpoints inserted by userspace. > > We do this by trapping all BKPT exceptions in the > hypervisor (MDCR_EL2_TDE). you mean trapping all exceptions in the guest to the hypervisor? > The

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-14 Thread Christoffer Dall
On Tue, Mar 31, 2015 at 04:08:04PM +0100, Alex Bennée wrote: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). you mean trapping all exceptions in the guest to the hypervisor? The kvm_debug_exit_arch

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-02 Thread Alex Bennée
David Hildenbrand writes: >> This adds support for SW breakpoints inserted by userspace. >> >> We do this by trapping all BKPT exceptions in the >> hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address >> of the exception. If user-space doesn't know of the breakpoint then we

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-02 Thread David Hildenbrand
> This adds support for SW breakpoints inserted by userspace. > > We do this by trapping all BKPT exceptions in the > hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address > of the exception. If user-space doesn't know of the breakpoint then we > have a guest inserted breakpoint

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-02 Thread David Hildenbrand
This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address of the exception. If user-space doesn't know of the breakpoint then we have a guest inserted breakpoint and

Re: [PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-04-02 Thread Alex Bennée
David Hildenbrand d...@linux.vnet.ibm.com writes: This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address of the exception. If user-space doesn't know of the

[PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-03-31 Thread Alex Bennée
This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address of the exception. If user-space doesn't know of the breakpoint then we have a guest inserted breakpoint and the

[PATCH v2 06/10] KVM: arm64: guest debug, add SW break point support

2015-03-31 Thread Alex Bennée
This adds support for SW breakpoints inserted by userspace. We do this by trapping all BKPT exceptions in the hypervisor (MDCR_EL2_TDE). The kvm_debug_exit_arch carries the address of the exception. If user-space doesn't know of the breakpoint then we have a guest inserted breakpoint and the