[Qemu-devel] [PATCH v4 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-06 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc

[Qemu-devel] [PATCH v4 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-06 Thread Luc Michel
Signed-off-by: Luc Michel Acked-by: Alistair Francis --- gdbstub.c | 60 +-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 0d70b89598..d26bad4b67 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -638,10 +6

[Qemu-devel] [PATCH v4 00/16] gdbstub: support for the multiprocess extension

2018-11-06 Thread Luc Michel
ttach 2 info threads I want to thanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (16): hw/cpu: introduce CPU clusters gdbstub: introduce GDB processes gdbstub: add multiprocess support to '?' packets g

[Qemu-devel] [PATCH v4 15/16] gdbstub: add multiprocess extension support

2018-11-06 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- gdbstub.c | 6 ++ 1 file

[Qemu-devel] [PATCH v4 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-11-06 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 21 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx

[Qemu-devel] [PATCH v4 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-06 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 47 +++ 1 file

[Qemu-devel] [PATCH v4 12/16] gdbstub: add support for vAttach packets

2018-11-06 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 4132227092..ba365808db 100644

[Qemu-devel] [PATCH v4 13/16] gdbstub: processes initialization on new peer connection

2018-11-06 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15

[Qemu-devel] [PATCH v4 11/16] gdbstub: add support for extended mode packet

2018-11-06 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index bd4895ac0a..4132227092 100644 --- a/gdbstub.c +++ b/gdbstub.c @

[Qemu-devel] [PATCH v4 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-06 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB gets confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel Acked-by: Alistair Francis

Re: [Qemu-devel] [PATCH v4 00/16] gdbstub: support for the multiprocess extension

2018-11-09 Thread Luc Michel
On 11/8/18 5:09 PM, Philippe Mathieu-Daudé wrote: > On 6/11/18 12:05, Luc Michel wrote: >> changes since v3: >>    - patch 1    cpu_cluster.h: remove QEMU_ from the multiple includes >>     guard #ifdef/#define [Alistair] >> >>    - patch 1    cpu

[Qemu-devel] [PATCH v5 11/16] gdbstub: add support for extended mode packet

2018-11-10 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index bd4895ac0a..4132227092 100644 --- a/gdbstub.c +++ b/gdbstub.c @

[Qemu-devel] [PATCH v5 10/16] gdbstub: add multiprocess support to 'D' packets

2018-11-10 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 60 --- 1 file changed, 53

[Qemu-devel] [PATCH v5 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-11-10 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- gdbstub.c | 11 --- 1 file

[Qemu-devel] [PATCH v5 02/16] gdbstub: introduce GDB processes

2018-11-10 Thread Luc Michel
is also the case when compiled in user mode, where multi-processes do not make much sense for now. Signed-off-by: Luc Michel Acked-by: Alistair Francis --- gdbstub.c | 76 +++ 1 file changed, 76 insertions(+) diff --git a/gdbstub.c b/gdbstub.c

[Qemu-devel] [PATCH v5 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-10 Thread Luc Michel
Signed-off-by: Luc Michel Acked-by: Alistair Francis --- gdbstub.c | 60 +-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 0d70b89598..d26bad4b67 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -638,10 +6

[Qemu-devel] [PATCH v5 00/16] gdbstub: support for the multiprocess extension

2018-11-10 Thread Luc Michel
hanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (16): hw/cpu: introduce CPU clusters gdbstub: introduce GDB processes gdbstub: add multiprocess support to '?' packets gdbstub: add multiprocess support

[Qemu-devel] [PATCH v5 12/16] gdbstub: add support for vAttach packets

2018-11-10 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 4132227092..ba365808db 100644

[Qemu-devel] [PATCH v5 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-10 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB gets confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel Acked-by: Alistair Francis

[Qemu-devel] [PATCH v5 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-11-10 Thread Luc Michel
Change the thread info related packets handling to support multiprocess extension. Add the CPUs class name in the extra info to help differentiate them in multiprocess mode. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 35 +-- 1

[Qemu-devel] [PATCH v5 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-10 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc

[Qemu-devel] [PATCH v5 15/16] gdbstub: add multiprocess extension support

2018-11-10 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- gdbstub.c | 6 ++ 1 file

[Qemu-devel] [PATCH v5 13/16] gdbstub: processes initialization on new peer connection

2018-11-10 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15

[Qemu-devel] [PATCH v5 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-11-10 Thread Luc Michel
by the peer. This function supports the multiprocess extension thread-id syntax. The return value specifies if the parsing failed, or if a special case was encountered (all processes or all threads). Use them in 'H' and 'T' packets handling to support the multiprocess extension.

[Qemu-devel] [PATCH v5 01/16] hw/cpu: introduce CPU clusters

2018-11-10 Thread Luc Michel
This commit adds the cpu-cluster type. It aims at gathering CPUs from the same cluster in a machine. For now it only has a `cluster-id` property. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- include/hw/cpu

[Qemu-devel] [PATCH v5 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-11-10 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index aae3cce01a..decf56c610 100644

[Qemu-devel] [PATCH v5 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-11-10 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 21 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx

[Qemu-devel] [PATCH v5 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-10 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 47 +++ 1 file

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-14 Thread Luc Michel
Hi Edgar, On 11/13/18 12:06 PM, Edgar E. Iglesias wrote: > On Sat, Nov 10, 2018 at 09:11:34AM +0100, Luc Michel wrote: >> The gdb_get_cpu_pid() function does the PID lookup for the given CPU. It >> checks if the CPU is a direct child of a CPU cluster. If it is, the >> return

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 02/16] gdbstub: introduce GDB processes

2018-11-14 Thread Luc Michel
Hi Edgar, On 11/13/18 11:52 AM, Edgar E. Iglesias wrote: > On Sat, Nov 10, 2018 at 09:11:33AM +0100, Luc Michel wrote: >> Add a structure GDBProcess that represent processes from the GDB >> semantic point of view. >> >> CPUs can be split into different proces

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-15 Thread Luc Michel
On 11/14/18 11:27 AM, Edgar E. Iglesias wrote: > On Wed, Nov 14, 2018 at 09:43:27AM +0100, Luc Michel wrote: >> Hi Edgar, >> >> On 11/13/18 12:06 PM, Edgar E. Iglesias wrote: >>> On Sat, Nov 10, 2018 at 09:11:34AM +0100, Luc Michel wrote: >>>> The gdb_

[Qemu-devel] [PATCH v6 01/16] hw/cpu: introduce CPU clusters

2018-11-15 Thread Luc Michel
This commit adds the cpu-cluster type. It aims at gathering CPUs from the same cluster in a machine. For now it only has a `cluster-id` property. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E

[Qemu-devel] [PATCH v6 00/16] gdbstub: support for the multiprocess extension

2018-11-15 Thread Luc Michel
fo threads I want to thanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (16): hw/cpu: introduce CPU clusters gdbstub: introduce GDB processes gdbstub: add multiprocess support to '?' packets gdbs

[Qemu-devel] [PATCH v6 02/16] gdbstub: introduce GDB processes

2018-11-15 Thread Luc Michel
is also the case when compiled in user mode, where multi-processes do not make much sense for now. Signed-off-by: Luc Michel Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 87 +++ 1 file changed, 87 insertions

[Qemu-devel] [PATCH v6 15/16] gdbstub: add multiprocess extension support

2018-11-15 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- gdbstub.c | 6 ++ 1 file

[Qemu-devel] [PATCH v6 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-11-15 Thread Luc Michel
by the peer. This function supports the multiprocess extension thread-id syntax. The return value specifies if the parsing failed, or if a special case was encountered (all processes or all threads). Use them in 'H' and 'T' packets handling to support the multiprocess extension.

[Qemu-devel] [PATCH v6 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-15 Thread Luc Michel
Signed-off-by: Luc Michel Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 60 +-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 26f5a7449a..4fbc05dfe3 100644 --- a/

[Qemu-devel] [PATCH v6 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-15 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc

[Qemu-devel] [PATCH v6 13/16] gdbstub: processes initialization on new peer connection

2018-11-15 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15

[Qemu-devel] [PATCH v6 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-11-15 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 4cbc81ae5b..5df9929f92 100644

[Qemu-devel] [PATCH v6 12/16] gdbstub: add support for vAttach packets

2018-11-15 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index ada53ac559..0427d1c4f0 100644

[Qemu-devel] [PATCH v6 10/16] gdbstub: add multiprocess support to 'D' packets

2018-11-15 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 60 --- 1 file changed, 53

[Qemu-devel] [PATCH v6 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-11-15 Thread Luc Michel
Change the thread info related packets handling to support multiprocess extension. Add the CPUs class name in the extra info to help differentiate them in multiprocess mode. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 35 +-- 1

[Qemu-devel] [PATCH v6 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-11-15 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel Reviewed-by: Edgar E. Iglesias --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 21 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx

[Qemu-devel] [PATCH v6 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-15 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB gets confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel Acked-by: Alistair Francis

[Qemu-devel] [PATCH v6 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-11-15 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- gdbstub.c | 11 --- 1 file

[Qemu-devel] [PATCH v6 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-15 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 47 +++ 1 file

[Qemu-devel] [PATCH v6 11/16] gdbstub: add support for extended mode packet

2018-11-15 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index eec1cf0d09..ada53ac559 100644 --- a/gdbstub.c +++ b/gdbstub.c @

[Qemu-devel] [PATCH] target/arm: fix smc incorrectly trapping to EL3 when secure is off

2018-11-17 Thread Luc Michel
-kernel test Signed-off-by: Luc Michel --- target/arm/op_helper.c | 54 +++--- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index eb6fb82fb8..0d6e89e474 100644 --- a/target/arm/op_helper.c +++ b/target

Re: [Qemu-devel] [PATCH v6 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-11-19 Thread Luc Michel
On 11/16/18 10:51 AM, Edgar E. Iglesias wrote: > On Thu, Nov 15, 2018 at 10:41:55AM +0100, Luc Michel wrote: >> Add a couple of helper functions to cope with GDB threads and processes. >> >> The gdb_get_process() function looks for a process given a pid. >> >> T

Re: [Qemu-devel] [PATCH v6 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-11-19 Thread Luc Michel
On 11/16/18 11:04 AM, Edgar E. Iglesias wrote: > On Thu, Nov 15, 2018 at 10:41:58AM +0100, Luc Michel wrote: >> Change the thread info related packets handling to support multiprocess >> extension. >> >> Add the CPUs class name in the extra info to help differenti

[Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-17 Thread Luc Michel
On 10/5/18 8:49 PM, Eduardo Habkost wrote: > On Fri, Oct 05, 2018 at 03:50:01PM +0200, Philippe Mathieu-Daudé wrote: >> On 04/10/2018 23:53, Eduardo Habkost wrote: >>> On Thu, Oct 04, 2018 at 09:01:09PM +0100, Peter Maydell wrote: On 4 October 2018 at 20:52, Eduardo Habkost wrote: > Ch

[Qemu-devel] [PATCH v3 10/16] gdbstub: add multiprocess support to 'D' packets

2018-10-26 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 60 --- 1 file changed, 53

[Qemu-devel] [PATCH v3 15/16] gdbstub: add multiprocess extension support

2018-10-26 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 6 ++ 1 file changed, 6 insertions(+) diff

[Qemu-devel] [PATCH v3 11/16] gdbstub: add support for extended mode packet

2018-10-26 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 4d8474204f..9c239c1760 100644 --- a/gdbstub.c +++ b/gdbstub.c @

[Qemu-devel] [PATCH v3 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-10-26 Thread Luc Michel
by the peer. This function supports the multiprocess extension thread-id syntax. The return value specifies if the parsing failed, or if a special case was encountered (all processes or all threads). Use them in 'H' and 'T' packets handling to support the multiprocess extension.

[Qemu-devel] [PATCH v3 16/16] arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters

2018-10-26 Thread Luc Michel
Create two separate CPU clusters for APUs and RPUs. Signed-off-by: Luc Michel --- include/hw/arm/xlnx-zynqmp.h | 3 +++ hw/arm/xlnx-zynqmp.c | 23 +++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx

[Qemu-devel] [PATCH v3 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-10-26 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB get confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel --- gdbstub.c | 9

[Qemu-devel] [PATCH v3 12/16] gdbstub: add support for vAttach packets

2018-10-26 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 9c239c1760..e5eddd8e2b 100644

[Qemu-devel] [PATCH v3 13/16] gdbstub: processes initialization on new peer connection

2018-10-26 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 20 +++- 1 file changed, 15

[Qemu-devel] [PATCH v3 02/16] gdbstub: introduce GDB processes

2018-10-26 Thread Luc Michel
is also the case when compiled in user mode, where multi-processes do not make much sense for now. Signed-off-by: Luc Michel --- gdbstub.c | 75 +++ 1 file changed, 75 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index c4e4f9f082..096ac8e99c

[Qemu-devel] [PATCH v3 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-10-26 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 47 +++ 1 file

[Qemu-devel] [PATCH v3 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-10-26 Thread Luc Michel
Change the thread info related packets handling to support multiprocess extension. Add the CPUs class name in the extra info to help differentiate them in multiprocess mode. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 35 +-- 1

[Qemu-devel] [PATCH v3 05/16] gdbstub: add multiprocess support to vCont packets

2018-10-26 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc

[Qemu-devel] [PATCH v3 01/16] hw/cpu: introduce CPU clusters

2018-10-26 Thread Luc Michel
This commit adds the cpu-cluster type. It aims at gathering CPUs from the same cluster in a machine. For now it only has a `cluster-id` property. Signed-off-by: Luc Michel --- include/hw/cpu/cluster.h | 38 +++ hw/cpu/cluster.c | 49

[Qemu-devel] [PATCH v3 00/16] gdbstub: support for the multiprocess extension

2018-10-26 Thread Luc Michel
nferior 2 attach 2 info threads I want to thanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (16): hw/cpu: introduce CPU clusters gdbstub: introduce GDB processes gdbstub: add multiprocess support to '?

[Qemu-devel] [PATCH v3 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-10-26 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- gdbstub.c | 11 --- 1 file

[Qemu-devel] [PATCH v3 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-10-26 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b7079eff4a..39b1766f28 100644

[Qemu-devel] [PATCH v3 03/16] gdbstub: add multiprocess support to '?' packets

2018-10-26 Thread Luc Michel
Signed-off-by: Luc Michel --- gdbstub.c | 57 +-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 096ac8e99c..9ca743a4c6 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -638,10 +638,49 @@ static int memtox(c

[Qemu-devel] [PATCH v2 05/15] gdbstub: add multiprocess support to 'sC' packets

2018-10-01 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 11 --- 1 file changed, 8 insertions(+), 3

[Qemu-devel] [PATCH v2 10/15] gdbstub: add support for extended mode packet

2018-10-01 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 299783b3b8..d372972dd3 100644 --- a/gdbstub.c +++ b/gdbstub.c @

[Qemu-devel] [PATCH v2 03/15] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-10-01 Thread Luc Michel
by the peer. This function supports the multiprocess extension thread-id syntax. The return value specifies if the parsing failed, or if a special case was encountered (all processes or all threads). Use them in 'H' and 'T' packets handling to support the multiprocess extension.

[Qemu-devel] [PATCH v2 06/15] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-10-01 Thread Luc Michel
Change the thread info related packets handling to support multiprocess extension. Add the CPUs class name in the extra info to help differentiate them in multiprocess mode. Signed-off-by: Luc Michel --- gdbstub.c | 32 ++-- 1 file changed, 22 insertions(+), 10

[Qemu-devel] [PATCH v2 09/15] gdbstub: add multiprocess support to 'D' packets

2018-10-01 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé --- gdbstub.c | 60 --- 1 file changed, 53

[Qemu-devel] [PATCH v2 02/15] gdbstub: add multiprocess support to '?' packets

2018-10-01 Thread Luc Michel
to a '?' request. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis --- gdbstub.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 5c86218f49..ac9d540fda 100644 --- a/gdbstub.c +++ b/gdbst

[Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-01 Thread Luc Michel
Create two separate QOM containers for APUs and RPUs to indicate to the GDB stub that those CPUs should be put in different processes. Signed-off-by: Luc Michel --- hw/arm/xlnx-zynqmp.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx

[Qemu-devel] [PATCH v2 00/15] gdbstub: support for the multiprocess extension

2018-10-01 Thread Luc Michel
nds in GDB: target extended :1234 add-inferior inferior 2 attach 2 info threads I want to thanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (15): gdbstub: introduce GDB processes gdbstub: add multiprocess support

[Qemu-devel] [PATCH v2 08/15] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-10-01 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9065e8e140..c1a02c34cd 100644 --- a/gdbstub.c +++ b/gdbstub.c

[Qemu-devel] [PATCH v2 11/15] gdbstub: add support for vAttach packets

2018-10-01 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel --- gdbstub.c | 32 1 file changed, 32 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d372972dd3..b6de821025 100644

[Qemu-devel] [PATCH v2 01/15] gdbstub: introduce GDB processes

2018-10-01 Thread Luc Michel
esses do not make much sense for now. Signed-off-by: Luc Michel --- include/exec/gdbstub.h | 8 + gdbstub.c | 67 ++ 2 files changed, 75 insertions(+) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 08363969c1..a3e41

[Qemu-devel] [PATCH v2 12/15] gdbstub: processes initialization on new peer connection

2018-10-01 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel --- gdbstub.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH v2 14/15] gdbstub: add multiprocess extension support

2018-10-01 Thread Luc Michel
Add multiprocess extension support by enabling multiprocess mode when the peer requests it, and by replying that we actually support it in the qSupported reply packet. Signed-off-by: Luc Michel --- gdbstub.c | 4 1 file changed, 4 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index

[Qemu-devel] [PATCH v2 04/15] gdbstub: add multiprocess support to vCont packets

2018-10-01 Thread Luc Michel
Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all the CPUs in currently attached processes. Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to iterate over CPUs of a given process. Use them to add multiprocess extension support to vCont packets. Signed-off-by: Luc

[Qemu-devel] [PATCH v2 07/15] gdbstub: add multiprocess support to Xfer:features:read:

2018-10-01 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel --- gdbstub.c | 44 1 file changed, 24 insertions(+), 20 deletions

[Qemu-devel] [PATCH v2 13/15] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-10-01 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB get confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel --- gdbstub.c | 9

Re: [Qemu-devel] [PATCH v2 10/15] gdbstub: add support for extended mode packet

2018-10-02 Thread Luc Michel
On 10/1/18 6:39 PM, Philippe Mathieu-Daudé wrote: > Hi Luc, > > On 01/10/2018 13:56, Luc Michel wrote: >> Add support for the '!' extended mode packet. This is required for the >> multiprocess extension. >> >> Signed-off-by: Luc Michel >>

Re: [Qemu-devel] [PATCH v2 15/15] arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups

2018-10-03 Thread Luc Michel
On 10/2/18 1:58 PM, Peter Maydell wrote: > On 2 October 2018 at 12:33, Philippe Mathieu-Daudé wrote: >> Cc'ing more QOM involved people. >> >> On 01/10/2018 13:57, Luc Michel wrote: >>> Create two separate QOM containers for APUs and RPUs to indicate to the

[Qemu-devel] [PATCH v7 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-11-23 Thread Luc Michel
Change the sC packet handling to support the multiprocess extension. Instead of returning the first thread, we return the first thread of the current process. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias

[Qemu-devel] [PATCH v7 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-11-23 Thread Luc Michel
Add support for multiprocess extension in gdb_vm_state_change() function. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Acked-by: Alistair Francis --- gdbstub.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a

[Qemu-devel] [PATCH v7 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-23 Thread Luc Michel
a parameter, and use a buffer in the process structure to store the generated description. It takes the first CPU of the process to generate the description. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Reviewed-by: Alistair Francis

[Qemu-devel] [PATCH v7 03/16] gdbstub: add multiprocess support to '?' packets

2018-11-23 Thread Luc Michel
Signed-off-by: Luc Michel Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 60 +-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 26f5a7449a..4fbc05dfe3 100644 --- a/

[Qemu-devel] [PATCH v7 02/16] gdbstub: introduce GDB processes

2018-11-23 Thread Luc Michel
is also the case when compiled in user mode, where multi-processes do not make much sense for now. Signed-off-by: Luc Michel Acked-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 87 +++ 1 file changed, 87 insertions

[Qemu-devel] [PATCH v7 01/16] hw/cpu: introduce CPU clusters

2018-11-23 Thread Luc Michel
This commit adds the cpu-cluster type. It aims at gathering CPUs from the same cluster in a machine. For now it only has a `cluster-id` property. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E

[Qemu-devel] [PATCH v7 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-23 Thread Luc Michel
When gdb_set_stop_cpu() is called with a CPU associated to a process currently not attached by the GDB client, return without modifying the stop CPU. Otherwise, GDB gets confused if it receives packets with a thread-id it does not know about. Signed-off-by: Luc Michel Acked-by: Alistair Francis

[Qemu-devel] [PATCH v7 00/16] gdbstub: support for the multiprocess extension

2018-11-23 Thread Luc Michel
inferior inferior 2 attach 2 info threads I want to thanks the Xilinx's QEMU team who sponsored this work for their collaboration and their prototype implementation. Luc Michel (16): hw/cpu: introduce CPU clusters gdbstub: introduce GDB processes gdbstub: add multiprocess supp

[Qemu-devel] [PATCH v7 13/16] gdbstub: processes initialization on new peer connection

2018-11-23 Thread Luc Michel
When a new connection is established, we set the first process to be attached, and the others detached. The first CPU of the first process is selected as the current CPU. Signed-off-by: Luc Michel Reviewed-by: Alistair Francis Reviewed-by: Edgar E. Iglesias --- gdbstub.c | 20

[Qemu-devel] [PATCH v7 12/16] gdbstub: add support for vAttach packets

2018-11-23 Thread Luc Michel
Add support for the vAttach packets. In multiprocess mode, GDB sends them to attach to additional processes. Signed-off-by: Luc Michel Reviewed-by: Edgar E. Iglesias Acked-by: Alistair Francis --- gdbstub.c | 35 +++ 1 file changed, 35 insertions(+) diff --git

[Qemu-devel] [PATCH v7 10/16] gdbstub: add multiprocess support to 'D' packets

2018-11-23 Thread Luc Michel
'D' packets are used by GDB to detach from a process. In multiprocess mode, the PID to detach from is sent in the request. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Acked-by: Alistair Francis --- gdbs

[Qemu-devel] [PATCH v7 11/16] gdbstub: add support for extended mode packet

2018-11-23 Thread Luc Michel
Add support for the '!' extended mode packet. This is required for the multiprocess extension. Signed-off-by: Luc Michel Reviewed-by: Edgar E. Iglesias Acked-by: Alistair Francis --- gdbstub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index

[Qemu-devel] [PATCH v7 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-23 Thread Luc Michel
. Signed-off-by: Luc Michel Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Acked-by: Alistair Francis --- gdbstub.c | 117 +++--- 1 file changed, 102 insertions(+), 15 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index

<    1   2   3   4   5   6   7   8   >