From patchwork Tue Mar 5 12:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 777980 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c8:0:b0:33e:474f:8c56 with SMTP id p8csp396735wrs; Tue, 5 Mar 2024 04:11:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUg+WgKypnED93EFeLvjQUIoK6v6CSAMuPGzA4uG1kO7AVWSnk69F05/SJadnE3h2HG+l0DwwMEzeQ+hcO2XJTz X-Google-Smtp-Source: AGHT+IEEb1uKiQrZKqZ0C4eoH60Zk+4m9lD0D/Tv84HP9jtzlWe6Eeq7BTWazG5AIf/pBZSRZ46G X-Received: by 2002:a81:4ad4:0:b0:608:7f87:fceb with SMTP id x203-20020a814ad4000000b006087f87fcebmr11449032ywa.38.1709640667450; Tue, 05 Mar 2024 04:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709640667; cv=none; d=google.com; s=arc-20160816; b=mwDB6tZTiu9doPBRVKgTQMJ6KSS3U01Fgs9OMvunnfC4j8EgLGHpwISIBE/nW6H0eB 3A8jyUu/IAZ9b7bAZQ6Xmf2DHJQFIDfdXIaOaNIBcYQYbov+8udM/Ir6cVQ7lDfRwDwV UVuWtXoNwzikQ7qQJAEeT2yMerclx3tTMy6Gl1oLgse/7mWh6cf1WSiNeNZhszDlVzyg YR2gI33/h6JVpTTetpehxIkIewlRm3wR8gP/ufBd1XfKc17+LlXRI5B3X3RSGg0yBrQw 8S2Y3BrHZnnBcdhNmDZ7pvj1AdqkC045t22hRXrxPA00d+zEjjLov3l4K5S1IpV16mPk D8Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=YBobDIzjq+FEEKLq7A1VHLIqtIHgR7MyyrYSn6xZbDo=; fh=f6avZL29XgA8xpJjruaeiY/t2FUw83MgiNvVXs1rDYg=; b=I9GbZZeErBGUzb2+fVOsa/ht7XS/B5Sj/e3PzMot8K98w7gs2f9oT7gC1253A3cnIU N3k3148uthLT/o4zeacurar2M6Cz8GjLqQzdDEu5HIL64xVWUKVejAZctJmnmzt2RzP4 YHCnbZcuyzqM469FYTgIw1ClL+icV+D9mUerpu2im2zQ1x5zQ/JV0z8kyn6f7o/kGpie BggmWFSoSvmQXyHnPM/Uy7zlT7GOfMOf2SOydXKvZER1Hm5TEvB6HBJRfpiTD+Oyp/TG 5i0d+5J1LaYdEN0ky7z3v5kALA6D/hL4zUxDIMmJP73SpguPEILIjcetziC08QeJwMzC ZYIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="w7zRn/D9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b4-20020ac87544000000b0042e49a73daesi10847546qtr.385.2024.03.05.04.11.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2024 04:11:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="w7zRn/D9"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhTce-0001VK-Lv; Tue, 05 Mar 2024 07:10:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhTca-0001Qn-3W for qemu-devel@nongnu.org; Tue, 05 Mar 2024 07:10:12 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhTcW-0001BO-LX for qemu-devel@nongnu.org; Tue, 05 Mar 2024 07:10:11 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-412e6bdd454so12020195e9.1 for ; Tue, 05 Mar 2024 04:10:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709640606; x=1710245406; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YBobDIzjq+FEEKLq7A1VHLIqtIHgR7MyyrYSn6xZbDo=; b=w7zRn/D9rx9AhfpAYQoTFcXTC8jmvkZXoNXRADP7YHVxaxHpLhiLM86INNNiRXZ6gd Q2rLkbHEUhOwkMDF+uH8RKjdFQFInUTd364olch/V/DTHFyDsBCIEuauYo94pDOn9dF3 zOhCAwfChlaHPvVh6ThqOdT4d951Hy35NpC/qVKf5FeKNPbsE0OBBLU2cVllVr0DiJgB 8ASTqh24neco4OxkY/XQ32nmRlwmkyazdHEvQ0ve8XEhmswWEQnI/1RkPqD3Fav6PUe5 NsWc+MAjRKJoOg4uPxCulqY8qSq8LC34COxDe4HnFXc1/ZXKBF3/VRmsWSsxJe70UsNd Daxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709640606; x=1710245406; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YBobDIzjq+FEEKLq7A1VHLIqtIHgR7MyyrYSn6xZbDo=; b=abKAfJ/DWJnQ3omzLOiZRdm53IWwT9vN4IXOd+rmUjJfqt51sStVf53Jngn1HxkLF5 9/vzbJnShOmpkbH9oXTmjQLVfrEyHqA5WYZfQ5CUhVtaaa8JEFxVdd4WOUlrrqklEfsR UU/EqcpmkbZqLVOXzE2yZ+fRIU33aG0KUMfnqQWTC1i8T0uAAZLHSfVxzrENWmNwPbaH /4fQ0ut8Cu4plTg8z5Ny7mLzigCDGu99qNr0EAkNvyppfypTKllmXgBR0lVsXDRvIGkc ew6n/+Y/45KwEogaOk1jrnCzHCQiMk2gOBwgqXCY1tsY2V644LfgJbQ/ESTcmTXswwOC xDDQ== X-Gm-Message-State: AOJu0YzJUQ+DCLq+g7yKR8PGmXsA9Hqm03+6YqqLwn1tSQpmm+YX6EVA muxonOv2d7wpKv+KvUkgfyrsW/hmMKWbIEJDrn+FzIV6BwU5yycahsv7NRML/2A= X-Received: by 2002:a05:600c:46ce:b0:412:6c5f:d971 with SMTP id q14-20020a05600c46ce00b004126c5fd971mr9104153wmo.11.1709640606285; Tue, 05 Mar 2024 04:10:06 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h9-20020a05600c350900b00412de55135dsm7789729wmq.41.2024.03.05.04.10.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 04:10:05 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6AB685F7B5; Tue, 5 Mar 2024 12:10:05 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Alistair Francis , Nicholas Piggin , Liu Zhiwei , Richard Henderson , Yanan Wang , qemu-s390x@nongnu.org, "Edgar E. Iglesias" , Eduardo Habkost , Daniel Henrique Barboza , Michael Rolnik , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Yoshinori Sato , Laurent Vivier , Thomas Huth , Peter Maydell , Mahmoud Mandour , Brad Smith , Alistair Francis , Brian Cain , Cleber Rosa , John Snow , Marcel Apfelbaum , Pierrick Bouvier , Palmer Dabbelt , Riku Voipio , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Weiwei Li , Bin Meng , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Beraldo Leal , Kyle Evans , David Hildenbrand , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Alexandre Iooss , Warner Losh , qemu-riscv@nongnu.org, Ilya Leoshkevich Subject: [PATCH 00/29] maintainer/next for 9.0 (testing, gdbstub, plugins, disas) Date: Tue, 5 Mar 2024 12:09:36 +0000 Message-Id: <20240305121005.3528075-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org As I'm going to be away for most of the tree stabilisation period I'm trying to be proactive clearing my maintainer backlog before the softfreeze. With that in mind heres what is ready to go in: Testing Most stuff is being directly applied as downstreams stop working (c.f. BSD and MacOS breakage). So all I have left is a fix for qos-tests that shows up when LTO is enabled. GDBStub These are Ilya's fork follow mode patches for gdbstub. I hope to include Gustavo's signal handling stuff if it is fixed this week. Plugins This introduces Pierrick's work to have thread-safe inline counters via the concept of a vcpu indexed scoreboard. There will be further work over the next cycle to enable more efficient instrumentation and address more of the missing pieces people have been asking for. Finally there are a few cosmetic patches to ensure the disassembly that plugins get don't include opcodes which plugins can get another way. They are the only patches that need review: target/riscv: honour show_opcodes when disassembling target/loongarch: honour show_opcodes when disassembling disas/hppa: honour show_opcodes disas: introduce show_opcodes Hopefully I can get the PR for this rolled later this week. Alex. Alex Bennée (5): tests: bump QOS_PATH_MAX_ELEMENT_SIZE again disas: introduce show_opcodes disas/hppa: honour show_opcodes target/loongarch: honour show_opcodes when disassembling target/riscv: honour show_opcodes when disassembling Ilya Leoshkevich (12): gdbstub: Support disablement in a multi-threaded process {linux,bsd}-user: Introduce get_task_state() {linux,bsd}-user: Update ts_tid after fork() gdbstub: Introduce gdbserver_fork_start() {linux,bsd}-user: Pass pid to fork_end() {linux,bsd}-user: Pass pid to gdbserver_fork() gdbstub: Call gdbserver_fork() both in parent and in child gdbstub: Introduce gdb_handle_query_supported_user() gdbstub: Introduce gdb_handle_set_thread_user() gdbstub: Introduce gdb_handle_detach_user() gdbstub: Implement follow-fork-mode child tests/tcg: Add two follow-fork-mode tests Pierrick Bouvier (12): plugins: scoreboard API plugins: define qemu_plugin_u64 plugins: implement inline operation relative to cpu_index plugins: add inline operation per vcpu tests/plugin: add test plugin for inline operations tests/plugin/mem: migrate to new per_vcpu API tests/plugin/insn: migrate to new per_vcpu API tests/plugin/bb: migrate to new per_vcpu API contrib/plugins/hotblocks: migrate to new per_vcpu API contrib/plugins/howvec: migrate to new per_vcpu API plugins: remove non per_vcpu inline operation from API plugins: cleanup codepath for previous inline operation bsd-user/bsd-file.h | 2 +- bsd-user/freebsd/os-proc.h | 6 +- bsd-user/qemu.h | 7 +- gdbstub/internals.h | 3 + include/disas/dis-asm.h | 8 + include/gdbstub/user.h | 10 +- include/qemu/plugin.h | 7 + include/qemu/qemu-plugin.h | 142 +++++++--- include/user/safe-syscall.h | 2 +- linux-user/m68k/target_cpu.h | 2 +- linux-user/qemu.h | 5 + linux-user/signal-common.h | 2 +- linux-user/user-internals.h | 2 +- plugins/plugin.h | 17 +- tests/qtest/libqos/qgraph.h | 2 +- accel/tcg/plugin-gen.c | 69 ++++- bsd-user/main.c | 9 +- bsd-user/signal.c | 20 +- contrib/plugins/hotblocks.c | 50 ++-- contrib/plugins/howvec.c | 53 ++-- disas/disas.c | 1 + disas/hppa.c | 8 +- disas/riscv.c | 28 +- gdbstub/gdbstub.c | 29 ++- gdbstub/user-target.c | 4 +- gdbstub/user.c | 244 +++++++++++++++++- linux-user/aarch64/cpu_loop.c | 2 +- linux-user/arm/cpu_loop.c | 4 +- linux-user/arm/signal.c | 2 +- linux-user/cris/cpu_loop.c | 2 +- linux-user/elfload.c | 2 +- linux-user/hppa/signal.c | 2 +- linux-user/linuxload.c | 2 +- linux-user/m68k/cpu_loop.c | 2 +- linux-user/main.c | 8 +- linux-user/mips/cpu_loop.c | 2 +- linux-user/ppc/signal.c | 4 +- linux-user/riscv/cpu_loop.c | 2 +- linux-user/signal.c | 30 +-- linux-user/syscall.c | 32 +-- linux-user/vm86.c | 18 +- linux-user/xtensa/signal.c | 2 +- plugins/api.c | 100 +++++-- plugins/core.c | 79 +++++- semihosting/arm-compat-semi.c | 8 +- target/loongarch/disas.c | 13 +- tests/plugin/bb.c | 63 ++--- tests/plugin/inline.c | 186 +++++++++++++ tests/plugin/insn.c | 106 ++++---- tests/plugin/mem.c | 46 ++-- tests/tcg/multiarch/follow-fork-mode.c | 56 ++++ plugins/qemu-plugins.symbols | 13 +- tests/plugin/meson.build | 2 +- tests/tcg/Makefile.target | 2 +- tests/tcg/multiarch/Makefile.target | 17 +- .../gdbstub/follow-fork-mode-child.py | 40 +++ .../gdbstub/follow-fork-mode-parent.py | 16 ++ 57 files changed, 1257 insertions(+), 338 deletions(-) create mode 100644 tests/plugin/inline.c create mode 100644 tests/tcg/multiarch/follow-fork-mode.c create mode 100644 tests/tcg/multiarch/gdbstub/follow-fork-mode-child.py create mode 100644 tests/tcg/multiarch/gdbstub/follow-fork-mode-parent.py