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

2015-06-04 Thread Andrew Jones
On Thu, Jun 04, 2015 at 02:49:17PM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Fri, May 29, 2015 at 10:30:19AM +0100, Alex Bennée wrote: This commit defines the API headers for guest debugging. There are two architecture specific debug structures:

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Marc Zyngier
On 04/06/15 11:20, Alex Bennée wrote: Marc Zyngier marc.zyng...@arm.com writes: On 04/06/15 10:34, Christoffer Dall wrote: On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into the hypervisor

Re: [PATCH v5 10/12] KVM: arm64: guest debug, HW assisted debug support

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:26AM +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] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
Marc Zyngier marc.zyng...@arm.com writes: On 04/06/15 11:20, Alex Bennée wrote: Marc Zyngier marc.zyng...@arm.com writes: On 04/06/15 10:34, Christoffer Dall wrote: On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: The elr_el2 and spsr_el2 registers in fact contain the

Re: [PATCH v5 2/6] target-arm: kvm64: introduce kvm_arm_init_debug()

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: As we haven't always had guest debug support we need to probe for it. Additionally we don't do this in the start-up capability code so we don't fall over on old kernels. Signed-off-by: Alex Bennée alex.ben...@linaro.org ---

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

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:23AM +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.

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
Marc Zyngier marc.zyng...@arm.com writes: On 04/06/15 10:34, Christoffer Dall wrote: On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into the hypervisor code. be careful with your use of the

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

2015-06-04 Thread Christoffer Dall
On Thu, Jun 04, 2015 at 11:34:46AM +0100, Alex Bennée wrote: Christoffer Dall christoffer.d...@linaro.org writes: On Fri, May 29, 2015 at 10:30:24AM +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

Re: [PATCH v5 6/6] target-arm: kvm - re-inject guest debug exceptions

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: From: Alex Bennée a...@bennee.com If we can't find details for the debug exception in our debug state then we can assume the exception is due to debugging inside the guest. To inject the exception into the guest state we

Re: [PATCH v5 0/6] QEMU support for KVM Guest Debug on arm64

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée alex.ben...@linaro.org wrote: You may be wondering what happened to v3 and v4. They do exist but they didn't change much from the the original patches as I've been mostly looking the kernel side of the equation. So in summary the changes are: - updates

[PATCH v2] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into EL2. In the case of guest state it could be in either el0 or el1. Signed-off-by: Alex Bennée alex.ben...@linaro.org --- v2 - s/hypervisor code/EL2/ - comment: pc/pstate before entering/on return from el2