x60xx... (i.e KVM_REG_ARM64).
Signed-off-by: Alex Bennée
Acked-by: Christoffer Dall
---
arch/arm64/kvm/sys_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 0324458..5ee99e4 100644
--- a/arch/arm64/kvm/sys_regs.c
n the common include/kvm/arm_arch_timer.h headers.
Signed-off-by: Alex Bennée
---
arch/arm/include/asm/kvm_host.h | 3 --
arch/arm/kvm/guest.c| 10 --
arch/arm64/kvm/guest.c | 68 -
include/kvm/arm_arch_timer.h| 14 +++
ently only 1 bit used) via
the GET/SET_ONE_REG logic to pass the state between KVM and the VM
controller (e.g. QEMU).
Signed-off-by: Alex Bennée
---
arch/arm64/include/uapi/asm/kvm.h | 8 +
arch/arm64/kvm/guest.c| 61 ++-
2 files change
From: Alex Bennée
When we have a problem syncing CP registers between kvm<->qemu it's a
lot more useful to have the names of the registers in the log than just
a random abort() and core dump.
Signed-off-by: Alex Bennée
---
v2
- less verbose log message
- fix checkpatch war
=>
exit).
This list may well have more registers than are known by the TCG
emulation which is not necessarily a problem but it does stop us from
migrating between KVM and TCG hosted guests. I've added some additional
checking to report those registers under -d unimp.
Signed-off-by: Ale
Christoffer Dall writes:
> On Wed, Jul 09, 2014 at 02:55:12PM +0100, 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 migrat
Christoffer Dall writes:
> On Thu, Jul 31, 2014 at 04:14:51PM +0100, Alex Bennée wrote:
>>
>> Christoffer Dall writes:
>>
>> > On Wed, Jul 09, 2014 at 02:55:12PM +0100, Alex Bennée wrote:
>> >> To cleanly restore an SMP VM we need to ensure that the
; but keep the thread on a wake-queue, and then userspace has to send the
> thread a signal of some sort to wake it up?
Isn't the vCPU off the wait-queue by definition if the ioctl exits and
you go through the KVM_SET_ONE_REG stuff?
Once you re-enter the KVM_RUN ioctl it sees the pause_flag as cleared
and falls straight through into kvm_guest_enter() otherwise it will
again wait on wait_event_interruptible(*wq, !vcpu->arch.pause).
--
Alex Bennée
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Christoffer Dall writes:
> On Thu, Jul 31, 2014 at 07:21:44PM +0200, Paolo Bonzini wrote:
>> Il 31/07/2014 19:04, Peter Maydell ha scritto:
>> > On 31 July 2014 17:57, Paolo Bonzini wrote:
>> >> Il 09/07/2014 15:55, Alex Bennée ha scritto:
>>
>> No,
It looks like when this was initially merged it got accidentally included
in the following section. I've just moved it back in the correct section
and re-numbered it as other ioctls have been added since.
Signed-off-by: Alex Bennée
diff --git a/Documentation/virtual/kvm/api.txt
b/Document
#x27;ve
actually done the various implementations who I hope can sanity check
the write-up. The second is a trivial formatting fix for what looks
like a minor merge trip-up.
Alex Bennée (2):
KVM: document KVM_SET_GUEST_DEBUG api
KVM: fix api documentation of KVM_GET_EMULATED_CPUID
Documentation/
In preparation for working on the ARM implementation I noticed the debug
interface was missing from the API document. I've pieced together the
expected behaviour from the code and commit messages written it up as
best I can.
Signed-off-by: Alex Bennée
diff --git a/Documentation/virtua
Christoffer Dall writes:
> On Wed, Sep 10, 2014 at 11:34:53AM +0200, Paolo Bonzini wrote:
>> Il 09/09/2014 18:27, Alex Bennée ha scritto:
>> > Hi,
>> >
>> > I'm preparing to add ARM KVM GDB support and I went to read the API
>> > documenta
n to any suggestions and look forward to your valued feedback ;-)
--
Alex Bennée
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Christoffer Dall writes:
> On Thu, Nov 20, 2014 at 04:55:14PM +0000, Alex Bennée wrote:
>> Hi,
>>
>> I've almost finished the ARMv8 guest debug support but I have one
>> problem left to solve. userspace needs to know how many hardware debug
>> registers
Christoffer Dall writes:
> On Thu, Nov 20, 2014 at 04:55:14PM +0000, Alex Bennée wrote:
>>
>> * ptrace(PTRACE_GETREGSET, NT_ARM_HW_WATCH)
>>
>> This is used by GDB to access the host details in debug-monitors.
>> However the ptrace API really wants
Fixed CC:kvmarm, Added: Alexander Graf, Fixed: my From:
Replying to myself with additional information on each option
Alex Bennée writes:
> Hi,
>
> I've almost finished the ARMv8 guest debug support but I have one
> problem left to solve. userspace needs to know how ma
Alexander Graf writes:
>> Am 24.11.2014 um 13:32 schrieb Peter Maydell :
>>
>>> On 24 November 2014 at 12:26, Alexander Graf wrote:
>>> On 24.11.14 12:35, Alex Bennée wrote:
>>>>> * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1)
>>>> Nop
Alex Bennée writes:
> Alex Bennée writes:
>
>> Hi,
>>
>> I've almost finished the ARMv8 guest debug support but I have one
>> problem left to solve. userspace needs to know how many hardware debug
>> registers are available for GDB to use.
fit in with the formatting of the rest of the file.
Alex Bennée (7):
KVM: add commentary for kvm_debug_exit_arch struct
KVM: arm: guest debug, define API headers
KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl
KVM: arm64: guest debug, add SW break point support
KVM: arm64: g
Bring into line with the commentary for the other structures and their
KVM_EXIT_* cases.
Signed-off-by: Alex Bennée
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6076882..523f476 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -226,6 +226,7
nts
available on the host hardware.
Signed-off-by: Alex Bennée
diff --git a/Documentation/virtual/kvm/api.txt
b/Documentation/virtual/kvm/api.txt
index 9383359..5e8c673 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -2593,7 +2593,7 @@ The top 16 bits of t
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
diff --git a/Documentation/virtual/kvm/api.txt
b/Documentation/virtual/kvm/api.txt
index 2c6386e..9383359 100644
--- a/Documentation/virtual/kvm/api
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 .
diff --git a/Documentation/virtual/kvm/api.txt
b/Documentation/virtual/kvm/api.txt
architecture specific
control bits of the kvm_guest_debug->control flags in the ioctl
structure.
Signed-off-by: Alex Bennée
diff --git a/arch/arm64/include/uapi/asm/kvm.h
b/arch/arm64/include/uapi/asm/kvm.h
index 8e38878..de2450c 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/ar
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
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 48d26bb..a76daae 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
. 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
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S
index c0bc218..b38ce3d 100644
--- a/arch/arm64/kvm/hyp.S
+++ b/arch/arm64/kvm/hyp.S
@@ -490,65 +490,12
_CAP_GUEST_DEBUG_HW_WPS);
max_hw_bp = kvm_check_extension(cs->kvm_state, KVM_CAP_GUEST_DEBUG_HW_BPS);
thanks to kvm_check_extension zeroing failure modes.
And in it's defence it's a generic enough capability to be used across
any other architectures that need to expose this i
f your happy to do that
I'll include the change in my next version.
I could also rationalise the exit handlers as they all pretty much do
the same thing (save for the exit/syndrome related info). Again I was
keeping things nicely separated in case any particular exception needed
excessive sp
Andrew Jones writes:
> On Tue, Nov 25, 2014 at 04:10:00PM +0000, Alex Bennée wrote:
>> This commit defines the API headers for guest debugging. There are two
>> architecture specific debug structures:
>> +/* Architecture related debug defines - upper 16 bits of
>> +
Andrew Jones writes:
> On Tue, Nov 25, 2014 at 04:10:01PM +0000, 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 patches
Peter Maydell writes:
> On 25 November 2014 at 16:10, Alex Bennée wrote:
>> +/* Exit types which define why we did a debug exit */
>> +#define KVM_DEBUG_EXIT_ERROR 0x0
>> +#define KVM_DEBUG_EXIT_SINGLE_STEP 0x1
>> +#define KVM_DEBUG_EXIT_SW_B
Andrew Jones writes:
> On Tue, Nov 25, 2014 at 04:10:03PM +0000, Alex Bennée wrote:
>> This adds support for single-stepping the guest. As userspace can and
>> will manipulate guest registers before restarting any tweaking of the
>> registers has to occur just before cont
Christoffer Dall writes:
> On Wed, Nov 26, 2014 at 03:04:10PM +0000, Alex Bennée wrote:
>>
>> Peter Maydell writes:
>>
>> > On 25 November 2014 at 16:10, Alex Bennée wrote:
>> >> +/* Exit types which define why we did a debug exit */
>>
Christoffer Dall writes:
> On Tue, Nov 25, 2014 at 04:10:02PM +0000, Alex Bennée wrote:
>> This adds support for SW breakpoints inserted by userspace.
>>
>> First we need to trap all BKPT exceptions in the hypervisor (ELS). This
>> in controlled through the MDCR_EL2
Christoffer Dall writes:
> On Tue, Nov 25, 2014 at 04:10:03PM +0000, Alex Bennée wrote:
>> This adds support for single-stepping the guest. As userspace can and
>> will manipulate guest registers before restarting any tweaking of the
>> registers has to occur just before c
Christoffer Dall writes:
> On Tue, Nov 25, 2014 at 04:10:04PM +0000, 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 r
Christoffer Dall writes:
> On Tue, Nov 25, 2014 at 04:10:05PM +0000, Alex Bennée wrote:
>> --- a/arch/arm64/kvm/hyp.S
>> +++ b/arch/arm64/kvm/hyp.S
>> @@ -18,6 +18,7 @@
>> #include
>> #include
>>
>> +#include
>> #include
>> #
From: Alex Bennée
The aim of these tests is to combine with an appropriate kernel
image (with symbol-file vmlinux) and check it behaves as it should.
Given a kernel it checks:
- single step
- software breakpoint
- hardware breakpoint
- access, read and write watchpoints
On success it
is actually capable of more advanced matching but it is
unclear if this expressiveness is available via the gdbstub protocol.
Signed-off-by: Alex Bennée
---
v2
- correct setting of PMC/BAS/MASK
- improved commentary
- added helper function to check watchpoint in range
- fix find/deletion
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 the kernel.
Signed-off-by: Alex Bennée
---
v2
- convert to using HSR_EC
v3
- use internals.h definitions
---
targe
returns to userspace.
Signed-off-by: Alex Bennée
--
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
v9
- add include for
From: Alex Bennée
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-use the TCG exception
code (do_interupt).
However while guest debugging is in effe
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
---
target-arm/kvm64.c | 18 ++
1 file changed, 18 insertions(+
ch.
GIT Repo:
The patch series is based off a recent master and can be found at:
https://github.com/stsquad/qemu
branch: kvm/guest-debug-v9
Alex Bennée (6):
target-arm: kvm64 - introduce kvm_arm_init_debug()
target-arm: kvm - implement software breakpoints
target-arm: kvm - support for
Peter Maydell writes:
> On 20 November 2015 at 15:05, Peter Maydell wrote:
>> On 12 November 2015 at 16:20, Alex Bennée 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 capa
+
> + /* Jump in the fire! */
> + exit_code = __guest_enter(vcpu, host_ctxt);
> + /* And we're baaack! */
> +
> + __sysreg_save_state(guest_ctxt);
> + __sysreg32_save_state(vcpu);
> + __timer_save_state(vcpu);
> + __vgic_save_state(vcpu);
> +
> + __deactivate_traps(vcpu);
> + __deactivate_vm(vcpu);
> +
> + __sysreg_restore_state(host_ctxt);
> +
> + __debug_save_state(vcpu, &vcpu->arch.vcpu_debug_state, guest_ctxt);
> + __debug_clear_restore_state(vcpu, &vcpu->arch.host_debug_state,
> host_ctxt);
> +
> + return exit_code;
> +}
--
Alex Bennée
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
+ write_gicreg(cpu_if->vgic_lr[LR_OFFSET(5)], ICH_LR5_EL2);
> + case 4:
> + write_gicreg(cpu_if->vgic_lr[LR_OFFSET(4)], ICH_LR4_EL2);
> + case 3:
> + write_gicreg(cpu_if->vgic_lr[LR_OFFSET(3)], ICH_LR3_EL2);
> + case 2:
> +
kvm_cpu_context *ctxt);
> void __sysreg32_save_state(struct kvm_vcpu *vcpu);
> void __sysreg32_restore_state(struct kvm_vcpu *vcpu);
>
> +void __debug_save_state(struct kvm_vcpu *vcpu,
> + struct kvm_guest_debug_arch *dbg,
> + struct k
he arch initialization indirectly
> calls kvm_arm_create_scratch_host_vcpu and that's where the
> trouble begins, as it also creates a VM.
>
> My assumption was, that nobody would create multiple VMs under
> the same PID. Christian and I are working on a solution on kernel
> si
t; KVM_ARM64_DEBUG_DIRTY, just like we have skip_debug_state on all actions
> involving the save/restore in the assembly version.
>
>> in any case, I feel some context is lost when this is moved away from
>> assembly and understanding this patch would be easier if the semantics
>
Peter Maydell writes:
> On 12 November 2015 at 16:20, Alex Bennée 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 the kernel.
>&g
Peter Maydell writes:
> On 12 November 2015 at 16:20, Alex Bennée wrote:
>> From: Alex Bennée
>>
>> The aim of these tests is to combine with an appropriate kernel
>> image (with symbol-file vmlinux) and check it behaves as it should.
>> Given a kernel
ug capability checks
- Whitespace and comment cleanups
- Py2/3 cleanliness for test script
More detailed changelogs are attached to each patch.
GIT Repo:
The patch series is based off a recent master and can be found at:
https://github.com/stsquad/qemu
branch: kvm/guest-debug-v10
Alex Benn
can't handle the
guest using single step as we will keep trapping to back to userspace.
GDB makes heavy use of single-step behind the scenes which effectively
means the guests ability to debug itself is disabled while it is being
debugged.
Signed-off-by: Alex Bennée
---
v5:
- new for v5
v1
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
---
target-arm/kvm64.c | 18 ++
1 file changed, 18 insertions(+
s architectures.
Signed-off-by: Alex Bennée
---
v10:
- fixup for Py2/3 cleanliness
- drop to shell on exception
---
tests/guest-debug/test-gdbstub.py | 176 ++
1 file changed, 176 insertions(+)
create mode 100644 tests/guest-debug/test-gdbstub.py
diff --git a/te
;t support guest debug the ioctl will
simply error.
Signed-off-by: Alex Bennée
---
v2
- convert to using HSR_EC
v3
- use internals.h definitions
v10
- fix arm32 build
- remove redundent flag setting (done in main kvm.c)
- more words on fail case
---
target-arm/kvm64.c | 7 +++
1 file
returns to userspace.
Signed-off-by: Alex Bennée
--
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
v9
- add include for
is actually capable of more advanced matching but it is
unclear if this expressiveness is available via the gdbstub protocol.
Signed-off-by: Alex Bennée
---
v2
- correct setting of PMC/BAS/MASK
- improved commentary
- added helper function to check watchpoint in range
- fix find/deletion
virtio_transport_send_reset(vsk, pkt);
> + return -ENOMEM;
> + }
> +
> + pr_debug("%s: create pending\n", __func__);
> + child = __vsock_create(sock_net(sk), NULL, sk, GFP_KERNEL,
> +sk->sk_type, 0);
> +
virtio_transport_recv_pkt_work);
> + INIT_WORK(&vsock->tx_work, virtio_transport_send_pkt_work);
> +
> + mutex_lock(&vsock->rx_lock);
> + virtio_vsock_rx_fill(vsock);
> + mutex_unlock(&vsock->rx_lock);
> +
> + mutex_unlock(&the_virti
et_init,
> + .destruct = virtio_transport_destruct,
> + .release = virtio_transport_release,
> + .connect = virtio_transport_connect,
> + .shutdown = virtio_transport_shutdown,
> +
> + .dgram_e
elp
> + This module implements a virtio transport for Virtual Sockets.
> +
> + Enable this transport if your Virtual Machine runs on
> Qemu/KVM.
Is this better worded as:
"Enable this transport if your Virtual Machine host supports vsockets
over virtio.
ing verified that the output code is similar.
>
> Cc: Alex Bennée
> Signed-off-by: Marc Zyngier
> ---
> arch/arm64/kvm/sys_regs.c | 58
> +++
> 1 file changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/arch/arm64/kvm
Marc Zyngier writes:
> On 17/12/15 16:28, Alex Bennée wrote:
>>
>> Marc Zyngier writes:
>>
>>> The debug trapping code is pretty heavy on the "inline" attribute,
>>> but most functions are actually referenced in the sysreg tables,
>>> m
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 .
---
v2
- simplified form of the ioctl (stuff will go into setup_debug)
diff --git a
in the mirror location
- if we are using HW assisted debug we do the same with DBG[WB][CV]R
There is one register (MDCCINT_EL1) which guest debug doesn't care about
so this behaves as before.
Signed-off-by: Alex Bennée
diff --git a/arch/arm64/include/asm/kvm_host.h
b/arch/arm64/includ
of the TDA bit from the hyp code
into the C code.
Signed-off-by: Alex Bennée
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/arm/include/
sed 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
---
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 to debug exit
-off-by: Alex Bennée
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
@@ -310,8 +310,8 @@ struct kvm_guest_debug_arch {
* and upper 16 bits are
d the hypervisor needs to start again
and deliver the exception to guest.
Signed-off-by: Alex Bennée
---
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/Documentation/virtua
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
architecture specific
control bits of the kvm_guest_debug->control flags in the ioctl
structure.
Signed-off-by: Alex Bennée
---
v2
- expose hsr and pc directly to user-space
diff --git a/arch/arm64/include/uapi/asm/kvm.h
b/arch/arm64/include/uapi/asm/kvm.h
index 3ef77a4..6ee70a0 100644
--- a/a
Bring into line with the commentary for the other structures and their
KVM_EXIT_* cases.
Signed-off-by: Alex Bennée
---
v2
- add comments for other exit types
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 8055706..5eedf84 100644
--- a/include/uapi/linux/kvm.h
+++ b
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
---
v2
- Move pstate/mdscr manipulation into C
- don't export guest_debug to assembly
- add accessor for saved_debug regs
-
T and WPT registers.
I've also added a #define trace_dreg to shorten some lines.
Signed-off-by: Alex Bennée
diff --git a/arch/arm64/kvm/debug.c b/arch/arm64/kvm/debug.c
index 638c111..7c96288 100644
--- a/arch/arm64/kvm/debug.c
+++ b/arch/arm64/kvm/debug.c
@@ -25,12 +25,37 @@
#include
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 the kernel.
Signed-off-by: Alex Bennée
---
v2
- convert to using HSR_EC
diff --git a/target-arm/kvm.c b/target-arm/
a v4.0-rc6 and can be
found at:
https://git.linaro.org/people/alex.bennee/linux.git
branch: guest-debug/4.0-rc6-v2
Alex Bennée (4):
linux-headers: partial sync from my kernel tree (DEV)
target-arm: kvm - implement software breakpoints
target-arm: kvm - support for single step
target-arm:
From: Alex Bennée
This adds basic support for HW assisted debug. The ioctl interface to
KVM allows us to pass an implementation defined number of break and
watch point registers. When KVM_GUESTDBG_USE_HW_BP is specified these
debug registers will be installed in place on the world switch into
returns to userspace.
Signed-off-by: Alex Bennée
--
v2
- handle debug exit with new hsr exception info
- add verbosity to UNIMP message
diff --git a/target-arm/kvm.c b/target-arm/kvm.c
index 72c1fa1..290c1fe 100644
--- a/target-arm/kvm.c
+++ b/target-arm/kvm.c
@@ -25,6 +25,7 @@
#include &qu
I assume I'll properly merge the KVM Headers direct from Linux when
done. These headers came from:
https://git.linaro.org/people/alex.bennee/linux.git/shortlog/refs/heads/guest-debug/4.0-rc6-v2
Signed-off-by: Alex Bennée
---
v2
- update ABI to include ->far
diff --git a/linux-hea
changing the serialisation format.
Signed-off-by: Alex Bennée
---
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.
v6
- cache
ug exit and pc
>>
>> The type of debugging being used is control by the architecture specific
>
> s/control/controlled/
good catch
>
>> control bits of the kvm_guest_debug->control flags in the ioctl
>> structure.
>>
>> Signed-off-by: Alex Bennée
27;t know 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
>>
>> ---
>> v2
>> - update to use new exit struct
>> -
Andrew Jones writes:
> On Tue, Mar 31, 2015 at 04:08:05PM +0100, Alex Bennée wrote:
>> This adds support for single-stepping the guest. As userspace can and
>> will manipulate guest registers before restarting any tweaking of the
>> registers has to occur just before cont
etting mdcr_el2 has been moved out of hyp.S and now
>> > uses the value kept in vcpu->arch.mdcr_el2.
>> >
>> > This also moves the conditional setting of the TDA bit from the hyp code
>> > into the C code.
>> >
>> > Signed-off-by: Alex Bennée
n't return -EINVAL if you push in KVM_GUESTDBG_ENABLE or 0.
>>
>> "Any unsupported flag will return -EINVAL. For now, only KVM_GUESTDBG_ENABLE
>> is
>> supported, although it won't have any effects."
>>
>> > functionality will be added with further
Andrew Jones writes:
> $SUBJECT | sed s/guest_debug debug/guest debug/ ?
>
> On Tue, Mar 31, 2015 at 04:08:08PM +0100, Alex Bennée wrote:
>> This includes trace points for:
>> kvm_arch_setup_guest_debug
>> kvm_arch_clear_guest_debug
>> kvm_handle_guest_
Andrew Jones 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
Andrew Jones writes:
> On Tue, Mar 31, 2015 at 04:08:06PM +0100, Alex Bennée wrote:
>> This adds support for userspace to control the HW debug registers for
>> guest debug. We'll only copy the $ARCH defined number across as that is
>> all that hyp.S will use anyw
Christoffer Dall writes:
> On Tue, Mar 31, 2015 at 04:08:00PM +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 e
Christoffer Dall 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
David Hildenbrand 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 w
Alex Bennée writes:
> Hi,
>
> I thought I'd sent V1 to the list but apparently not. Anyway this
> patch series provides the QEMU side of guest debug support for arm64.
> I'm assuming the first patch will be dropped when a proper merge of
> the linux-headers is
Peter Maydell writes:
> On 31 March 2015 at 16:40, Alex Bennée 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 the kernel.
>&g
Peter Maydell writes:
> On 31 March 2015 at 16:40, Alex Bennée wrote:
>> From: Alex Bennée
>>
>> This adds basic support for HW assisted debug. The ioctl interface to
>> KVM allows us to pass an implementation defined number of break and
>> watch point regis
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 d
Christoffer Dall writes:
> On Tue, Mar 31, 2015 at 04:08:01PM +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
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 a
1 - 100 of 298 matches
Mail list logo