From patchwork Fri Jun 30 18:03:45 2023 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: 697956 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp592889wrs; Fri, 30 Jun 2023 11:06:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlFyaNZqTXEYQMI/BOVa/diS8EZh68ZmROjnv8BYw9xYG1tIR/1x/AkCatolryOG2pL2Ti08 X-Received: by 2002:a05:6214:2a8d:b0:626:29d4:9a26 with SMTP id jr13-20020a0562142a8d00b0062629d49a26mr4304852qvb.37.1688148372195; Fri, 30 Jun 2023 11:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688148372; cv=none; d=google.com; s=arc-20160816; b=wNw/tyqu8/wWb9d4E6WnnmjXlR5n/d9k6e8tEQCGPX4Jf4ON/QCb99+Dq98IQVLuRP WVaQ/qVddD614Q/waB+YuRihBW0gG68KwPaQon41qM+HLRDkIpqtRY3L0QIkL1f6YQdS a9Ezo8V3fIuZfgb08qVidzqsKwV92htQ4whYo+mjQZhbtK0yNwSMy154E5cqGzrfFL6D ovJZLz0OOpppY6y1iwoAZC5XFvszxEkwGQdjB453cfNjNGYAkhAZg+Y3gTbHiPosHxpk +6i8izGaudDec/lCs13iDGXXWVFLiHjeX1gk2bYwRqmVlcjfcR1Hr+jxyStHhMPSgDzX TX3g== 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=aBPScP0mIzMWQ7fd9510xs14QCsFRMJzHG0H+opFS7k=; fh=OltHerz+Vf7zZkebZbScoRT4WgVwJDskRS7DoEjx2Hw=; b=GDZE/VRHHgmiEPtSGPupUT9Bs8OZWpkJYBhjWcJwcuPrUOl/fGc+KbZY4l/N6OpRkB 2pQJYaAtNnuR1+790Ttu1TZNinOfaLO2UwNuI8sl2alb/eqgxLT50tFDt6hP8t+VpRGb WunUkqkC7YBRT1/d3r889Uagros4y+soqhLnHKzlpIUsRaqlLAA0VUv/9mLryP85w4ko YUuKcruPirZ3YT41M5kJNFhjmA36o6bVqvZB5XweLZQf5+oVki9tQ538rk1BQ6nR3Out vsrndgjlCFGEUDqSanA3bAMaq1qPf82e+7evDNb1SLaUr8dQkCvGrvgNZTpQNE+OhXwH 9IdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qEcJq6RH; 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 x8-20020a0ceb88000000b00636382a1d54si2321538qvo.131.2023.06.30.11.06.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Jun 2023 11:06:12 -0700 (PDT) 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=qEcJq6RH; 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 1qFITu-0008GN-4W; Fri, 30 Jun 2023 14:04:30 -0400 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 1qFITt-0008Fy-2G for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:04:29 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFITq-0006xn-V7 for qemu-devel@nongnu.org; Fri, 30 Jun 2023 14:04:28 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3142860734aso236598f8f.1 for ; Fri, 30 Jun 2023 11:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688148265; x=1690740265; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aBPScP0mIzMWQ7fd9510xs14QCsFRMJzHG0H+opFS7k=; b=qEcJq6RHmBX3G7y15WPeLaNYU67zmcn44+WlswMNJY1Nk/JpdOPprvn/XAsZGs6oZ0 N8QKEP6ocBTSSVs+z4Uvw9kxmEZ0l+aAhQuC+n0j+LGbPsjozHkbwuJPG2OwjMA+dsod wdR5Py1zNtZJGxFAFxaTpz7MIeOTrwwIu7hxCPYofRrSn5vYu1Ju2Ghc4Jvf5CxVqRxk 8wHs8oDth9alX+h7rl/i7zn9Uup2C9R5pu/xSfT26t4H5MIRlu6qmp3Hv0GCZ+eApatC Uu8xo17j/UKYc9hW0q4sbh+e/YCBac9Uqk/O1QbTmRn82nTGU3a2Wfz0S8PBOFS4Z8zg fwvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688148265; x=1690740265; 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=aBPScP0mIzMWQ7fd9510xs14QCsFRMJzHG0H+opFS7k=; b=M3mnPt0xwxW/swX6ddaMtG4PEuD/jzPTBGFfLtG/KWXByANQjv4lqWccdpyQ5hNSzY 0UR7y0naZGcIOycAnQTq0t8A4j+eLxoUKVxCLdRnj/RUiEzkY+4wR2aAqWx+t8CftUBo gyCl6cAdYX+pUPplq8sMXFLLp1bsVUf+m62T+KbHlkdHgKUzsbukP9GIbDSUd7w3goJt wk79KEmm20Y4dVCDHtjstMxzdNFrqIBHStRDyIuH7odUAqYYGkeg3/0arCks1cfh8nB3 iC8u76TqvjPobpLuXQ/aoqHuxTOAf2g/0/8sd4lycJg+Uudzi2vQBqFsgfUMOYxHQcQL +6ZA== X-Gm-Message-State: ABy/qLaTT0WDXTCmQPAdodRiWoGY1+/UckSgovHWrPpePuchm//upfzC ypeE2G3pGMEhd+2/36A2tjL91Q== X-Received: by 2002:adf:cc90:0:b0:306:3352:5b8c with SMTP id p16-20020adfcc90000000b0030633525b8cmr3531873wrj.7.1688148264699; Fri, 30 Jun 2023 11:04:24 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d10-20020adfe2ca000000b0031272fced4dsm18937313wrj.52.2023.06.30.11.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 11:04:24 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E0F7E1FFBB; Fri, 30 Jun 2023 19:04:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Stefan Hajnoczi , Leonardo Bras , Laurent Vivier , Peter Xu , Juan Quintela , Beraldo Leal , Radoslaw Biernacki , Qiuhao Li , Peter Maydell , Yanan Wang , Riku Voipio , Wainer dos Santos Moschetta , Mahmoud Mandour , Alexandre Iooss , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Eduardo Habkost , Thomas Huth , Laurent Vivier , Bin Meng , Marcel Apfelbaum , Bandan Das , Cleber Rosa , Richard Henderson , Leif Lindholm , Marcin Juszkiewicz , qemu-arm@nongnu.org, Darren Kenny , Alexander Bulekov Subject: [PATCH v4 00/38] maintainer omnibus: testing, fuzz, plugins, documentation, gdbstub (pre-PR) Date: Fri, 30 Jun 2023 19:03:45 +0100 Message-Id: <20230630180423.558337-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::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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=ham 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 softfreeze is fast approaching I thought it would be work combining my various trees into an omnibus series to ease the review and merging. The testing updates exposed a number of latent leaks that confused the oss-fuzz jobs (hence the test-fuzz addition to help debug that). This also includes some minor plugin updates and finally some documentation updates that clean-up and expose the QOM and QDEV APIs which are so core to emulating anything in QEMU. I was intending to roll the PR from the last post but as there is still un-reviewed stuff and some changes I'd missed from previous reviews so I though it was worth one last posting. I'll roll on Monday. v2 - applied a bunch of review tags - added missing doc suggestions from Paolo - tweaked the plugin fix for CI v3 - few more tags - checkpatch cleanups - rolled in gdbstub/next v4 - added #ifdef CONFIG_TCG to the arm_casq_ptw - fixed plugin memory instrumentation with new helper for mmu access - added Thomas' test_arm_bpim2u_gmac tweak - moved pkgs from riscv64-cross patch to earlier qemu-minimal patch The following are still missing review: - gdbstub: lightly refactor connection to avoid snprintf - tests/docker: convert riscv64-cross to lcitool - tests/lcitool: introduce qemu-minimal - tests/lcitool: add an explicit gcc-native package (1 acks, 1 sobs, 0 tbs) - tests/lcitool: update to latest version (1 acks, 1 sobs, 0 tbs) - tests/qtests: clean-up and fix leak in generic_fuzz Alex Bennée (22): gitlab: reduce testing scope of check-gcov tests/tcg: add mechanism to handle plugin arguments qemu-keymap: properly check return from xkb_keymap_mod_get_index scripts/oss-fuzz: add a suppression for keymap tests/qtests: clean-up and fix leak in generic_fuzz tests/docker: add test-fuzz Makefile: add lcitool-refresh to UNCHECKED_GOALS tests/lcitool: update to latest version tests/lcitool: add an explicit gcc-native package tests/lcitool: introduce qemu-minimal tests/docker: convert riscv64-cross to lcitool target/arm: make arm_casq_ptw CONFIG_TCG only plugins: force slow path when plugins instrument memory ops plugins: fix memory leak while parsing options plugins: update lockstep to use g_memdup2 docs/devel: add some front matter to the devel index include/migration: mark vmstate_register() as a legacy function include/hw/qdev-core: fixup kerneldoc annotations docs/devel: split qom-api reference into new file docs/devel: introduce some key concepts for QOM development gdbstub: lightly refactor connection to avoid snprintf gdbstub: clean-up vcont handling to avoid goto Ani Sinha (1): docs/devel: remind developers to run CI container pipeline when updating images Daniel P. Berrangé (2): gitlab: explicit set artifacts publishing criteria gitlab: ensure coverage job also publishes meson log Erik Skultety (1): tests/lcitool: Bump fedora container versions Ilya Leoshkevich (8): linux-user: Expose do_guest_openat() and do_guest_readlink() linux-user: Add "safe" parameter to do_guest_openat() linux-user: Emulate /proc/self/smaps gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process() gdbstub: Report the actual qemu-user pid gdbstub: Add support for info proc mappings docs: Document security implications of debugging tests/tcg: Add a test for info proc mappings Marcin Juszkiewicz (1): tests/avocado: update firmware to enable sbsa-ref/max Nicholas Piggin (1): gdbstub: Permit reverse step/break to provide stop response Philippe Mathieu-Daudé (1): docs/devel/qom.rst: Correct code style Thomas Huth (1): tests/avocado: Make the test_arm_bpim2u_gmac test more reliable MAINTAINERS | 1 + docs/devel/index-api.rst | 2 + docs/devel/index-process.rst | 2 + docs/devel/index-tcg.rst | 2 + docs/devel/index.rst | 24 +- docs/devel/qdev-api.rst | 7 + docs/devel/qom-api.rst | 9 + docs/devel/qom.rst | 65 +++- docs/devel/tcg.rst | 2 + docs/devel/testing.rst | 6 + docs/system/gdb.rst | 15 + Makefile | 2 +- gdbstub/internals.h | 7 + include/exec/cpu-all.h | 2 +- include/exec/exec-all.h | 23 ++ include/hw/core/cpu.h | 17 + include/hw/qdev-core.h | 368 ++++++++++++------ include/migration/vmstate.h | 10 +- linux-user/qemu.h | 3 + accel/tcg/cputlb.c | 41 +- accel/tcg/user-exec.c | 8 +- contrib/plugins/cache.c | 2 +- contrib/plugins/drcov.c | 2 +- contrib/plugins/execlog.c | 2 +- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c | 2 +- contrib/plugins/hwprofile.c | 2 +- contrib/plugins/lockstep.c | 4 +- gdbstub/gdbstub.c | 115 ++++-- gdbstub/softmmu.c | 19 +- gdbstub/user-target.c | 137 +++++++ linux-user/syscall.c | 128 ++++-- qemu-keymap.c | 24 +- target/arm/ptw.c | 18 +- target/arm/tcg/sve_helper.c | 4 - tests/plugin/bb.c | 2 +- tests/plugin/insn.c | 2 +- tests/plugin/mem.c | 2 +- tests/plugin/syscall.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 13 +- .gitlab-ci.d/buildtest-template.yml | 4 +- .gitlab-ci.d/buildtest.yml | 7 +- .gitlab-ci.d/crossbuild-template.yml | 1 + .gitlab-ci.d/crossbuilds.yml | 2 + .gitlab-ci.d/opensbi.yml | 1 + scripts/oss-fuzz/lsan_suppressions.txt | 3 + tests/avocado/boot_linux_console.py | 4 +- tests/avocado/machine_aarch64_sbsaref.py | 23 +- tests/docker/dockerfiles/alpine.docker | 4 +- .../dockerfiles/debian-amd64-cross.docker | 1 + .../dockerfiles/debian-arm64-cross.docker | 1 + .../dockerfiles/debian-armel-cross.docker | 1 + .../dockerfiles/debian-armhf-cross.docker | 1 + .../dockerfiles/debian-mips64el-cross.docker | 1 + .../dockerfiles/debian-mipsel-cross.docker | 1 + .../dockerfiles/debian-ppc64el-cross.docker | 1 + .../dockerfiles/debian-riscv64-cross.docker | 119 +++--- .../dockerfiles/debian-s390x-cross.docker | 1 + .../dockerfiles/fedora-win32-cross.docker | 5 +- .../dockerfiles/fedora-win64-cross.docker | 5 +- tests/docker/dockerfiles/fedora.docker | 4 +- tests/docker/test-fuzz | 28 ++ tests/lcitool/libvirt-ci | 2 +- tests/lcitool/projects/qemu-minimal.yml | 27 ++ tests/lcitool/projects/qemu.yml | 1 + tests/lcitool/refresh | 18 +- tests/tcg/Makefile.target | 8 +- tests/tcg/aarch64/Makefile.target | 8 + tests/tcg/multiarch/Makefile.target | 9 +- .../multiarch/gdbstub/test-proc-mappings.py | 65 ++++ 71 files changed, 1125 insertions(+), 331 deletions(-) create mode 100644 docs/devel/qdev-api.rst create mode 100644 docs/devel/qom-api.rst create mode 100755 tests/docker/test-fuzz create mode 100644 tests/lcitool/projects/qemu-minimal.yml create mode 100644 tests/tcg/multiarch/gdbstub/test-proc-mappings.py