Re: [PATCH v3 01/12] KVM: add comments for kvm_debug_exit_arch struct

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:16PM +0100, Alex Bennée wrote: Bring into line with the comments for the other structures and their KVM_EXIT_* cases. Also update api.txt to reflect use in kvm_run documentation. Signed-off-by: Alex Bennée alex.ben...@linaro.org Reviewed-by: David Hildenbrand

Re: [PATCH v3 02/12] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:17PM +0100, Alex Bennée wrote: Currently x86, powerpc and soon arm64 use the same two architecture specific bits for guest debug support for software and hardware breakpoints. This makes the shared values explicit while leaving the gate open for another

Re: [PATCH v3 03/12] KVM: arm64: guest debug, define API headers

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:18PM +0100, Alex Bennée wrote: This commit defines the API headers for guest debugging. There are two architecture specific debug structures: - kvm_guest_debug_arch, allows us to pass in HW debug registers - kvm_debug_exit_arch, signals exception and

Re: [PATCH v3 02/12] KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values

2015-05-08 Thread Paolo Bonzini
On 08/05/2015 11:23, Christoffer Dall wrote: On Wed, May 06, 2015 at 05:23:17PM +0100, Alex Bennée wrote: Currently x86, powerpc and soon arm64 use the same two architecture specific bits for guest debug support for software and hardware breakpoints. This makes the shared values explicit

Re: [PATCH v3 08/12] KVM: arm64: re-factor hyp.S debug register code

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:11AM +0100, Alex Bennée wrote: This is a pre-cursor to sharing the code with the guest debug support. This replaces the big macro that fishes data out of a fixed location with a more general helper macro to restore a set of debug registers. It uses macro

Re: [PATCH v3 12/12] KVM: arm64: add trace points for guest_debug debug

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:15AM +0100, Alex Bennée wrote: This includes trace points for: kvm_arch_setup_guest_debug kvm_arch_clear_guest_debug kvm_handle_guest_debug I've also added some generic register setting trace events and also a trace point to dump the array of hardware

Re: [PATCH v3 10/12] KVM: arm64: trap nested debug register access

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:13AM +0100, Alex Bennée wrote: When we are using the hardware registers for guest debug we need to deal with the guests access to them. There is already a mechanism for dealing with these accesses so we build on top of that. - any access to mdscr_el1 is now

[PATCH 1/2] ARM: kvm: fix a bad BSYM() usage

2015-05-08 Thread Russell King
BSYM() should only be used when refering to local symbols in the same assembly file which are resolved by the assembler, and not for linker-fixed up symbols. The use of BSYM() with panic is incorrect as the linker is involved in fixing up this relocation, and it knows whether panic() is ARM or

Re: [PATCH v3 09/12] KVM: arm64: guest debug, HW assisted debug support

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:12AM +0100, Alex Bennée wrote: This adds support for userspace to control the HW debug registers for guest debug. In the debug ioctl we copy the IMPDEF defined number of registers into a new register set called host_debug_state. There is now a new vcpu parameter

Re: [PATCH v3 00/12] KVM Guest Debug support for arm64

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:15PM +0100, Alex Bennée wrote: Hi, Here is V3 of the KVM Guest Debug support for arm64. This sees the return of hyp.S re-factoring code which has been expanded to handle both the save and restore legs. The HW debug patch then adds a simple indirection to

Re: [PATCH 1/2] ARM: kvm: fix a bad BSYM() usage

2015-05-08 Thread Dave P Martin
On Fri, May 08, 2015 at 05:08:42PM +0100, Russell King wrote: BSYM() should only be used when refering to local symbols in the same assembly file which are resolved by the assembler, and not for linker-fixed up symbols. The use of BSYM() with panic is incorrect as the linker is involved in

Re: [PATCH 1/2] ARM: kvm: fix a bad BSYM() usage

2015-05-08 Thread Nicolas Pitre
On Fri, 8 May 2015, Russell King wrote: BSYM() should only be used when refering to local symbols in the same assembly file which are resolved by the assembler, and not for linker-fixed up symbols. The use of BSYM() with panic is incorrect as the linker is involved in fixing up this

Re: [PATCH v3 11/12] KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG

2015-05-08 Thread Christoffer Dall
On Thu, May 07, 2015 at 10:07:14AM +0100, Alex Bennée wrote: Finally advertise the KVM capability for SET_GUEST_DEBUG. Once arm support is added this check can be moved to the common kvm_vm_ioctl_check_extension() code. Signed-off-by: Alex Bennée alex.ben...@linaro.org Acked-by:

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

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:21PM +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

Re: [PATCH v3 07/12] KVM: arm64: guest debug, add support for single-step

2015-05-08 Thread Christoffer Dall
On Wed, May 06, 2015 at 05:23:22PM +0100, Alex Bennée wrote: This adds support for single-stepping the guest. To do this we need to manipulate the guests PSTATE.SS and MDSCR_EL1.SS bits which we do in the kvm_arm_setup/clear_debug() so we don't affect the apparent state of the guest.