on the SPSR patch to yourself if you prefer.
Yeah I'll re-spin the series hopefully by the end of this week or early next.
Thanks,
-Christoffer
--
Alex Bennée
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman
mapping and also to
ensure the most current value of the spsr is updated to the banked
registers (relevant for KVM-TCG migration).
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2 (ajb)
- minor tweaks and clarifications
v3
- Use
changing the serialisation format.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- make mpstate field runtime dependant (kvm_enabled())
- drop initial KVM_CAP_MP_STATE requirement
- re-use cpu_powered instead of new field
v4
- s/HALTED/STOPPED/
- move code from machine.c to kvm
As there is logic to deal with the difference between edge and level
triggered interrupts in the kernel we must ensure it knows the
configuration of the IRQs before we restore the pending state.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Acked-by: Christoffer Dall christoffer.d
For migration to work we need to sync all of the register state. This is
especially noticeable when GCC starts using FP registers as spill
registers even with integer programs.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v4:
- fixed merge conflicts
- rm superfluous reg.id++
diff
the whole thing is wrapped in if (el 0)
-- PMM
--
Alex Bennée
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
power state via MP_STATE ioctl?
On Mon, Mar 02, 2015 at 01:29:00PM +, Alex Bennée wrote:
To cleanly restore an SMP VM we need to ensure that the current pause
state of each vcpu is correctly recorded. Things could get confused if
the CPU starts running after migration restore completes when
Christoffer Dall christoffer.d...@linaro.org writes:
On Mon, Mar 02, 2015 at 01:29:01PM +, Alex Bennée wrote:
From: Christoffer Dall christoffer.d...@linaro.org
Migrating active interrupts causes the active state to be lost
completely. This implements some additional bitmaps to track
Peter Maydell peter.mayd...@linaro.org writes:
On 12 March 2015 at 15:51, Peter Maydell peter.mayd...@linaro.org wrote:
On 4 March 2015 at 14:35, Alex Bennée alex.ben...@linaro.org wrote:
While observing KVM traces I can see additional IRQ calls on pretty much
every MMIO access which is just
Peter Maydell peter.mayd...@linaro.org writes:
On 4 March 2015 at 14:35, Alex Bennée alex.ben...@linaro.org wrote:
This adds the saving and restore of the current Multi-Processing state
of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of
potential states for x86 we only
to do this. The arm/arm64
interface is a lot simpler as the only valid states are
KVM_MP_STATE_RUNNABLE and KVM_MP_STATE_STOPPED.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- use KVM_MP_STATE_STOPPED instead of KVM_MP_STATE_HALTED
- reduce textual churn on API document
diff --git
the interrupt and mask the timer only then.
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Alex Bennée alex.ben...@linaro.org
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 38721d2..eb93240 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -269,7
.
The final patch may get dropped before up-streaming but it does
provide useful trace points for anyone who want to track what is
happening during guest debug.
Alex Bennée (10):
KVM: add commentary for kvm_debug_exit_arch struct
KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values
KVM: arm: guest
of the guest to single-step itself as we have no easy way of
re-entering the guest after the exception has been delivered to the
hypervisor.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
- add accessor
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Currently any operation flag will return EINVAL. Actual
functionality will be added with further patches.
Signed-off-by: Alex Bennée alex.ben...@linaro.org.
---
v2
- simplified form of the ioctl (stuff will go
on the address and not the PC we
also need to export the value of far_el2 to userspace.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- switched to C setup
- replace host debug registers directly into context
- minor tweak to api docs
- setup right register for debug
- add FAR_EL2
and the hypervisor needs to start again
and deliver the exception to guest.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- update to use new exit struct
- tweak for C setup
- do our setup in debug_setup/clear code
- fixed up comments
diff --git a/Documentation/virtual/kvm/api.txt
b
of the TDA bit from the hyp code
into the C code.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
create mode 100644 arch/arm64/kvm/debug.c
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 41008cd..8c01c97 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch
-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Acked-by: Marc Zyngier marc.zyng...@arm.com
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 7042251..e2a676e 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -114,6
Peter Maydell peter.mayd...@linaro.org writes:
On 4 March 2015 at 23:35, Alex Bennée alex.ben...@linaro.org wrote:
I was getting very confused about the duplication of state. Perhaps we
should just get rid of env-spsr and use helpers that understand the
banking?
Doesn't seem worth changing
changing the serialisation format.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- make mpstate field runtime dependant (kvm_enabled())
- drop initial KVM_CAP_MP_STATE requirement
- re-use cpu_powered instead of new field
diff --git a/target-arm/machine.c b/target-arm/machine.c
index
I was getting very confused about the duplication of state. Perhaps we
should just get rid of env-spsr and use helpers that understand the
banking?
Signed-off-by: Alex Bennée alex.ben...@linaro.org
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 11845a6..d7fd13f 100644
--- a/target-arm
mapping and also to
ensure the most current value of the spsr is updated to the banked
registers (relevant for KVM-TCG migration).
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2 (ajb)
- minor tweaks and clarifications
diff --git
As there is logic to deal with the difference between edge and level
triggered interrupts in the kernel we must ensure it knows the
configuration of the IRQs before we restore the pending state.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc
mapping and also to
ensure the most current value of the spsr is updated to the banked
registers (relevant for KVM-TCG migration).
Signed-off-by: Christoffer Dall christoffer.d...@linaro.org
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2 (ajb)
- minor tweaks and clarifications
diff --git
While observing KVM traces I can see additional IRQ calls on pretty much
every MMIO access which is just plain inefficient. Only update the QEMU
IRQ level if something has actually changed from last time. Otherwise we
may be papering over other failure modes.
Signed-off-by: Alex Bennée alex.ben
For migration to work we need to sync all of the register state. This is
especially noticeable when GCC starts using FP registers as spill
registers even with integer programs.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v4:
- fixed merge conflicts
- rm superfluous reg.id++
v5
of the spsr is updated to the banked
registers (relevant for KVM-TCG migration).
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2 (ajb)
- minor tweaks and clarifications
v3
- Use the correct bank index function for setting/getting env-spsr
- only deal with spsrs in elevated exception levels
changing the serialisation format.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- make mpstate field runtime dependant (kvm_enabled())
- drop initial KVM_CAP_MP_STATE requirement
- re-use cpu_powered instead of new field
v4
- s/HALTED/STOPPED/
- move code from machine.c to kvm
From: Peter Maydell peter.mayd...@linaro.org
The AArch64 SPSR_EL1 register is architecturally mandated to
be mapped to the AArch32 SPSR_svc register. This means its
state should live in QEMU's env-banked_spsr[1] field.
Correct the various places in the code that incorrectly
put it in
David Hildenbrand d...@linux.vnet.ibm.com writes:
On Tue, Mar 31, 2015 at 04:08:02PM +0100, Alex Bennée wrote:
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Currently any operation flag will return EINVAL. Actual
functionality will be added with further
Peter Maydell peter.mayd...@linaro.org writes:
On 31 March 2015 at 16:40, Alex Bennée alex.ben...@linaro.org wrote:
This adds support for single-step. There isn't much to do on the QEMU
side as after we set-up the request for single step via the debug ioctl
it is all handled within
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
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 alex.ben
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
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
to go to guest's context
There is one register (MDCCINT_EL1) which guest debug doesn't care about
so this behaves as before.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- re-factor for better flow and fall through.
- much simpler with debug_ptr (use the guest area as before
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 registers.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
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
---
v3:
- separated capability check from previous patches
- moved into arm64
trace points for anyone who want to track what is
happening during guest debug.
Alex Bennée (12):
KVM: add comments for kvm_debug_exit_arch struct
KVM: define common __KVM_GUESTDBG_USE_SW/HW_BP values
KVM: arm64: guest debug, define API headers
KVM: arm: guest debug, add stub
of the guest to single-step itself.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
- add accessor for saved_debug regs
- tweak save/restore of mdscr_el1
v3
- don't save PC in debug information
(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 alex.ben...@linaro.org
---
v2
- update to use new exit struct
- tweak for C setup
- do our setup
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 d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
-off-by: Alex Bennée alex.ben...@linaro.org
Reviewed-by: Andrew Jones drjo...@redhat.com
diff --git a/arch/powerpc/include/uapi/asm/kvm.h
b/arch/powerpc/include/uapi/asm/kvm.h
index ab4d473..1731569 100644
--- a/arch/powerpc/include/uapi/asm/kvm.h
+++ b/arch/powerpc/include/uapi/asm/kvm.h
the hyp code
into the C code which is currently used for the lazy debug register
context switch code.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- rename fns from arch-arm
- preserve MDCR_EL2.HPMN setting
- re-word some of the comments
- fix some minor grammar nits
- merge
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Any unsupported flag will return -EINVAL. For now, only
KVM_GUESTDBG_ENABLE is supported, although it won't have any effects.
Signed-off-by: Alex Bennée alex.ben...@linaro.org.
---
v2
- simplified form of the ioctl
by the architecture
specific control bits of the kvm_guest_debug-control flags in the ioctl
structure.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
---
v2
- expose hsr and pc directly
Peter Maydell peter.mayd...@linaro.org writes:
On 15 May 2015 at 16:14, Alex Bennée alex.ben...@linaro.org wrote:
Mark Rutland mark.rutl...@arm.com writes:
On Fri, May 15, 2015 at 03:27:06PM +0100, Alex Bennée wrote:
+/*
+ * See v8 ARM ARM D7.3: Debug Registers
+ *
+ * The control
Mark Rutland mark.rutl...@arm.com writes:
Hi Alex,
On Fri, May 15, 2015 at 03:27:13PM +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
This includes trace points for:
kvm_arch_setup_guest_debug
kvm_arch_clear_guest_debug
I've also added some generic register setting trace events and also a
trace point to dump the array of hardware registers.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- add trace event
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: Christoffer Dall christoffer.d...@linaro.org
---
v3:
- separated capability
. It does however rely on the debug registers being 64 bit
aligned (as they happen to be in the hyp ABI).
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3:
- return to the patch series
- add save and restore targets
- change register use and document
v4:
- keep original setup/restore
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.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Reviewed-by: Andrew Jones drjo...@redhat.com
-
v4
- claim
entails updating the sys_regs code to access this new
structure. Instead of passing a register index we now pass an offset
into the kvm_guest_debug_arch structure.
We also need to ensure the GET/SET_ONE_REG ioctl operations store the
registers in their correct location.
Signed-off-by: Alex Bennée
(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 alex.ben...@linaro.org
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v2
- update
of the guest to single-step itself.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
- add accessor for saved_debug regs
- tweak save/restore of mdscr_el1
v3
- don't save PC in debug information
the hyp code
into the C code which is currently used for the lazy debug register
context switch code.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- rename fns from arch-arm
- preserve MDCR_EL2.HPMN setting
- re-word some of the comments
- fix some minor grammar nits
- merge
by the architecture
specific control bits of the kvm_guest_debug-control flags in the ioctl
structure.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
Acked-by: Christoffer Dall christoffer.d
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 d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
Andrew Jones drjo...@redhat.com writes:
On Tue, Mar 31, 2015 at 04:08:07PM +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
Christoffer Dall christoffer.d...@linaro.org writes:
On Tue, Mar 31, 2015 at 04:08:03PM +0100, Alex Bennée wrote:
This is a precursor for later patches which will need to do more to
setup debug state before entering the hyp.S switch code. The existing
functionality for setting mdcr_el2 has
of the breakpoint then we
have a guest inserted breakpoint and the hypervisor needs to start again
and deliver the exception to guest.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- update to use new exit struct
- tweak for C setup
- do our setup in debug_setup/clear code
- fixed
Will Deacon will.dea...@arm.com 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
, 4, r2, c1, c1, 1
- ldr r3, =(HDCR_TPM|HDCR_TPMCR|HDCR_TDRA|HDCR_TDOSA|HDCR_TDA)
+ ldr r3, =(HDCR_TPM|HDCR_TPMCR)
.if \operation == vmentry
orr r2, r2, r3 @ Trap some perfmon accesses
.else
--
Alex Bennée
-by: Zhichao Huang zhichao.hu...@linaro.org
Reviewed-by: Alex Bennée alex.ben...@linaro.org
---
arch/arm/kvm/coproc.c | 34 --
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c
index 2e12760..9d283d9
firing)...
Introducing a non-preemptible section in kvm_arch_vcpu_ioctl_run
prevents the problem from occuring.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Reviewed-by: Alex Bennée alex.ben...@linaro.org
---
arch/arm/kvm/arm.c | 13 +
1 file changed, 13 insertions(+)
diff
);
+ kvm_timer_sync_hwstate(vcpu);
+
ret = handle_exit(vcpu, run, ret);
}
Reviewed-by: Alex Bennée alex.ben...@linaro.org
--
Alex Bennée
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo
itself. */
for (i = 0; i ARRAY_SIZE(invariant_cp15); i++)
--
Alex Bennée
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
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
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
Zhichao Huang zhichao.hu...@linaro.org writes:
Add #ifndef __ASSEMBLY__ in hw_breakpoint.h, in order to use
the ARM_DSCR_MDBGEN macro from KVM assembly code.
Signed-off-by: Zhichao Huang zhichao.hu...@linaro.org
Reviewed-by: Alex Bennée alex.ben...@linaro.org
---
arch/arm/include/asm
the irq numbers)
- source CPU and HW interrupt can share the same field, as
a SGI doesn't have a physical line.
Signed-off-by: Marc Zyngier marc.zyng...@arm.com
Reviewed-by: Alex Bennée alex.ben...@linaro.org
---
include/kvm/arm_vgic.h | 10 +++---
1 file changed, 7 insertions(+), 3
)] = lr_val;
}
--
Alex Bennée
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
Christoffer Dall christoffer.d...@linaro.org writes:
On Thu, Jun 25, 2015 at 07:38:33AM +0100, Alex Bennée wrote:
Christoffer Dall christoffer.d...@linaro.org writes:
On Fri, Jun 19, 2015 at 01:23:48PM +0100, Alex Bennée wrote:
This adds support for userspace to control the HW debug
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: Christoffer Dall christoffer.d...@linaro.org
---
v3:
- separated capability
to the KVM_EXTENSION ioctl to allow
userspace to query the number of hardware break and watch points
available on the host hardware.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- switched to C setup
- replace host debug registers directly into context
- minor tweak to api docs
This includes trace points for:
kvm_arch_setup_guest_debug
kvm_arch_clear_guest_debug
I've also added some generic register setting trace events and also a
trace point to dump the array of hardware registers.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- add trace event
. Once the host is no
longer debugging the guest its ability to single-step userspace is
restored.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
. It does however rely on the debug registers being 64 bit
aligned (as they happen to be in the hyp ABI).
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3:
- return to the patch series
- add save and restore targets
- change register use and document
v4:
- keep original setup/restore
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 d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
(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 alex.ben...@linaro.org
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v2
- update
The elr_el2 and spsr_el2 registers in fact contain the processor state
before entry into the hypervisor code. In the case of guest state it
could be in either el0 or el1.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
arch/arm64/kvm/hyp.S | 8
1 file changed, 4 insertions(+), 4
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Any unsupported flag will return -EINVAL. For now, only
KVM_GUESTDBG_ENABLE is supported, although it won't have any effects.
Signed-off-by: Alex Bennée alex.ben...@linaro.org.
Reviewed-by: Christoffer Dall christoffer.d
-v6
Alex Bennée (12):
KVM: add comments for kvm_debug_exit_arch struct
KVM: arm64: fix misleading comments in save/restore
KVM: arm64: guest debug, define API headers
KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl
KVM: arm: introduce kvm_arm_init/setup/clear_debug
KVM: arm64
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
entails updating the sys_regs code to access this new
structure. Instead of passing a register index we now pass an offset
into the kvm_guest_debug_arch structure.
We also need to ensure the GET/SET_ONE_REG ioctl operations store the
registers in their correct location.
Signed-off-by: Alex Bennée
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 d...@linux.vnet.ibm.com
Reviewed-by: Andrew Jones drjo...@redhat.com
the hyp code
into the C code which is currently used for the lazy debug register
context switch code.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- rename fns from arch-arm
- preserve MDCR_EL2.HPMN setting
- re-word some of the comments
- fix some minor grammar nits
- merge
to the KVM_EXTENSION ioctl to allow
userspace to query the number of hardware break and watch points
available on the host hardware.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- switched to C setup
- replace host debug registers directly into context
- minor tweak to api docs
This includes trace points for:
kvm_arch_setup_guest_debug
kvm_arch_clear_guest_debug
I've also added some generic register setting trace events and also a
trace point to dump the array of hardware registers.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v3
- add trace event
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: Christoffer Dall christoffer.d...@linaro.org
---
v3:
- separated capability
. However this would be a
bunch of potentially hairy new code so I've left this as an exercise
for a future patch series.
https://github.com/stsquad/qemu
branch: kvm/guest-debug-v5
Alex Bennée (12):
KVM: add comments for kvm_debug_exit_arch struct
KVM: arm64: fix misleading comments in save/restore
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG
ioctl. Any unsupported flag will return -EINVAL. For now, only
KVM_GUESTDBG_ENABLE is supported, although it won't have any effects.
Signed-off-by: Alex Bennée alex.ben...@linaro.org.
Reviewed-by: Christoffer Dall christoffer.d
of the guest to single-step itself.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
- add accessor for saved_debug regs
- tweak save/restore of mdscr_el1
v3
- don't save PC in debug information
The elr_el2 and spsr_el2 registers in fact contain the processor state
before entry into the hypervisor code. In the case of guest state it
could be in either el0 or el1.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
arch/arm64/kvm/hyp.S | 8
1 file changed, 4 insertions(+), 4
(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 alex.ben...@linaro.org
Reviewed-by: Christoffer Dall christoffer.d...@linaro.org
---
v2
- update
to userspace.
Signed-off-by: Alex Bennée alex.ben...@linaro.org
--
v2
- handle debug exit with new hsr exception info
- add verbosity to UNIMP message
v3
- sync with kvm_cpu_synchronize_state() before checking PC.
- use internals.h defines
- use env-pc
- use proper format types
---
target-arm
I assume I'll properly merge the KVM Headers direct from Linux when
the kernel side is upstream. These headers came from:
https://git.linaro.org/people/alex.bennee/linux.git/shortlog/refs/heads/guest-debug/4.1-rc5-v5
Signed-off-by: Alex Bennée alex.ben...@linaro.org
---
v2
- update ABI
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
---
target-arm/kvm64.c | 18 ++
1 file changed, 18
and can be found at:
https://github.com/stsquad/qemu
branch: kvm/guest-debug-v5
The kernel patches for this series are based off a v4.1-rc5-v5 and can be
found at:
https://git.linaro.org/people/alex.bennee/linux.git
branch: guest-debug/4.1-rc5-v5
Alex Bennée (6):
linux-headers: sync from my kernel
1 - 100 of 422 matches
Mail list logo