From patchwork Sat Sep 1 12:46:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Michel X-Patchwork-Id: 964891 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=greensocs.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=greensocs.com header.i=@greensocs.com header.b="oOjJScln"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="V/wfnJBO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=greensocs.com header.i=@greensocs.com header.b="V/wfnJBO"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 422bm14BDkz9ryn for ; Sat, 1 Sep 2018 22:54:40 +1000 (AEST) Received: from localhost ([::1]:37068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw5QC-0004rX-Sj for incoming@patchwork.ozlabs.org; Sat, 01 Sep 2018 08:54:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw5JE-0004rw-3j for qemu-devel@nongnu.org; Sat, 01 Sep 2018 08:47:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fw5JC-0007od-SY for qemu-devel@nongnu.org; Sat, 01 Sep 2018 08:47:23 -0400 Received: from greensocs.com ([193.104.36.180]:40587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fw5J5-0007hS-Lx; Sat, 01 Sep 2018 08:47:16 -0400 Received: from localhost (localhost [127.0.0.1]) by greensocs.com (Postfix) with ESMTP id 16B4D521AB3; Sat, 1 Sep 2018 14:47:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1535806025; bh=SxJ+P3Shu8JvHfqWoN5GPgmL2ptTLaABfMjruhHEDbM=; h=From:To:Cc:Subject:Date; b=oOjJSclnl5ukpkL/7ndvsFw91xdvUkb5/u8CAfSD+yNMvZ0m1oPWxdZAS4JFVjotq zKnMBEWqa6CtvmGSwIq4282+TdJAgXkx177Dsa0lXARA/HtYVgvXi0lbhqrzQ2rC/n RRoqX575bJ8cnDkpoXixVRVigW56h22G4Jz8rYVE= X-Virus-Scanned: amavisd-new at greensocs.com Authentication-Results: gs-01.greensocs.com (amavisd-new); dkim=pass (1024-bit key) header.d=greensocs.com header.b=V/wfnJBO; dkim=pass (1024-bit key) header.d=greensocs.com header.b=V/wfnJBO Received: from greensocs.com ([127.0.0.1]) by localhost (gs-01.greensocs.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sVGN7o-fCghE; Sat, 1 Sep 2018 14:47:04 +0200 (CEST) Received: by greensocs.com (Postfix, from userid 998) id 506E1521AAD; Sat, 1 Sep 2018 14:47:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1535806024; bh=SxJ+P3Shu8JvHfqWoN5GPgmL2ptTLaABfMjruhHEDbM=; h=From:To:Cc:Subject:Date; b=V/wfnJBOPGsWvj9qo7s+eA/0mCV//YLTVRN0yKPKCfcNVHxtN3NiatofrarSwEsBS ucRaBZC8MZ7x9KHfJH0ts2aRc11GHP/QU18Z2KQeewbco2CtVCdfg3oK0l6XDAb1YA kNxoXV4gYSpgyYHxjWymd481FM+g4AXB8XiT9IlM= Received: from michell-laptop.home.lmichel.fr (LFbn-LYO-1-488-36.w2-7.abo.wanadoo.fr [2.7.77.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: luc.michel@greensocs.com) by greensocs.com (Postfix) with ESMTPSA id D2144521A9F; Sat, 1 Sep 2018 14:47:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=greensocs.com; s=mail; t=1535806024; bh=SxJ+P3Shu8JvHfqWoN5GPgmL2ptTLaABfMjruhHEDbM=; h=From:To:Cc:Subject:Date; b=V/wfnJBOPGsWvj9qo7s+eA/0mCV//YLTVRN0yKPKCfcNVHxtN3NiatofrarSwEsBS ucRaBZC8MZ7x9KHfJH0ts2aRc11GHP/QU18Z2KQeewbco2CtVCdfg3oK0l6XDAb1YA kNxoXV4gYSpgyYHxjWymd481FM+g4AXB8XiT9IlM= From: Luc Michel To: qemu-devel@nongnu.org Date: Sat, 1 Sep 2018 14:46:24 +0200 Message-Id: <20180901124639.19735-1-luc.michel@greensocs.com> X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 193.104.36.180 Subject: [Qemu-devel] [PATCH 00/15] gdbstub: support for the multiprocess extension X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , alistair@alistair23.me, mark.burton@greensocs.com, saipava@xilinx.com, edgari@xilinx.com, qemu-arm@nongnu.org, Luc Michel Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This series adds support for the multiprocess extension of the GDB remote protocol in the QEMU GDB stub. This extension is useful to split QEMU emulated CPUs in different processes from the point of view of the GDB client. It adds the possibility to debug different kind of processors (e.g. an AArch64 and an ARMv7 CPU) at the same time (it is not possible otherwise since GDB expects an SMP view at the thread granularity. CPUs are grouped using specially named QOM containers. CPUs that are children of such a container are grouped under the same GDB process. The last patch groups the CPUs of different model in the zynqmp machines into separate processes. To test this patchset, you can use the following commands: (Note that this requires a recent enough GDB, I think GDB 7.2 is OK. Also, it must be compiled to support both ARM and AArch64 architectures) Run QEMU: (-smp 6 in xlnx-zcu102 enables both cortex-a53 and cortex-r5 CPUs) qemu-system-aarch64 -M xlnx-zcu102 -gdb tcp::1234 -S -smp 6 Run the following commands 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 to '?' packets gdbstub: add multiprocess support to 'H' and 'T' packets gdbstub: add multiprocess support to vCont packets gdbstub: add multiprocess support to 'sC' packets gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo gdbstub: add multiprocess support to Xfer:features:read: gdbstub: add multiprocess support to gdb_vm_state_change() gdbstub: add multiprocess support to 'D' packets gdbstub: add support for extended mode packet gdbstub: add support for vAttach packets gdbstub: processes initialization on new peer connection gdbstub: gdb_set_stop_cpu: ignore request when process is not attached gdbstub: add multiprocess extension support arm/xlnx-zynqmp: put APUs and RPUs in separate GDB groups include/exec/gdbstub.h | 8 + gdbstub.c | 584 +++++++++++++++++++++++++++++++++++------ hw/arm/xlnx-zynqmp.c | 7 +- 3 files changed, 521 insertions(+), 78 deletions(-)