From patchwork Mon Jun 26 21:59:01 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: 1800206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=M0AguOAn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhft56LTz20XS for ; Tue, 27 Jun 2023 08:03:02 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFA-0002WS-M9; Mon, 26 Jun 2023 17:59:32 -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 1qDuF9-0002W8-Ar for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:31 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF7-0004qi-IL for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:31 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fa8cd4a1f2so18767155e9.1 for ; Mon, 26 Jun 2023 14:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816768; x=1690408768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lp6KR88j71QtkzhoL0VNQhU+0wKLrKZSfG0XhX5V00g=; b=M0AguOAnuCNYR9k5ZIv+tDNkU/9uW/oRYm4nIcLYgiX7lR/JskEtYdCy4MQtMpc8EU jAeob/Aj+qa297NS96TGzjRyk7L76V3Vl81wbviqBXfTzMRodHmfh7M6FgX7KE0i+vf3 /iQrLgP4dU3Nz3LWwukjnMCguoZ4Bp09kWf7PPDk2s7xr0611QnetLHwm1DbCgpLVngC abHPYl0YsX+7sOxoBlg7oC0pgupZXpg+oRfiV1IQOAWmlTuqge2Q8tq6PUCzUHuRAcHp L9w3mk3nU8E5NOK6hTTqgRJr6qQBd4xr2gHgJvVGKtmoztKyOGw708k9q3BmjrpovKIM ePcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816768; x=1690408768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lp6KR88j71QtkzhoL0VNQhU+0wKLrKZSfG0XhX5V00g=; b=kUZqUsRRcziBO/hoR2e9OCjjBR2A9gj6jylnvdqfDPdkb5pJ2SfJp4kL7yQJ8y+cGS Nx1EnJiWr51E1yLCak4B41pUXMgIDGb7TYq2k8pyVcOKMcdfl7kXFXLcl4naTAbksgCI SAIpDNJZVUK/ZZE7+DjBwUDpMhWLi08AO2vRhN1QSgBP1Z1Ao2mtlRLdQo+iuFMJuiQ7 uypF5eBkgC4mluAbYbH4OOEyg67iVWuNO6ambt5/Pa9qxlLrZ1ebIDATULhnJa3TZQZh Zf2NPemh3PF0m6e8KgXbeUJyJlp/WjLgssCjYeQg2uToPQIcEEfaDT3ug+yRaB262DX8 oQiA== X-Gm-Message-State: AC+VfDybLOL6i5VhL9RP6vtHwC36RBi3CCiUS48HIlSmWOG7/pbfT+0C i+aDLIv+k0WMecQap1W1NixTaA== X-Google-Smtp-Source: ACHHUZ5SLmFoAiwCGCbxAFT13p0wX/mGQtlmb0EN5BDyFmIqcGm9pk1vTwHZAlQEGDWyvWqXgHZANA== X-Received: by 2002:a05:600c:285:b0:3f9:d7ff:24cc with SMTP id 5-20020a05600c028500b003f9d7ff24ccmr9574114wmk.34.1687816768081; Mon, 26 Jun 2023 14:59:28 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s6-20020a5d4ec6000000b0030ae849c70csm8468891wrv.37.2023.06.26.14.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0979A1FFBC; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 01/26] gitlab: explicit set artifacts publishing criteria Date: Mon, 26 Jun 2023 22:59:01 +0100 Message-Id: <20230626215926.2522656-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Daniel P. Berrangé If not set explicitly, gitlab assumes 'when: on_success" as the publishing criteria for artifacts. This is reasonable if the artifact is an output deliverable of the job. This is useless if the artifact is a log file to be used for debugging job failures. This change makes the desired criteria explicit for every job that publishes artifacts. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20230623122100.1640995-2-alex.bennee@linaro.org> Message-Id: <20230503145535.91325-2-berrange@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest-template.yml | 4 +++- .gitlab-ci.d/buildtest.yml | 2 ++ .gitlab-ci.d/crossbuild-template.yml | 1 + .gitlab-ci.d/crossbuilds.yml | 2 ++ .gitlab-ci.d/opensbi.yml | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index 5da61f4277..f3e39b7eb1 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -25,6 +25,7 @@ # rebuilding all the object files we skip in the artifacts .native_build_artifact_template: artifacts: + when: on_success expire_in: 2 days paths: - build @@ -53,6 +54,7 @@ extends: .common_test_job_template artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + when: always expire_in: 7 days paths: - build/meson-logs/testlog.txt @@ -68,7 +70,7 @@ policy: pull-push artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - when: on_failure + when: always expire_in: 7 days paths: - build/tests/results/latest/results.xml diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index aa833b62ca..24bba061cd 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -462,6 +462,7 @@ gcov: coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} + when: on_success expire_in: 2 days reports: coverage_report: @@ -587,6 +588,7 @@ pages: - make -C build install DESTDIR=$(pwd)/temp-install - mv temp-install/usr/local/share/doc/qemu/* public/ artifacts: + when: on_success paths: - public variables: diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml index 6efb0d2a54..d97611053b 100644 --- a/.gitlab-ci.d/crossbuild-template.yml +++ b/.gitlab-ci.d/crossbuild-template.yml @@ -55,6 +55,7 @@ .cross_test_artifacts: artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + when: always expire_in: 7 days paths: - build/meson-logs/testlog.txt diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index 1e0e6c7f2c..34f9df2be9 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -169,6 +169,7 @@ cross-win32-system: CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu microblazeel-softmmu mips64el-softmmu nios2-softmmu artifacts: + when: on_success paths: - build/qemu-setup*.exe @@ -184,6 +185,7 @@ cross-win64-system: or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu tricore-softmmu xtensaeb-softmmu artifacts: + when: on_success paths: - build/qemu-setup*.exe diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml index b4d7eef688..fd293e6c31 100644 --- a/.gitlab-ci.d/opensbi.yml +++ b/.gitlab-ci.d/opensbi.yml @@ -63,6 +63,7 @@ build-opensbi: stage: build needs: ['docker-opensbi'] artifacts: + when: on_success paths: # 'artifacts.zip' will contains the following files: - pc-bios/opensbi-riscv32-generic-fw_dynamic.bin - pc-bios/opensbi-riscv64-generic-fw_dynamic.bin From patchwork Mon Jun 26 21:59:02 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: 1800195 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=YatEhAGC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhbf5gxYz20XS for ; Tue, 27 Jun 2023 08:00:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFC-0002Xx-CT; Mon, 26 Jun 2023 17:59:34 -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 1qDuFA-0002WY-RJ for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:32 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF7-0004qm-OX for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:32 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3113da5260dso3363902f8f.2 for ; Mon, 26 Jun 2023 14:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816768; x=1690408768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PkkwaC5weGbOgI6TyHV8oGFM7+1AeUMfWTRfSlmxtvc=; b=YatEhAGCFS5kiViO/SgcsBub5URXcJBqa2V5V1JzJ9O1cL5qnLBXVdLZHm/y8rmiUE a25eDdZIN/9PPGI0l5PvsN6zB3MsTib3ps050YZWEPupZub0kGs/zDYJlIjVv1Hyrt08 nQc1tBwarSyIE+r3L7OC1kWGJmTh3qvbKm+shjoVH8Sk9h/8b8DMn7xe3TTHz96nuDhh G27myftfiyWKeFl0weBybt3vyTFm7y4vD1rKWFmUBJCUbDF5zzRJw57ZJmTQfgFcXGCd JMOma+2baTkYnmBXCS3lbAaBiaFpPkiiVYQk2XJJElm3OY3oPn5kv/GxjG5OV6siQpsD Hubw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816768; x=1690408768; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PkkwaC5weGbOgI6TyHV8oGFM7+1AeUMfWTRfSlmxtvc=; b=A0Jt3YvJNpXBsCOUjfHMndSQCOKUs9Wsv/hu7hsab2BBKIxLr1MeyYT85U9ot8ZBB1 t7NZs2MYxwdsNq5fOWCO735wpbbm4JTsQIFMzG5RZKsfSRyosICqtPyZOh4WpEdW9lH9 x7u57CtDl5qSFi5PLrAItJSdDWbvccu1NBmwK3V8cmuLemhZB3jj0U34YzPnOI6wIKCM VbMnIRsrsOlIgmAVPwHfv3OF5mtDwRegaXV9vfy49YlGoE3AYYnG4BGiuObrg73k3Hz/ Gv6FPzkIlDVvTcUcntA5m/804pxr3cJH34SNNcbEIOAs5iz256lBAgj2llxczkx+w61s /v9A== X-Gm-Message-State: AC+VfDzn1C1JwNvE5+iP48mgmYJcavp/T5S8YSyDGAJ8ti6oTwG6V5WA bsL+YO2wsokl2YhshlgBP2/0eQ== X-Google-Smtp-Source: ACHHUZ5giL1J3+bLCUU/15aArWw+QyzAOgZhoSrSUiXmYLuf40BdiTxDdJ7P2TvPqLJk1yZBwbrroQ== X-Received: by 2002:adf:f60c:0:b0:313:edaa:2508 with SMTP id t12-20020adff60c000000b00313edaa2508mr3727181wrp.18.1687816768341; Mon, 26 Jun 2023 14:59:28 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s11-20020a5d69cb000000b00313f07ccca4sm4321718wrw.117.2023.06.26.14.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 228CE1FFBD; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 02/26] gitlab: ensure coverage job also publishes meson log Date: Mon, 26 Jun 2023 22:59:02 +0100 Message-Id: <20230626215926.2522656-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Daniel P. Berrangé The coverage job wants to publish a coverage report on success, but the tests might fail and in that case we need the meson logs for debugging. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id: <20230623122100.1640995-3-alex.bennee@linaro.org> Message-Id: <20230503145535.91325-3-berrange@redhat.com> Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 24bba061cd..a8fd9a0c1f 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -462,9 +462,12 @@ gcov: coverage: /^\s*lines:\s*\d+.\d+\%/ artifacts: name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} - when: on_success + when: always expire_in: 2 days + paths: + - build/meson-logs/testlog.txt reports: + junit: build/meson-logs/testlog.junit.xml coverage_report: coverage_format: cobertura path: build/coverage.xml From patchwork Mon Jun 26 21:59:03 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: 1800203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=A+Mfv9E4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhd63qBjz20XS for ; Tue, 27 Jun 2023 08:01:30 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFD-0002ZH-NR; Mon, 26 Jun 2023 17:59:35 -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 1qDuFC-0002Xt-1t for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:34 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF8-0004r6-Ib for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:33 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso8165485e9.0 for ; Mon, 26 Jun 2023 14:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816769; x=1690408769; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VTHkiiEsGJjQzyOMxbcLNdH7rkjQKhZ4rW+u2UfYIYE=; b=A+Mfv9E4rUR1HCI7ba2cUzk7VUKCYbIWzmM+xo41K+TzesAzamKSzB9bZX1rNSDixh S5g2vycEzctJiZW5nmksQZTY9eBLAbxeXWiqaMVtjFioasIv/KP+AGdDF2u2vUZn3psB Q6gwYgJMwTRzbl1DDLIfzqkEJ9im5PUSwkhZ/hCuCVpqvv+SGE/2p6gsc+v8gYomz3mx hkOGorZHVOHs/vF1C+OtSKBUW6gC1EpU3KrCgoCiXkdngbs68VjciPp3hvvNb0VKPe2E Py4EufdzHj5T+9ImpgcFrRhzRGavRzm6/H5Nlev35Uc1sUP4cJBiFwdFQ+OeVxO/elvC P+aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816769; x=1690408769; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VTHkiiEsGJjQzyOMxbcLNdH7rkjQKhZ4rW+u2UfYIYE=; b=L3OX2mJ3/vdXkgRUU8+Rg4dgeY9WN5Ndm7YNlAH10/UY5K804+1TO9NwNABNl6G8db Tfbo9U6PvKrWIms+nCTee+JwwS8pMiHVvUkcIkg28kQl9JFyehEU0eQ0dPKTTTc4AIQ8 ssFfN+TgYFU6T7HxjbRceic7AnyeykHneGVPQMP5GUuiT7Ctrs1AqoNxOXApUpUeTnVX 7ZwPzRDQT0fU0duQkaJBPeq5u8Hoj5BjIAHOi9wiQOdlKoqHeIot7kimGdGpIc876MQK CGKEQine5mHemuoc6kxMy8roV4PLZx9XSY/mukpnT+R00vVWvSX2oqCKWbD/PLT89kAE t5/Q== X-Gm-Message-State: AC+VfDwWWPfgtITKZbE5o0jB91VfxiYfaVRVSPyw5M8rLDMldIIC1Gtr pdWyZag/xYiToPOZf2wdrqjBhw== X-Google-Smtp-Source: ACHHUZ4f7DsAVNL1p/Gd5UN5mKmETs3rmK+Hg+2obZlKKtefCDZeOBaorrS9pDR3OI6KNSOeGBDe2g== X-Received: by 2002:a1c:e90d:0:b0:3f8:fc2a:c7eb with SMTP id q13-20020a1ce90d000000b003f8fc2ac7ebmr21467501wmc.5.1687816769143; Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id e15-20020adfe7cf000000b0030aed4223e0sm8419202wrn.105.2023.06.26.14.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3A4331FFBE; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 03/26] gitlab: reduce testing scope of check-gcov Date: Mon, 26 Jun 2023 22:59:03 +0100 Message-Id: <20230626215926.2522656-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This keeps timing out on gitlab due to some qtests taking a long time. As this is just ensuring the gcov machinery is working and not attempting to be comprehensive lets skip qtest in this run. Message-Id: <20230623122100.1640995-4-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index a8fd9a0c1f..77dc83a6be 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -454,7 +454,7 @@ gcov: IMAGE: ubuntu2204 CONFIGURE_ARGS: --enable-gcov TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu - MAKE_CHECK_ARGS: check + MAKE_CHECK_ARGS: check-unit check-softfloat after_script: - cd build - gcovr --xml-pretty --exclude-unreachable-branches --print-summary From patchwork Mon Jun 26 21:59:04 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: 1800205 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y0nLxk0s; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhdc0RB5z20XS for ; Tue, 27 Jun 2023 08:01:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFE-0002Zv-Ht; Mon, 26 Jun 2023 17:59:36 -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 1qDuFC-0002Y3-Bj for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:34 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF8-0004rK-KX for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:33 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f9b4bf99c2so48989645e9.3 for ; Mon, 26 Jun 2023 14:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816769; x=1690408769; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hn+zKX2ZU5kJ7IFfmWrHts4Msqz+nCT2HShGHhdqu5E=; b=y0nLxk0snNorSI6hy8O4jEf4FlNP7Ts438y4J+viEJoWCViSPRThDFMM32uK6Uv6oG 1QihAK670HLzSpKYFRUpBYxoTPtO0bxLMBd/uLJrrtyxwR4bwVY1vHus0NPLqj4RW68C 6HTd/z7SdnpmET2QdZqAxFOZx0Ot7WHbyO2XyfDA9XS/Or6lR+q4iCuMKoRhyhsmG+j9 VlJ6aFL8/hF5+eOziiOE9wKM35jhHEtruawMbNWgcX15k969fy/wuaToFw8D+bSPZKH9 4yPIJb0FqilAzJGajygIdemNS8gUXZmB1Y+SkW1XBEskB6M+5f/8PYZdgrRzKMFn6BoY FO4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816769; x=1690408769; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hn+zKX2ZU5kJ7IFfmWrHts4Msqz+nCT2HShGHhdqu5E=; b=SM4GGPIch7Ex5iUAHxFHmgrsrxxXEljBCNvm5C5VyYAnE1quUu8h6MvfKQgX0HwaP+ iJK2YZ3+n2Is2OJPxBAE1SWyqOTmUj1EwiSZKIFvaFN3zaTPNUWbgVZD1kZSf8qj7WXK Bf20qnYEVMKMU+oiFRzm7zhxLtOdfB8Khaqu0+39WiSa1KuiPoBa2HFFC5B5wXzilS0W 7zoCvfZsYbTD3jowUdmB8YYrLouwu8J3aNBjPmg8wXWW87ahIqSHDqekVkvoJ+jTwAB9 upw/ULK4/jg/pHAuxUlr+0+IKfVcasHJXBV0gNiED9B/8P6xh3Q4xLKnlskrh+PzP7nf HAIA== X-Gm-Message-State: AC+VfDwmXm7UHcYljIw5B9h1zT6M02K1j1kks10c/PZnu82R+WxGDzVT E70PJH+EBLmfsBTvsGc2U5AIng== X-Google-Smtp-Source: ACHHUZ66Q2KT1EVq2R6AYQljZ4rgnsWELrc0t95sw9DEkXQ0z4qnmqALplaz3Jd12mZckM2j457+Rg== X-Received: by 2002:a05:600c:22c2:b0:3f9:b19c:aab4 with SMTP id 2-20020a05600c22c200b003f9b19caab4mr17137646wmg.6.1687816769384; Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 25-20020a05600c029900b003f42158288dsm11730705wmk.20.2023.06.26.14.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:28 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 566031FFBF; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier , Ani Sinha Subject: [PATCH v2 04/26] docs/devel: remind developers to run CI container pipeline when updating images Date: Mon, 26 Jun 2023 22:59:04 +0100 Message-Id: <20230626215926.2522656-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Ani Sinha When new dependencies and packages are added to containers, its important to run CI container generation pipelines on gitlab to make sure that there are no obvious conflicts between packages that are being added and those that are already present. Running CI container pipelines will make sure that there are no such breakages before we commit the change updating the containers. Add a line in the documentation reminding developers to run the pipeline before submitting the change. It will also ease the life of the maintainers. Signed-off-by: Ani Sinha Reviewed-by: Daniel P. Berrangé Message-Id: <20230506072012.10350-1-anisinha@redhat.com> Signed-off-by: Alex Bennée --- docs/devel/testing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 203facb417..8f18052ba7 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -485,6 +485,12 @@ first to contribute the mapping to the ``libvirt-ci`` project: `CI `__ documentation page on how to trigger gitlab CI pipelines on your change. + * Please also trigger gitlab container generation pipelines on your change + for as many OS distros as practical to make sure that there are no + obvious breakages when adding the new pre-requisite. Please see + `CI `__ documentation + page on how to trigger gitlab CI pipelines on your change. + For enterprise distros that default to old, end-of-life versions of the Python runtime, QEMU uses a separate set of mappings that work with more recent versions. These can be found in ``tests/lcitool/mappings.yml``. From patchwork Mon Jun 26 21:59:05 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: 1800202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mvNbMpVt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhd42qq3z20XS for ; Tue, 27 Jun 2023 08:01:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFJ-0002e1-3y; Mon, 26 Jun 2023 17:59:41 -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 1qDuFF-0002bL-Qo for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:37 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFB-0004sb-CW for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:37 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3112f5ab0b1so3467222f8f.0 for ; Mon, 26 Jun 2023 14:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816772; x=1690408772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I9YIwoz2syzBIvgIfb1KrTiedkOwekCcwMFZMGMcvn4=; b=mvNbMpVtxraiXaBijebT9NTHWo812zjH8dn9J+Mp5IevPCqj7ULih+qHuLBH0DIsnb IoNazy2T+5Xl4DcYh+lWwyww8zcM7YWRbkkjcorwgLewZzCQhZyTpzkrvrZQVtPn9qHn yahX6PbFA1decuaHUwWv01wIPB+nd/CDZP8x4DGUcY5eZOLMU4dubzL0T0+Xg0/Pc1Oj y6BZ4TEhTrvc5jCFryNyUaK1R/z0qI0yhRSHa+kErxJPUM+2aydpHtuBTm+Qs0TXpkuA 7FE7xTOv4fQabLS9gnvKq1tTj/uOtkl6e+xvjeA4Db2BgPA9qZ4V3CPNtKbCn9GGVH8c SLhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816772; x=1690408772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I9YIwoz2syzBIvgIfb1KrTiedkOwekCcwMFZMGMcvn4=; b=iqHYvgs/8sdkKh1+EGA0rUGIZH0PnXL6jS9olZ5GptcdltfonLfwEabm5BhVO0SN9N lys7xp30WQi2Jq91JqOdWw8gf6yQQMUl9JKdzz5MnLGZLg1rlG+Wh9h+MWWMW4Q4faXX jolvtZIUwH51h21nRnSlN9+ot3e8ElxostohJYHBBnX8MNNFngozNUGyyCkpSbzoVryH o0Vg1REfTYmzj+7hh0Z7RFjx3dayyFAqjrmupm49pqUnkip8OvBh0zUvBkZag6alZTum PQCUBnKlbbB+d6BR87F/KmH09MdFnJFcU2X44vCgD66CsE3HO/kb7mVONVJSJVUF+fYz Fs9A== X-Gm-Message-State: AC+VfDwRP5HEyUbEL1/8vS8TWEatxaXhyrX5rQKktO2tBKnx50A1FexZ ClDpLvv238e7ug5dzci7AjsBUg== X-Google-Smtp-Source: ACHHUZ70ajcmsQsC+vJBTBZooz4AiLJ2sd0gRl/RTPCMCMR+PhR4PGsSXqK9WjYAz0hH+oz78BRs8A== X-Received: by 2002:a5d:6884:0:b0:311:1101:abb7 with SMTP id h4-20020a5d6884000000b003111101abb7mr19425826wru.65.1687816772103; Mon, 26 Jun 2023 14:59:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l17-20020a5d5611000000b0030c6751a49dsm8364006wrv.115.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6EAC81FFC0; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 05/26] tests/tcg: add mechanism to handle plugin arguments Date: Mon, 26 Jun 2023 22:59:05 +0100 Message-Id: <20230626215926.2522656-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We recently missed a regression that should have been picked up by check-tcg. This was because the libmem plugin is effectively a NOP if the user doesn't specify the type to use. Rather than changing the default behaviour add an additional expansion so we can take this into account in future. Message-Id: <20230623122100.1640995-6-alex.bennee@linaro.org> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- tests/tcg/Makefile.target | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 72876cc84e..2462c26000 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -169,13 +169,17 @@ extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1)) RUN_TESTS+=$(EXTRA_RUNS) +# Some plugins need additional arguments above the default to fully +# exercise things. We can define them on a per-test basis here. +run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true$(COMMA)callback=true + ifeq ($(filter %-softmmu, $(TARGET)),) run-%: % $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<) run-plugin-%: $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ + -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \ -d plugin -D $*.pout \ $(call strip-plugin,$<)) else @@ -189,7 +193,7 @@ run-plugin-%: $(call run-test, $@, \ $(QEMU) -monitor none -display none \ -chardev file$(COMMA)path=$@.out$(COMMA)id=output \ - -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ + -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@)$(PLUGIN_ARGS) \ -d plugin -D $*.pout \ $(QEMU_OPTS) $(call strip-plugin,$<)) endif From patchwork Mon Jun 26 21:59:06 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: 1800196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QkOu34Yv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhbr0m0fz20XS for ; Tue, 27 Jun 2023 08:00:24 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFH-0002cU-HT; Mon, 26 Jun 2023 17:59:39 -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 1qDuFD-0002ZT-Uk for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:35 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF9-0004ra-NV for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:35 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-313f2a24cb6so1564719f8f.0 for ; Mon, 26 Jun 2023 14:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816770; x=1690408770; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UiwEwjAi6lomr9E2iVsjR5pQJHgLNYXOTgd+ktx/cfE=; b=QkOu34Yveyl8EiKH6w1I+VpWN75HOx78BZ1f3bRxys7JRSBcYpRQDaubEmoDaD/1S2 ly36S4aKVBzALA0WbqzrX4gQM9SbW7SDmG1FLCCTQ4Bp9mh72aELgwCiI4jb1imBhGCW wEJsNTJTJzZQ8o89uKQX8czAt4GgUVKKBJimGqI83NfBGU+M77/sOkP5ZRt3pW1CvocU h4vdapLDWWdG1Jcs7dSB7hiMuruutsiJbZ+sP8GwclBf3uRJ3i11hbF3EnzjRS1nX/K7 Vh9RY/1Z5PyEdaAG43p4NMyuM2DoTZGAV/8ZJJoSQRkYNP5eKCvFAP5i9/dWgznEJj1g YkoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816770; x=1690408770; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UiwEwjAi6lomr9E2iVsjR5pQJHgLNYXOTgd+ktx/cfE=; b=lBcI6Rc5IPxUH3QBlQrBvj+wrZW/JsLwKIRYFvq2c+4FDrCSfBRQKjWhlbyU2f5Qgg 2ISCxTwgw2VjfpiA5e116XcCk6/DY4ARoZIFBwb1zBmBWvW1dnao7JIvM/Mok+u3xZy+ J8jvEgVBondci1fbELLAvFB8HiPDQHX3OjiTRVtQ+90riZifr8qqqKwfxfNSpOn0maY9 oNCFq0qCudLTPDnHoO7WNM51iOkKnTdcFZtvLBQxrYoa0Akvuc8vs+Sr45oZdtVgdzZG xwvSiF2gj1mnw59v1HEixTjFTBkfY83P2zjwGc7ohUS5J+ZGE10G90lP7/2/XwMVzZ+5 zrwg== X-Gm-Message-State: AC+VfDytNlTRPMlVXGKsdBkEr75hi+GwaMoNXVeyma5HzeB8wecNSqCV AUwYyem05lr85D1FqmwtmgGNUw== X-Google-Smtp-Source: ACHHUZ5+90AgbGSbEQx8QQ2p95E9Q3UFHzBJvvrd7HRe+5XUss5bBysuLUDYuK4WAGEITpeQ6kY3aA== X-Received: by 2002:a05:6000:d0:b0:313:fca6:5f56 with SMTP id q16-20020a05600000d000b00313fca65f56mr212679wrx.8.1687816770334; Mon, 26 Jun 2023 14:59:30 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f4-20020a0560001b0400b00307a86a4bcesm8511640wrz.35.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 863FA1FFC1; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 06/26] qemu-keymap: properly check return from xkb_keymap_mod_get_index Date: Mon, 26 Jun 2023 22:59:06 +0100 Message-Id: <20230626215926.2522656-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We can return XKB_MOD_INVALID which rightly gets flagged by sanitisers as an overly wide shift attempt. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- qemu-keymap.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/qemu-keymap.c b/qemu-keymap.c index 229866e004..8c80f7a4ed 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -140,6 +140,18 @@ static void usage(FILE *out) names.options ?: "-"); } +static xkb_mod_mask_t get_mod(struct xkb_keymap *map, const char *name) +{ + xkb_mod_index_t mod; + xkb_mod_mask_t mask = 0; + + mod = xkb_keymap_mod_get_index(map, name); + if (mod != XKB_MOD_INVALID) { + mask = (1 << mod); + } + return mask; +} + int main(int argc, char *argv[]) { struct xkb_context *ctx; @@ -215,14 +227,10 @@ int main(int argc, char *argv[]) mod, xkb_keymap_mod_get_name(map, mod)); } - mod = xkb_keymap_mod_get_index(map, "Shift"); - shift = (1 << mod); - mod = xkb_keymap_mod_get_index(map, "Control"); - ctrl = (1 << mod); - mod = xkb_keymap_mod_get_index(map, "AltGr"); - altgr = (1 << mod); - mod = xkb_keymap_mod_get_index(map, "NumLock"); - numlock = (1 << mod); + shift = get_mod(map, "Shift"); + ctrl = get_mod(map, "Control"); + altgr = get_mod(map, "AltGr"); + numlock = get_mod(map, "NumLock"); state = xkb_state_new(map); xkb_keymap_key_for_each(map, walk_map, state); From patchwork Mon Jun 26 21:59:07 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: 1800209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=YVlOodut; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhgw6wr4z20XS for ; Tue, 27 Jun 2023 08:03:56 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFI-0002de-DA; Mon, 26 Jun 2023 17:59:40 -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 1qDuFF-0002b8-DR for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:37 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFB-0004sY-95 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:37 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fb10fd9ad3so11223735e9.0 for ; Mon, 26 Jun 2023 14:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816772; x=1690408772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GnP8f96S0GKF3CO1A0jcmqKih6bOlzq38Er4YTCNWjo=; b=YVlOodutlBDwNkn+K8PQ3of4v1XKSAxgWQHSonMQUz3IVM9G5YINa1G71SPkul3aa9 R8EP5dOcYhWMOAXIxdFFxa15XCo/XGRtAPqEO9rok8IydlTG8L2uWcoLpg+BIGdO9AvC 8oaj0GV9bFHRp6MG+wXmKENzjfYAEzBXrgcLcX4t7DOh+72r1MsHIQcC/NL9B9g9CKd9 8hJp7psSa1PXUOSCrIKzGb8hlMt6gicTdcceCkEPegDhjKFscUViCZY+AmlHrHpU7hCg hzcyMdR9OYy/uqjZAJxqvmyIPyb57c7oVbKjD8gP0aNMDgN/Vt4s6/SypnpGisf/3KNL Gr1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816772; x=1690408772; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GnP8f96S0GKF3CO1A0jcmqKih6bOlzq38Er4YTCNWjo=; b=Uh9z8rtxrZA2DDuIpmVMhck9IFCHqc7XFr+Rogo7AtvIUV5iy8xmzKj0xuHEXU0wz9 uITvAVJ+E4c0S9yXq0/VWLO9PCqYagECmXsWZirnOXzY6eRiKOit+P4WcWMm9yZsleDK A0NFkt7KvGuwB1awm79r3CH1qArLVru/299YzTGbOiI2OomrKWWtHTnkBhC9J/OyLt4H m1SOlZ2bLpXL93BmlyYzN/JuqL42l+xvX0nXI9yOjlzP9dsW/ebLzOy32CzJ4nCToGJ2 5EK04gIEeLL0smlX7tddMuza2UZu3R4H7x7P7fE+fsftqyat/YzoZe4AFlfLiI5G7qzB jKSA== X-Gm-Message-State: AC+VfDzh2czbAxPT/jaWl+LupzygLhYkGrvpy2K7Z/peou7LDD25poo2 fuqqH90BY3Eo+TEiDp28U2yYKA== X-Google-Smtp-Source: ACHHUZ6bBXsnXQi9BzYI73Vlanme1LzwJzymgqmCpOdhNNCHZHjq3u0xC7OnmQW7le+a5q3TimVk9Q== X-Received: by 2002:a7b:cd1a:0:b0:3fb:7184:53eb with SMTP id f26-20020a7bcd1a000000b003fb718453ebmr646459wmj.18.1687816771886; Mon, 26 Jun 2023 14:59:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l17-20020a5d5611000000b0030c6751a49dsm8364016wrv.115.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9E39D1FFC2; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 07/26] scripts/oss-fuzz: add a suppression for keymap Date: Mon, 26 Jun 2023 22:59:07 +0100 Message-Id: <20230626215926.2522656-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When updating to the latest fedora the santizer found more leaks inside xkbmap: FAILED: pc-bios/keymaps/ar /builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara ================================================================= ==3604==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1424 byte(s) in 1 object(s) allocated from: #0 0x56316418ebec in __interceptor_calloc (/builds/stsquad/qemu/build-oss-fuzz/qemu-keymap+0x127bec) (BuildId: a2ad9da3190962acaa010fa8f44a9269f9081e1c) #1 0x7f60d4dc067e (/lib64/libxkbcommon.so.0+0x1c67e) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80) #2 0x7f60d4dc2137 in xkb_keymap_new_from_names (/lib64/libxkbcommon.so.0+0x1e137) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80) #3 0x5631641ca50f in main /builds/stsquad/qemu/build-oss-fuzz/../qemu-keymap.c:215:11 and many more. As we can't do anything about the library add a suppression to keep the CI going with what its meant to be doing. Message-Id: <20230623122100.1640995-9-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- scripts/oss-fuzz/lsan_suppressions.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/oss-fuzz/lsan_suppressions.txt b/scripts/oss-fuzz/lsan_suppressions.txt index 02ec0a6ed5..7d90c280d0 100644 --- a/scripts/oss-fuzz/lsan_suppressions.txt +++ b/scripts/oss-fuzz/lsan_suppressions.txt @@ -1,2 +1,5 @@ # The tcmalloc on Fedora37 confuses things leak:/lib64/libtcmalloc_minimal.so.4 + +# libxkbcommon also leaks in qemu-keymap +leak:/lib64/libxkbcommon.so.0 From patchwork Mon Jun 26 21:59:08 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: 1800207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y4cWEPo7; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhgN1Vzwz20XS for ; Tue, 27 Jun 2023 08:03:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFI-0002dp-No; Mon, 26 Jun 2023 17:59:40 -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 1qDuFE-0002aa-Uy for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:36 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFA-0004s9-Fs for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:36 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3fa99742af9so13350205e9.2 for ; Mon, 26 Jun 2023 14:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816771; x=1690408771; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cCVrBcA62K9RLf5e56Guknvwd44ZoDW7Y93GujqWZjQ=; b=y4cWEPo7e4u0mgr0SUohceoPO7QQiLIHO5sWxD8mrpnSuo98WJjvCJ0ZbIlSPjk14s L3rFJNirp+f0GaoMaJOU9OJdo1k20U77/V5xJw2LJRJ/uRr+pVLh6xoZwMAnE0ND6yWt l+aVsPIjFRikBRE0jM6GPH5nhnKreYZHUDZIspWNzCMVWipYdKH+H3R3wJdSq2UpbxqJ JYZcklhmSQ5G+wLy9FoStOvIjWr+CCe/kBRQvXtfQ2JxThj4L3QSdv8cFDDHD6JFPDcD tpde7PJRL1pqp/ZU1UXQFIz0GCQlhRLJTs8X7byCrFCGEh2ObcLf6fPIQZ6IPe/Fs5lM 6pgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816771; x=1690408771; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cCVrBcA62K9RLf5e56Guknvwd44ZoDW7Y93GujqWZjQ=; b=b66xnS9VewmpiOyxSojPD86lw5IVp3YfJ1WnukqJErZXpThnJ2M8UEZD3uzdx0bziZ qk4GHqiSEdH8fEU+z89fkiXGRVIeFKLx5vDFlHeI7PrCo/0QfDB9EFAULpbLz6nrj7hE y3aDdZwOgbB+t99oJlZCVuuYa6bj/82+YN2V/17DC3lyVzC7nBm5WklMqM0u+0Fk7/oz zHnvp3JWMKzXhtm8kC/N6BPIC/vU+Dkw8PVoSD6xTCwvx9eyEzIc08nugMmDkvfOqPUX MJz/90v1l6Tb8ALn444faKLt3TlQfAsVYi2j9F/ne20HkVama9TO7sbpAWk2NhYNSLiq NtDw== X-Gm-Message-State: AC+VfDzqW1LJJNpGna35cKCbOZst1+2n4TCEeAoLkpaBQsWPe2D+3UmX 2V/L3n63Fzgkns7InO8p5sct/w== X-Google-Smtp-Source: ACHHUZ7U9v8V7yzcARQ2QzEcbSrCRvQC3r7hzO8JciyPynNOsOHF2nZ2JeuXX7oEBAQNaCS/FT7saQ== X-Received: by 2002:a7b:c399:0:b0:3fa:9590:a365 with SMTP id s25-20020a7bc399000000b003fa9590a365mr2927101wmj.17.1687816771132; Mon, 26 Jun 2023 14:59:31 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k26-20020a7bc41a000000b003f080b2f9f4sm11751894wmi.27.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B91EB1FFC3; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 08/26] tests/qtests: clean-up and fix leak in generic_fuzz Date: Mon, 26 Jun 2023 22:59:08 +0100 Message-Id: <20230626215926.2522656-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org An update to the clang tooling detects more issues with the code including a memory leak from the g_string_new() allocation. Clean up the code with g_autoptr and use ARRAY_SIZE while we are at it. Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela Reviewed-by: Alexander Bulekov --- tests/qtest/fuzz/generic_fuzz.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index c525d22951..a4841181cc 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -954,17 +954,14 @@ static void register_generic_fuzz_targets(void) .crossover = generic_fuzz_crossover }); - GString *name; + g_autoptr(GString) name = g_string_new(""); const generic_fuzz_config *config; - for (int i = 0; - i < sizeof(predefined_configs) / sizeof(generic_fuzz_config); - i++) { + for (int i = 0; i < ARRAY_SIZE(predefined_configs); i++) { config = predefined_configs + i; - name = g_string_new("generic-fuzz"); - g_string_append_printf(name, "-%s", config->name); + g_string_printf(name, "generic-fuzz-%s", config->name); fuzz_add_target(&(FuzzTarget){ - .name = name->str, + .name = g_strdup(name->str), .description = "Predefined generic-fuzz config.", .get_init_cmdline = generic_fuzz_predefined_config_cmdline, .pre_fuzz = generic_pre_fuzz, From patchwork Mon Jun 26 21:59:09 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: 1800204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=arsa3zJu; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhdB2g9Mz20XS for ; Tue, 27 Jun 2023 08:01:34 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFK-0002fm-08; Mon, 26 Jun 2023 17:59:42 -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 1qDuFE-0002ac-Vf for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:36 -0400 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFA-0004rv-Da for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:36 -0400 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fb5bcb9a28so2594030e87.3 for ; Mon, 26 Jun 2023 14:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816771; x=1690408771; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aIzjiTDV01K3tkp9aXGFv1lByMVRceW6OmvT/ZDu2SA=; b=arsa3zJuB8XBMBg8nGs4O26+56wGfrTF05JJULFWLegP/UbPUp1dzrkKU3xmkWUR1H vCJ5I+LjvoEEeSIKXcmc+M0xMRzqUxwfI2BPZd8joL/WsfSt6IOy9o2G3Uq3j7rMLM23 SbWHwKRoiIrw3j1PTVWRVTmLF1xBjN3mkbahkCzKIWmrbnaDVdaw3YiOUR9ej1H2/E3z dt+otFq/xYP0quS3t/nos/ebclahFp+37WGJ4jxcABoQmq1ZfLlgmC5s+cDHq1C5XuHr GXbJboXAkRUuA7CFkcx8brYK4VAXyy4zJ71IkRbVl5rsyuzAgtp+/ix6D1+KvyqiXX9a YvKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816771; x=1690408771; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aIzjiTDV01K3tkp9aXGFv1lByMVRceW6OmvT/ZDu2SA=; b=GN5osk0VYiIgAM9klAG0Wk0y6bG5K7UoT/BPD8EpJBevB71Vg7rqJ8xSzLA3pFa7P8 Vn/r0DfUK5UC9veOd1cI7erWPdCxTusV/c12kg7SoNvzArqXXiXNE+j4IVyQpJcyI60I WVEwG/eTXCvitahP+XzMTpCFnyN8/F2ESzom6WJytF4bjH0bnf1e/UIsMGU0xreLjz8U VhWMcwfOAwGUyHdJnfBPRiHnb+BSVwwa0N6JoVFitDtYwp2ewU802pKpigTcoYsV3zJq mbKvUvhh82tb1gQF2ZPMOOdTs8LZCX2E2onYxpH50JHjr1JVrRHCMF45S2jxfQlkvkiv jktw== X-Gm-Message-State: AC+VfDzjpPFJ/ylE/1IOfdwFtYSoX1WwX3G3o23m9bD9YgIckbSxJF1K 2fXvc2FxLG6QIWaBSTvhAj1y+w== X-Google-Smtp-Source: ACHHUZ4Y2ZM6Ok2ayZEcu7/Tj0vPqMjOUD0ErtWJjRrEDdHHtoJr+8NNfDlRu9IQgOL2VEfk/Se58g== X-Received: by 2002:a05:6512:ba9:b0:4fb:83fd:f6a9 with SMTP id b41-20020a0565120ba900b004fb83fdf6a9mr82631lfv.7.1687816770751; Mon, 26 Jun 2023 14:59:30 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t8-20020a1c7708000000b003f50d6ee334sm8708659wmi.47.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D0D571FFC4; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 09/26] tests/docker: add test-fuzz Date: Mon, 26 Jun 2023 22:59:09 +0100 Message-Id: <20230626215926.2522656-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12b.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Running the fuzzer requires some hoop jumping and some problems only show up in containers. This basically replicates the build-oss-fuzz job from our CI so we can run in the same containers we use in CI. Signed-off-by: Alex Bennée Reviewed-by: Alexander Bulekov --- tests/docker/test-fuzz | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/docker/test-fuzz diff --git a/tests/docker/test-fuzz b/tests/docker/test-fuzz new file mode 100755 index 0000000000..7e506ae1f6 --- /dev/null +++ b/tests/docker/test-fuzz @@ -0,0 +1,28 @@ +#!/bin/bash -e +# +# Compile and check with oss-fuzz. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Authors: +# Alex Bennée +# +# SPDX-License-Identifier: GPL-2.0-or-later + +. common.rc + +requires_binary clang + +# the build script runs out of $src so we need to copy across +cd "$BUILD_DIR" +cp -a $QEMU_SRC . +cd src +mkdir build-oss-fuzz +export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt +env CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" ./scripts/oss-fuzz/build.sh +export ASAN_OPTIONS="fast_unwind_on_malloc=0" +for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f | grep -v slirp); do + grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ; + echo Testing ${fuzzer} ... ; + "${fuzzer}" -runs=1 -seed=1 || exit 1 ; +done From patchwork Mon Jun 26 21:59:10 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: 1800197 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZW1hyw25; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhcF312fz20XS for ; Tue, 27 Jun 2023 08:00:45 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFF-0002bM-Ta; Mon, 26 Jun 2023 17:59:37 -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 1qDuFD-0002ZS-T0 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:35 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuF9-0004rm-W6 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:35 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3113dabc549so5498483f8f.1 for ; Mon, 26 Jun 2023 14:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816770; x=1690408770; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cf5ti9xDtG3D2s3Jcs/OJus8Ga0lob29HRcRChdiZSs=; b=ZW1hyw25rSw6AwGknm/Ji86AEJbr2jLB4aBgc0dvjLQW5P5USBo+LE6jf3/V8eU0St 9uriFdpHzWoKseJmP/azUn5hqYIXVqJH/MzetuWnqLdbaRlCI+fI3gXMXKblq4/XS1Aa KmDGCzwKULDYYD63EK0+AA2dGXignfvRIknWvMZa8ydImlLi9HBmPOwkLikWVJ3I+eUY mp84SY4d1P91luQI+/YI2LGH1ciU2G2DrOWyyIsijLPuCNthOYgqddV1uG1A8QP4kEwG bKr+yt7A/jTKQVOeZg7C8f4jqzGlOtFZGcYfkf9AQrsSebjjpsS9PS4xbowpcMOqgqY/ Ogiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816770; x=1690408770; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cf5ti9xDtG3D2s3Jcs/OJus8Ga0lob29HRcRChdiZSs=; b=iHxup0e93cxK3bt7p0a8GaNMrx4u2bLOsqFzdjEgOeyHz/pAnzzgmQ0Q6Scv8mJsV9 t18t0mHjgjcUdDnTghLejEJsZ/Gz+iXW74BphMv6pjKgNLyNmvxHXv9NTyfD45JMlCy+ T9z6UbQgCblijuqKF6N26d2oQKhQhJhAP/yHn/xPiRpRs4N9MD0hg8VySeuLRUn88bRk HUfwiLie0GaLyxQ8ux/7KqIDimM2BUxI8Q6BdbyGYpBkvX3B2bG8JjnGUv8B4e1wugKt hosyqMsNIkTKu1wD5Q4n17sc7+cy8gl7eO7ek6Rp/PP/P8DnAqxyJZ+q6LEvU1X8f4l5 Uypg== X-Gm-Message-State: AC+VfDye5fbz4at8MyCY9Ubw3DCMGQg3jXaMLYF655j6zdQzUsOGEGIX jxNNeEmyTL0aweYivgmhrWlKZw== X-Google-Smtp-Source: ACHHUZ4sgnuQOhYNHB62c3Qgd0xgaQ8cZVU+PCE2wzI6TMvpVDPCzKHzVOauFczfwmsUgLT/L+X2bw== X-Received: by 2002:a5d:4a42:0:b0:313:f366:2c68 with SMTP id v2-20020a5d4a42000000b00313f3662c68mr3836857wrs.26.1687816770527; Mon, 26 Jun 2023 14:59:30 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t15-20020a0560001a4f00b00313f676832bsm2289262wry.93.2023.06.26.14.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:29 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EB63D1FFC5; Mon, 26 Jun 2023 22:59:27 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 10/26] Makefile: add lcitool-refresh to UNCHECKED_GOALS Date: Mon, 26 Jun 2023 22:59:10 +0100 Message-Id: <20230626215926.2522656-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is yet another make target you usually run in the top level of the source directory. Message-Id: <20230623122100.1640995-12-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 804a5681e0..5d48dfac18 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) UNCHECKED_GOALS := TAGS gtags cscope ctags dist \ help check-help print-% \ - docker docker-% vm-help vm-test vm-build-% + docker docker-% lcitool-refresh vm-help vm-test vm-build-% all: .PHONY: all clean distclean recurse-all dist msi FORCE From patchwork Mon Jun 26 21:59:11 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: 1800198 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Jo745Ikk; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhcm4CTcz20XS for ; Tue, 27 Jun 2023 08:01:12 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFM-0002ih-Nz; Mon, 26 Jun 2023 17:59:44 -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 1qDuFH-0002cQ-CS for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:39 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFC-0004tK-CM for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:38 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fa7cd95dacso47068445e9.3 for ; Mon, 26 Jun 2023 14:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tOV9EOnx/XHsK7XQyMJxy5drdvS9UgZO7Cmh6YX5vFY=; b=Jo745IkkTZt79hmVbG7dQf8Xd6LMKCS8yA2KqCb2nnE18xOKzk8N8QlhouquZ5ZZ8Q 0KK0biMES1QfPGexSqGQeaqT9FuWZ38aA4rF/BX+f/Ks4flJ3rnvH8nURKXLYwE/mEgK 8UTyLK6aSD9LE+zmXVtCghlP1QdJymDJhczCvNJW0zFhahF5h2TDgi/8R/VQgTf+wBTa 8TL16vo4hXbiOzvbfWpnpSkEK9OugJwU/Eq+F7rsXzmpDu0ostLkjgWy39zQMnkiUFCA naJjaMv1sp0XSF5VdPAWFkWDkyitzXaM2l+RwFBNgrDmViR8FncD1V020R+4MXQHamVn jaDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tOV9EOnx/XHsK7XQyMJxy5drdvS9UgZO7Cmh6YX5vFY=; b=h8CY8QazwmL1oO9Vu+fA254D4XSx5jzmeHekC8Reg5yOaJWWyO/cYM5SFSWU74wyYD B4uIQdHKBQXCyq7BtobJuijOmbgn3O0k7f+yWKMoXw1ow5lMdqmxnTCLs7aY6CY7OnUd B0pcR21LlzaQB4ptXNoxy3uM1RPFzyKrxpGjbFAkfjHDdlNz+3Wqg62pFhZr5LqbVew0 jWdIooein1uDL4OFJurcO1W0f1hkdVAqkRMcHSlFwLaEnbDprE6bOJcPgIFKZNavEizP sIT/teAB1s5RYrzPCBEgBcgwnA+F0wj4DlZCK1Q7i4EYuWHZ+9lQYQYxuxMI2kO+yX9A aYoA== X-Gm-Message-State: AC+VfDxxJi0iRXyfHzxAEaIZeoFHO2cS7Dka91HAQOQbuXITtD62wWiY q8uIyWjQpqamJMozrGbovsa8Ag== X-Google-Smtp-Source: ACHHUZ5Apys2ovPirvMWbjrK4TDCP5u305JCrR9bGNVvh5Vuhc4M/XAV99e97dTUucw8rrlMnPGqqA== X-Received: by 2002:a05:600c:2109:b0:3fa:88f4:575e with SMTP id u9-20020a05600c210900b003fa88f4575emr4454726wml.0.1687816773032; Mon, 26 Jun 2023 14:59:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c25-20020a7bc019000000b003f819faff24sm11761754wmb.40.2023.06.26.14.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 15D3C1FFBB; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 11/26] tests/lcitool: update to latest version Date: Mon, 26 Jun 2023 22:59:11 +0100 Message-Id: <20230626215926.2522656-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We need this for the riscv64 and gcc-native mappings. As the older alpine release has been dropped from the mappings we also need to bump the version of alpine we use. Message-Id: <20230623122100.1640995-13-alex.bennee@linaro.org> Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/alpine.docker | 4 ++-- tests/lcitool/libvirt-ci | 2 +- tests/lcitool/refresh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 0097637dca..43370f7b36 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all alpine-316 qemu +# $ lcitool dockerfile --layers all alpine-318 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM docker.io/library/alpine:3.16 +FROM docker.io/library/alpine:3.18 RUN apk update && \ apk upgrade && \ diff --git a/tests/lcitool/libvirt-ci b/tests/lcitool/libvirt-ci index c8971e90ac..b0f44f929a 160000 --- a/tests/lcitool/libvirt-ci +++ b/tests/lcitool/libvirt-ci @@ -1 +1 @@ -Subproject commit c8971e90ac169ee2b539c747f74d96c876debdf9 +Subproject commit b0f44f929a81c0a604fb7fbf8afc34d37ab0eae9 diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index f1570b54df..5d36a62b10 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -115,7 +115,7 @@ try: # # Standard native builds # - generate_dockerfile("alpine", "alpine-316") + generate_dockerfile("alpine", "alpine-318") generate_dockerfile("centos8", "centos-stream-8") generate_dockerfile("debian-amd64", "debian-11", trailer="".join(debian11_extras)) From patchwork Mon Jun 26 21:59:12 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: 1800199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wSxgwjkl; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhcn6bZzz20b0 for ; Tue, 27 Jun 2023 08:01:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFM-0002ie-Ck; Mon, 26 Jun 2023 17:59:44 -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 1qDuFH-0002cE-3C for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:39 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFC-0004t7-5j for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:38 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-307d20548adso3499800f8f.0 for ; Mon, 26 Jun 2023 14:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DudiICXjsv3m9urKUi2tH2RtAEiqXNFzr67H4vIREuA=; b=wSxgwjklOyo9zxD9yQ/wr2ZLX3SYQnByKvVJPbTKCmeSgh/4EkglxCeERLLNBZCjd1 pMonOeW4GTgpuQc6uwrcrB358jj3IgLOsEMiPmUGFovLfbeChQVWBwvzhj5OoVPpQnoq MmBNEKIqo82Z1wQXAgi7vz5rRbr+WdZz6lU/g9tiXcgnYVOSPg0VpyU+/pA01i51zLlp XKT8wf075wjjPZQPu1j0FullwfE3HSdl9YKDUXwHx3DTjmPHTAr8mWLRoCCGFEYbHiaD IQv0I9oL+PyzP6A5BydVvEBSL47Hp5PRDxDp019xo6hJye69YQjHtR5hcY/Opfa59eEN RU1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DudiICXjsv3m9urKUi2tH2RtAEiqXNFzr67H4vIREuA=; b=G38StOuelfEWtURJuBL/3D88tEJcRucqhUzTxnS/DHd3UwLJPT+sqGMxbQf9XMmRgA f7jtd+IOqN668LSTkIbRRWHsdOymNUEwFc+nK77jmAzyCNZov9OUJc5NWVwZ2BzvjtUd eiMf8gzrvlPuQu4P1CC37WUVds5Os6tdF18iu0Qf/dxJf/k8xg9Mhr9D7iisrLYbaMD6 Xh7bfVC+UyevCS3PJ1O72tTj7iXwoI5qzI+gapGnytPQgX5wXL8Yh8h/TBhpOwNqKdlX OzpH0CrwVj/1OEQjNVbDizNBxZouFaPqT0qli11vMeKKreyVT+AxDEse4f4InVLIJwIe Ja/w== X-Gm-Message-State: AC+VfDxslaKsyWr5dOGBoB+eTSSnjUSfw6icUrQWl0wmq4IilZAZHPg4 V0Rei6cdGeMGQ0ZwitQtrzbniA== X-Google-Smtp-Source: ACHHUZ7kbcRun91M01LhutPOXrQARMYm1k0zTmr5b9cAS8Ph3d+2pg3YtBHfM7eDTS8mx6/qacWbUQ== X-Received: by 2002:adf:dfd2:0:b0:313:e20c:b8df with SMTP id q18-20020adfdfd2000000b00313e20cb8dfmr5078097wrn.35.1687816772834; Mon, 26 Jun 2023 14:59:32 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c25-20020a7bc019000000b003f819faff24sm11761757wmb.40.2023.06.26.14.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 35E111FFBC; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier , Erik Skultety Subject: [PATCH v2 12/26] tests/lcitool: Bump fedora container versions Date: Mon, 26 Jun 2023 22:59:12 +0100 Message-Id: <20230626215926.2522656-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Erik Skultety Fedora 37 -> 38 Signed-off-by: Erik Skultety Acked-by: Richard Henderson Message-Id: <20230623122100.1640995-14-alex.bennee@linaro.org> Message-Id: [AJB: Dropped alpine (in prev commit), reflow commit msg] Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora-win32-cross.docker | 4 ++-- tests/docker/dockerfiles/fedora-win64-cross.docker | 4 ++-- tests/docker/dockerfiles/fedora.docker | 4 ++-- tests/lcitool/refresh | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker index dc72ae9cc9..a0a3cd9e5b 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross mingw32 fedora-37 qemu +# $ lcitool dockerfile --layers all --cross mingw32 fedora-38 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:37 +FROM registry.fedoraproject.org/fedora:38 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker index 7eb4a5dba2..b6c1a6a339 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all --cross mingw64 fedora-37 qemu +# $ lcitool dockerfile --layers all --cross mingw64 fedora-38 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:37 +FROM registry.fedoraproject.org/fedora:38 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 3a69eefdda..8a35a17617 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -1,10 +1,10 @@ # THIS FILE WAS AUTO-GENERATED # -# $ lcitool dockerfile --layers all fedora-37 qemu +# $ lcitool dockerfile --layers all fedora-38 qemu # # https://gitlab.com/libvirt/libvirt-ci -FROM registry.fedoraproject.org/fedora:37 +FROM registry.fedoraproject.org/fedora:38 RUN dnf install -y nosync && \ printf '#!/bin/sh\n\ diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 5d36a62b10..5e06fb2cf5 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -119,7 +119,7 @@ try: generate_dockerfile("centos8", "centos-stream-8") generate_dockerfile("debian-amd64", "debian-11", trailer="".join(debian11_extras)) - generate_dockerfile("fedora", "fedora-37") + generate_dockerfile("fedora", "fedora-38") generate_dockerfile("opensuse-leap", "opensuse-leap-15") generate_dockerfile("ubuntu2004", "ubuntu-2004") generate_dockerfile("ubuntu2204", "ubuntu-2204") @@ -169,12 +169,12 @@ try: trailer=cross_build("s390x-linux-gnu-", "s390x-softmmu,s390x-linux-user")) - generate_dockerfile("fedora-win32-cross", "fedora-37", + generate_dockerfile("fedora-win32-cross", "fedora-38", cross="mingw32", trailer=cross_build("i686-w64-mingw32-", "i386-softmmu")) - generate_dockerfile("fedora-win64-cross", "fedora-37", + generate_dockerfile("fedora-win64-cross", "fedora-38", cross="mingw64", trailer=cross_build("x86_64-w64-mingw32-", "x86_64-softmmu")) From patchwork Mon Jun 26 21:59:13 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: 1800222 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=KPW+eUKm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhm40Z7xz20ZQ for ; Tue, 27 Jun 2023 08:07:32 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFO-0002kN-KS; Mon, 26 Jun 2023 17:59:46 -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 1qDuFJ-0002eY-Ga for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:41 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFD-0004tx-QQ for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:41 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fa8cd4a1c0so20546905e9.1 for ; Mon, 26 Jun 2023 14:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816774; x=1690408774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YjcBvoRPGdwmtkpSOh5Jr/t8a2L1GvJT/Iq1phAB7S4=; b=KPW+eUKmw1l8sruLv3Qt8aqy6+c3M0ixzQLgE8zmdgukNFyLoZ66Cvzvl51MWQ4dWj nhQ6vKNXKSwMHYVxDkg4W6PlA0SnkkAtAof6R2VspDBDkASUqWRqKSa9Hu7SDEByta23 i/t4YPl29Sj2I/qLlB6aG2p7uRUJbh8h9x6LFqfEoo80ixZbFxMHpOKi/SDDK8h/0zG0 NOZ1rLUFNJaD+fCDX4IEvJlAWdQv6K5N0sO1v8gYBWMou/CQ+c2wtvIL0M+BcMVUTaPc b4pcVMATx+k4F/O0XqVC7Dgjdl4/nhV6LnE2hzleKv04XoeX00xkHjUkKJdnBuDULlzX S6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816774; x=1690408774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YjcBvoRPGdwmtkpSOh5Jr/t8a2L1GvJT/Iq1phAB7S4=; b=flGghJJQDAT851HPJfyecSnEg8odTtswQjvUHEu2h3TBsLxj1JYZR8D426s/yWhvIA ZC7XiFxNYDSwKnQ4gBf8VAnNvuS/IlQ46qgExpF0MUZ4On4Vo/v5Wlq0DvQDIr57jTj6 vM9wb59muMRSjV3rwE97tWVFojItJNX+Sy+j4eG5SgfcxF8WaNi+b8LemuGzXCY/KF/E S6dtoRtuEJJOBQ+rmEdX2p6RpiGOA/0MI8/eZLJoJgmJijueZ/0bQgB05hojsMrwG26s /GnofuU90p+PQc15/EylMwjQMEUfHrTssJTY0gQrSgGFT9B4SET7xCCVEnC9FKOsXfxb b/Lg== X-Gm-Message-State: AC+VfDzLE8OGYB0iWP3dYgMvVvchypWxJeZX229YF2K4Y43iReaFL15e KSD0tztCc34Il50iB6HNXKHRFw== X-Google-Smtp-Source: ACHHUZ5sWJw1Vy1weM47Qm58ZpQOAyB1GajsIE7f/16Us/5ESY4wmYXIB6VTp83G+1g2WjZvsJL6cw== X-Received: by 2002:a1c:790b:0:b0:3fa:9554:fb2d with SMTP id l11-20020a1c790b000000b003fa9554fb2dmr3236023wme.35.1687816773992; Mon, 26 Jun 2023 14:59:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z12-20020a05600c114c00b003f8d0308616sm8825948wmz.32.2023.06.26.14.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:31 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 673D21FFBD; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 13/26] tests/lcitool: add an explicit gcc-native package Date: Mon, 26 Jun 2023 22:59:13 +0100 Message-Id: <20230626215926.2522656-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We need a native compiler to build the hexagon codegen tools. In our current images we already have a gcc as a side effect of a broken dependency between gcovr and lcov but this will be fixed when we move to bookworm. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818 for details. Update the packages while we are at it. Message-Id: <20230623122100.1640995-15-alex.bennee@linaro.org> Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian-amd64-cross.docker | 1 + tests/docker/dockerfiles/debian-arm64-cross.docker | 1 + tests/docker/dockerfiles/debian-armel-cross.docker | 1 + tests/docker/dockerfiles/debian-armhf-cross.docker | 1 + tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 + tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 + tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 + tests/docker/dockerfiles/debian-s390x-cross.docker | 1 + tests/docker/dockerfiles/fedora-win32-cross.docker | 1 + tests/docker/dockerfiles/fedora-win64-cross.docker | 1 + tests/lcitool/projects/qemu.yml | 1 + 11 files changed, 11 insertions(+) diff --git a/tests/docker/dockerfiles/debian-amd64-cross.docker b/tests/docker/dockerfiles/debian-amd64-cross.docker index 40a2b6acc4..016c2321f1 100644 --- a/tests/docker/dockerfiles/debian-amd64-cross.docker +++ b/tests/docker/dockerfiles/debian-amd64-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker index c99300bbfa..3c114efa11 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker index 5db5c78b31..dfbd47db89 100644 --- a/tests/docker/dockerfiles/debian-armel-cross.docker +++ b/tests/docker/dockerfiles/debian-armel-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker index ae6600b25f..4e0084e896 100644 --- a/tests/docker/dockerfiles/debian-armhf-cross.docker +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker index daa2d48e36..88adf333e9 100644 --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker index 5af04e2054..256e8b5dfe 100644 --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker index 1eeba7fcab..4d19cd2bd7 100644 --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker index 52e89a6dab..642bbde3d1 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -24,6 +24,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ exuberant-ctags \ findutils \ flex \ + gcc \ gcovr \ gettext \ git \ diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/docker/dockerfiles/fedora-win32-cross.docker index a0a3cd9e5b..e3dfd68bed 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -29,6 +29,7 @@ exec "$@"\n' > /usr/bin/nosync && \ diffutils \ findutils \ flex \ + gcc \ gcovr \ git \ glib2-devel \ diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/docker/dockerfiles/fedora-win64-cross.docker index b6c1a6a339..0e15c9643a 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -29,6 +29,7 @@ exec "$@"\n' > /usr/bin/nosync && \ diffutils \ findutils \ flex \ + gcc \ gcovr \ git \ glib2-devel \ diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.yml index 566db8313b..21fd3d2cf9 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -24,6 +24,7 @@ packages: - fuse3 - g++ - gcc + - gcc-native - gcovr - gettext - glib2 From patchwork Mon Jun 26 21:59:14 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: 1800213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=S2Bbt+hn; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhhV0KByz20XS for ; Tue, 27 Jun 2023 08:04:26 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFN-0002j3-4S; Mon, 26 Jun 2023 17:59:45 -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 1qDuFI-0002dZ-7L for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:40 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFC-0004tQ-PT for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:39 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fb4146e8ceso8166345e9.0 for ; Mon, 26 Jun 2023 14:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mrxZa7XFEUbEabq4wBcL7gzCxqp+QvBtMc1otNNsIiU=; b=S2Bbt+hnDURhjV/YhlRsJ892w+IrjNDY9dXvkQ39pmfs8TrYs3eY9YNppfNNtoKmOG BeUmuvhXBZYt/7RAfv5gNBznnwKWiCt8fc8m84+LNAg+gcWe0tDnRFUJBgiN5D/GZIAQ MhExqWymRhNBH4z7FxV6gRLk7r7KSOXpKroLMZYNRdGrj1E8/fcDuitvezRqDO5DARZb ZiNpMLarQXoP8xtmVVXnblo/wv2YpyU8oY/BTWV4rEtMDwUR2ZGQybL6E0PwLyddhMHx v3TqDkIt07gjs0VicOyZmiDPXzMH2lCorZG3RqrnWs5N71UZ8XcjYNzYMo48nPrvjEmC 6Wuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816773; x=1690408773; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mrxZa7XFEUbEabq4wBcL7gzCxqp+QvBtMc1otNNsIiU=; b=EsKc4feAODxalSrG+dvffCjB/yxsxarKuqJIG925PnJ2GZBJbvqc4sRKfkqS4Xg6zN JSQ2vN76aKqaYw41iGnFU+SnXhy0ohF+ZklGYAkt4jAsytXHmQMZQAg1Zyf9y6Um6i04 0uBvvj87UL+M2h175O2wj7EUsSpcXUDJznmsHqKj/wIEWZ0TuhVvrsaEBBkdO5xnfXpg Pld0ZiupYBPu8P0xB/6+666xpR3KykfKqRyHfLNc+MrOiXxdUC4fWq8dWjKocCcieLo1 x5L81ZB8xOeJiKgDhDhkYN+Y9g5Zy0X05SF2KPPQnvr2WuV7LLmmI5fl3iu2uxDGvbWy 1bJQ== X-Gm-Message-State: AC+VfDx/MJBYxmiRJyC7vL4JjlWr+ufakzMsF9/KuxNfvbWXg58ck62h 3XSkEFMeLYjF/DPNa5Jr8Lte3w== X-Google-Smtp-Source: ACHHUZ6S4D9UBjbfVupvfCxw4KikqJc42+gJe5/17Ob+L8ECE7eqMUDxLa8d/Csto3Zdtvj2gkaHgg== X-Received: by 2002:a7b:cb85:0:b0:3fb:9ef2:157 with SMTP id m5-20020a7bcb85000000b003fb9ef20157mr335621wmi.28.1687816773213; Mon, 26 Jun 2023 14:59:33 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n20-20020a7bcbd4000000b003fb739d27aesm776518wmi.35.2023.06.26.14.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:31 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7F2AF1FFC6; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 14/26] tests/lcitool: introduce qemu-minimal Date: Mon, 26 Jun 2023 22:59:14 +0100 Message-Id: <20230626215926.2522656-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This is a very bare bones set of dependencies for a minimal build of QEMU. This will be useful for minimal cross-compile sanity check based on things like Debian Sid where stuff isn't always in sync. Message-Id: <20230623122100.1640995-16-alex.bennee@linaro.org> Signed-off-by: Alex Bennée --- v2 - minor rewording --- tests/lcitool/projects/qemu-minimal.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/lcitool/projects/qemu-minimal.yml diff --git a/tests/lcitool/projects/qemu-minimal.yml b/tests/lcitool/projects/qemu-minimal.yml new file mode 100644 index 0000000000..b60fec715c --- /dev/null +++ b/tests/lcitool/projects/qemu-minimal.yml @@ -0,0 +1,23 @@ +# Very minimal set of qemu packages, used for minimal cross-compile sanity checks +--- +packages: + - bash + - bc + - bison + - flex + - g++ + - gcc + - gcc-native + - glib2 + - glib2-native + - glib2-static + - libc-static + - libfdt + - libffi + - make + - meson + - ninja + - pixman + - pkg-config + - python3 + - python3-venv From patchwork Mon Jun 26 21:59:15 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: 1800208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=J+zL8Mxv; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhgN3zmdz20b0 for ; Tue, 27 Jun 2023 08:03:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFM-0002if-Fn; Mon, 26 Jun 2023 17:59:44 -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 1qDuFK-0002gD-5O for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:42 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFE-0004ud-9M for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:41 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f9ede60140so35849605e9.0 for ; Mon, 26 Jun 2023 14:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816775; x=1690408775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CntAb+cgLtatchfM+3lzjapvTHJaq2r9C16N2thtx8U=; b=J+zL8MxvZNzHOX8kXWaNa0/a65S4jsJSKUS25Oc34Kk33lGxd18SFoyPsW49oYT0uu k6bRYPIz0xtGT5KWohXRfnmAvxDBX5GhM4irHPB3iPiIdg1PitP+7uergBT5fo0vjJS6 FUUsuUZCGHJMbbNkWBdVArcjI/CPSmBhcRZNFDZ1l/qVeY4SmL/4fRiV54FFYx680yim hBbLs+piJSdIvIaSHBBet6/QcHK9fEEgp24gt+gjmHbusaa6JUPnHie7NGe05XUgsm6K 5EnjhHa+9xNtPm2Ec/Tusef6QyQ/b7wpdv8oNmK+QoKGC9C+O+msdn5TmyJxzEoQJLik sd1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816775; x=1690408775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CntAb+cgLtatchfM+3lzjapvTHJaq2r9C16N2thtx8U=; b=jFCZP3HE36k5JNll2rgVBwldeiV4EzUxzKH4u8UDtCfGffLMJLsVZwxi8BahvSlUit Us5ctjkL4FanQllLfyX81MONKI5m6zJOXPYc1VkxZBmVudFkpCjpKnGhRhybGQSliklW FUrHmJGBqvYewL43a4C9RGGkZsEvT63XGj4SP1fXQVGrfHHDN5aCvZOv3EfZw/QtqbE/ 1H0YOfdUjh10k2nAD9OrdhsECYEAOB7XFqXd3Q5TmPqJMC2iecWO4nmc3Ojf1KUj76r+ lIP7RuX6EEBiY7isxtDM9TEeHPYCI4xRt+x303yYINHLg9NvwR7Sy62mlMTz93kxjbiF xfig== X-Gm-Message-State: AC+VfDyyd+lTui1+TdrtW6cyiXBz83BG7LA3dJaipH8ARzmLyOt1rbaZ KgeP1bISGb+kR7GGsBSZrd/okA== X-Google-Smtp-Source: ACHHUZ6w9ICbcu8BqpSisPbojuZokCO9HEK84069Sh/5KuXjhDDJ3wQKttRUlQe4n6xOt+KXViBavw== X-Received: by 2002:a7b:c5c7:0:b0:3f8:946:115d with SMTP id n7-20020a7bc5c7000000b003f80946115dmr21414182wmk.30.1687816774954; Mon, 26 Jun 2023 14:59:34 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u3-20020a05600c00c300b003faa6ce54b2sm2872517wmm.2.2023.06.26.14.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9CC891FFC7; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 15/26] tests/docker: convert riscv64-cross to lcitool Date: Mon, 26 Jun 2023 22:59:15 +0100 Message-Id: <20230626215926.2522656-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We still need to base this on Debian Sid until riscv64 is promoted to a release architecture (or another distro provides a full cross compile target). We use the new qemu-minimal project description to avoid bringing in all the extra dependencies because every extra package is another chance for sid to fail. Signed-off-by: Alex Bennée --- .../dockerfiles/debian-riscv64-cross.docker | 119 +++++++++++------- tests/lcitool/projects/qemu-minimal.yml | 4 + tests/lcitool/refresh | 10 +- 3 files changed, 87 insertions(+), 46 deletions(-) diff --git a/tests/docker/dockerfiles/debian-riscv64-cross.docker b/tests/docker/dockerfiles/debian-riscv64-cross.docker index 081404e014..a2d879ee1f 100644 --- a/tests/docker/dockerfiles/debian-riscv64-cross.docker +++ b/tests/docker/dockerfiles/debian-riscv64-cross.docker @@ -1,54 +1,85 @@ +# THIS FILE WAS AUTO-GENERATED # -# Docker cross-compiler target for riscv64 +# $ lcitool dockerfile --layers all --cross riscv64 debian-sid qemu-minimal # -# Currently the only distro that gets close to cross compiling riscv64 -# images is Debian Sid (with unofficial ports). As this is a moving -# target we keep the library list minimal and are aiming to migrate -# from this hack as soon as we are able. -# -FROM docker.io/library/debian:sid-slim +# https://gitlab.com/libvirt/libvirt-ci -# Add ports -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ - DEBIAN_FRONTEND=noninteractive eatmydata apt update -yy && \ - DEBIAN_FRONTEND=noninteractive eatmydata apt upgrade -yy - -# Install common build utilities -RUN DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \ - bison \ - bc \ - build-essential \ - ca-certificates \ - debian-ports-archive-keyring \ - dpkg-dev \ - flex \ - gettext \ - git \ - libglib2.0-dev \ - ninja-build \ - pkg-config \ - python3 \ - python3-venv +FROM docker.io/library/debian:sid-slim -# Add ports and riscv64 architecture -RUN echo "deb http://ftp.ports.debian.org/debian-ports/ sid main" >> /etc/apt/sources.list -RUN dpkg --add-architecture riscv64 +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update && \ + apt-get install -y eatmydata && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y \ + bash \ + bc \ + bison \ + ca-certificates \ + ccache \ + findutils \ + flex \ + gcc \ + git \ + libglib2.0-dev \ + locales \ + make \ + meson \ + ninja-build \ + pkgconf \ + python3 \ + python3-venv \ + sed \ + tar && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \ + dpkg-reconfigure locales -# Duplicate deb line as deb-src -RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" +ENV LANG "en_US.UTF-8" +ENV MAKE "/usr/bin/make" +ENV NINJA "/usr/bin/ninja" +ENV PYTHON "/usr/bin/python3" -RUN apt update && \ - DEBIAN_FRONTEND=noninteractive eatmydata \ - apt install -y --no-install-recommends \ - gcc-riscv64-linux-gnu \ - libc6-dev-riscv64-cross \ - libfdt-dev:riscv64 \ - libffi-dev:riscv64 \ - libglib2.0-dev:riscv64 \ - libpixman-1-dev:riscv64 +RUN export DEBIAN_FRONTEND=noninteractive && \ + dpkg --add-architecture riscv64 && \ + eatmydata apt-get install debian-ports-archive-keyring && \ + eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ sid main' > /etc/apt/sources.list.d/ports.list && \ + eatmydata echo 'deb http://ftp.ports.debian.org/debian-ports/ unreleased main' >> /etc/apt/sources.list.d/ports.list && \ + eatmydata apt-get update && \ + eatmydata apt-get dist-upgrade -y && \ + eatmydata apt-get install --no-install-recommends -y dpkg-dev && \ + eatmydata apt-get install --no-install-recommends -y \ + g++-riscv64-linux-gnu \ + gcc-riscv64-linux-gnu \ + libc6-dev:riscv64 \ + libfdt-dev:riscv64 \ + libffi-dev:riscv64 \ + libglib2.0-dev:riscv64 \ + libpixman-1-dev:riscv64 && \ + eatmydata apt-get autoremove -y && \ + eatmydata apt-get autoclean -y && \ + mkdir -p /usr/local/share/meson/cross && \ + printf "[binaries]\n\ +c = '/usr/bin/riscv64-linux-gnu-gcc'\n\ +ar = '/usr/bin/riscv64-linux-gnu-gcc-ar'\n\ +strip = '/usr/bin/riscv64-linux-gnu-strip'\n\ +pkgconfig = '/usr/bin/riscv64-linux-gnu-pkg-config'\n\ +\n\ +[host_machine]\n\ +system = 'linux'\n\ +cpu_family = 'riscv64'\n\ +cpu = 'riscv64'\n\ +endian = 'little'\n" > /usr/local/share/meson/cross/riscv64-linux-gnu && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \ + mkdir -p /usr/libexec/ccache-wrappers && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-c++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-cc && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-g++ && \ + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/riscv64-linux-gnu-gcc -# Specify the cross prefix for this image (see tests/docker/common.rc) +ENV ABI "riscv64-linux-gnu" +ENV MESON_OPTS "--cross-file=riscv64-linux-gnu" ENV QEMU_CONFIGURE_OPTS --cross-prefix=riscv64-linux-gnu- ENV DEF_TARGET_LIST riscv64-softmmu,riscv64-linux-user # As a final step configure the user (if env is defined) diff --git a/tests/lcitool/projects/qemu-minimal.yml b/tests/lcitool/projects/qemu-minimal.yml index b60fec715c..d44737dc1d 100644 --- a/tests/lcitool/projects/qemu-minimal.yml +++ b/tests/lcitool/projects/qemu-minimal.yml @@ -4,6 +4,8 @@ packages: - bash - bc - bison + - ccache + - findutils - flex - g++ - gcc @@ -21,3 +23,5 @@ packages: - pkg-config - python3 - python3-venv + - sed + - tar diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 5e06fb2cf5..b54566edcc 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -63,12 +63,12 @@ add_user_mapping = [ " id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi\n" ] -def generate_dockerfile(host, target, cross=None, trailer=None): +def generate_dockerfile(host, target, project="qemu", cross=None, trailer=None): filename = Path(src_dir, "tests", "docker", "dockerfiles", host + ".docker") cmd = lcitool_cmd + ["dockerfile"] if cross is not None: cmd.extend(["--cross", cross]) - cmd.extend([target, "qemu"]) + cmd.extend([target, project]) if trailer is not None: trailer += "\n".join(add_user_mapping) @@ -164,6 +164,12 @@ try: trailer=cross_build("powerpc64le-linux-gnu-", "ppc64-softmmu,ppc64-linux-user")) + generate_dockerfile("debian-riscv64-cross", "debian-sid", + project="qemu-minimal", + cross="riscv64", + trailer=cross_build("riscv64-linux-gnu-", + "riscv64-softmmu,riscv64-linux-user")) + generate_dockerfile("debian-s390x-cross", "debian-11", cross="s390x", trailer=cross_build("s390x-linux-gnu-", From patchwork Mon Jun 26 21:59:16 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: 1800226 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=fY6BUgKC; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhmn4Mq0z20ZQ for ; Tue, 27 Jun 2023 08:08:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFO-0002kV-OF; Mon, 26 Jun 2023 17:59:46 -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 1qDuFK-0002gO-76 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:42 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFE-0004un-FE for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:41 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fa99742be2so14461075e9.1 for ; Mon, 26 Jun 2023 14:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816775; x=1690408775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AouWM1m7VIgcxf/wQ9k/4ktgNJVDqALSrdqBKb0paEY=; b=fY6BUgKC6JbIlKSwRFP4CZsDSYFDw+GCPyGvkhP+csObfxgbiH9l7fBPw6DAMU3HhW pCxsLuYkWdvgaElpn55poamF1PrLHAinrMpr25SWmycaqZHZVEytuG1P8vkjsn+TePrm ZNzksos+pWaIAzbSGDmNlKDW7zyvpo/37oPkoGVEABUE2T6PH1YZ3Ix0B+1jre2Md1BJ 4scqYOFdTnCyhgBG9PoicI0NknlxPF3dIyr4OCIo5/JQ5AbNDKbBQKEEOaRTcaXtAQ23 EOx9ENdGFKZn3vW5jkXFAqBf/3TiJ8FY+agHwsuNEOhxyoM0jyiP4yrx9Ir4G0NAQwev o2nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816775; x=1690408775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AouWM1m7VIgcxf/wQ9k/4ktgNJVDqALSrdqBKb0paEY=; b=fVz05PkyBBPCaK/lJN62KgQrFBUaVeTKREU8k7QATUsQUHO5JYWtt3iS4K8JhME7oZ nplmg9ZIAvneDfcc2jF7dYco++P8nqIIhXVLmnq8pRGUWLJB5InjNsg4zzt4TNrGw2mc KxIGjjR+QxrhTBWNuGybwWISao9xomlYSr9eHsqmd6TXrEYvdyt5TPTRlturghxhptg7 UGzNdGrlRqjcSDcYmtHTpf5xHrC5VfUg0Mr8M5OifXLFNFfPbGk+YtKFRIGQLoywJzm1 ZMZEaDED1cGAnpOVqsZNFatMjVWVN+YR5fTtH/8uJZRYu8z6uXeUqC1AbnizI4dSZWvM ot3g== X-Gm-Message-State: AC+VfDzLzpKtUNgVZCjMXv4EPAC90e6egKNIHpZXNPeLfbyCVEQKtrHX 7P5XOO07gLj4bZLxP2XsyN2fkA== X-Google-Smtp-Source: ACHHUZ6ZPNTyIqHjgsbakmlEpviCQECSa2B8ZaXZZRsPhJhiyE2eWv+PRyW91sp6bQ7kMw2pJBZRNg== X-Received: by 2002:a05:600c:221a:b0:3fb:a1d9:ede8 with SMTP id z26-20020a05600c221a00b003fba1d9ede8mr170099wml.10.1687816775142; Mon, 26 Jun 2023 14:59:35 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s25-20020a7bc399000000b003fa96fe2bebsm3889438wmj.41.2023.06.26.14.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B6F8F1FFC8; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 16/26] tests/avocado: update firmware to enable sbsa-ref/max Date: Mon, 26 Jun 2023 22:59:16 +0100 Message-Id: <20230626215926.2522656-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Marcin Juszkiewicz Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz Message-Id: <20230530152240.79160-1-marcin.juszkiewicz@linaro.org> Signed-off-by: Alex Bennée --- v3 - re-enable for CI --- tests/avocado/machine_aarch64_sbsaref.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index 0a79fa7ab6..cce6ef9f65 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -29,23 +29,23 @@ def fetch_firmware(self): """ Flash volumes generated using: - - Fedora GNU Toolchain version 12.2.1 20220819 (Red Hat Cross 12.2.1-2) + - Fedora GNU Toolchain version 13.1.1 20230511 (Red Hat 13.1.1-2) - Trusted Firmware-A - https://github.com/ARM-software/arm-trusted-firmware/tree/5fdb2e54 + https://github.com/ARM-software/arm-trusted-firmware/tree/c0d8ee38 - Tianocore EDK II - https://github.com/tianocore/edk2/tree/494127613b - https://github.com/tianocore/edk2-non-osi/tree/41876073 - https://github.com/tianocore/edk2-platforms/tree/8efa4f42 + https://github.com/tianocore/edk2/tree/0f9283429dd4 + https://github.com/tianocore/edk2-non-osi/tree/f0bb00937ad6 + https://github.com/tianocore/edk2-platforms/tree/7880b92e2a04 """ # Secure BootRom (TF-A code) fs0_xz_url = ( - "https://fileserver.linaro.org/s/ATnSmq6k8SoXgbH/" + "https://fileserver.linaro.org/s/HrYMCjP7MEccjRP/" "download/SBSA_FLASH0.fd.xz" ) - fs0_xz_hash = "a210a09692bcbe0a3743ffd0df44e80e0c7ad8ab" + fs0_xz_hash = "447eff64a90b84ce47703c6ec41fbfc25befaaea" tar_xz_path = self.fetch_asset(fs0_xz_url, asset_hash=fs0_xz_hash) archive.extract(tar_xz_path, self.workdir) fs0_path = os.path.join(self.workdir, "SBSA_FLASH0.fd") @@ -93,15 +93,15 @@ def test_sbsaref_edk2_firmware(self): # AP Trusted ROM wait_for_console_pattern(self, "Booting Trusted Firmware") - wait_for_console_pattern(self, "BL1: v2.8(release):v2.8") + wait_for_console_pattern(self, "BL1: v2.9(release):v2.9") wait_for_console_pattern(self, "BL1: Booting BL2") # Trusted Boot Firmware - wait_for_console_pattern(self, "BL2: v2.8(release)") + wait_for_console_pattern(self, "BL2: v2.9(release)") wait_for_console_pattern(self, "Booting BL31") # EL3 Runtime Software - wait_for_console_pattern(self, "BL31: v2.8(release)") + wait_for_console_pattern(self, "BL31: v2.9(release)") # Non-trusted Firmware wait_for_console_pattern(self, "UEFI firmware (version 1.0") @@ -136,21 +136,18 @@ def boot_alpine_linux(self, cpu): self.vm.launch() wait_for_console_pattern(self, "Welcome to Alpine Linux 3.17") - @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout") def test_sbsaref_alpine_linux_cortex_a57(self): """ :avocado: tags=cpu:cortex-a57 """ self.boot_alpine_linux("cortex-a57") - @skipUnless(os.getenv("AVOCADO_TIMEOUT_EXPECTED"), "Test might timeout") def test_sbsaref_alpine_linux_neoverse_n1(self): """ :avocado: tags=cpu:max """ self.boot_alpine_linux("neoverse-n1") - @skip("requires TF-A update to handle FEAT_FGT") def test_sbsaref_alpine_linux_max(self): """ :avocado: tags=cpu:max From patchwork Mon Jun 26 21:59:17 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: 1800243 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=z6YiH8NW; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhyr6tK2z20XS for ; Tue, 27 Jun 2023 08:16:52 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuV7-0003Ct-Dm; Mon, 26 Jun 2023 18:16:01 -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 1qDuV1-0003CR-RA for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:15:57 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuUx-00012E-Km for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:15:55 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f875b267d9so5415143e87.1 for ; Mon, 26 Jun 2023 15:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817749; x=1690409749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r0SLBBUL07wM1bf4qZojNfs+h0PIyGvqdOLhswuO9mU=; b=z6YiH8NWTAozvm5MHQaBnu9bEyFkObp40SARlWRfC0gdHTUlOlpbqLjVr6KbM0055o Pjp6Onu7j2tutpMHX3oBsgKBXvvKg5TtPM8pYO5YAlwKgGJyn75KaPu8N0+e5M+1KZvJ 4WKIz2zZtudJMojioBXA420XxrAtGs396JxwFaFmUIa6g2+uTvSQJhCF6e3WAlmMmlTN SC1Kn+5XMqcWMOCYGJEQxmEgr8SWXlmZS5XpR93UprXj3+EVJEACJUfOAWtPdPVboIuA VXk+FwrBuXM83FzPraPw/SqlF2TZRA+SMcBVVS506WA8ZV2sI61jr1snOojI9bInAy4i FYlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817749; x=1690409749; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r0SLBBUL07wM1bf4qZojNfs+h0PIyGvqdOLhswuO9mU=; b=dwEkP3XJJaIXswxwBEAaibUNr9gE24dnfAMDPjoxcV/TtxUq4ZBQtHqS5O1tlasWZU wqIk5sdoAAHCRIaDEhhlA4uj6hWTuZH/I113O57bi/YTp2LVhYWnMYOpfYcD0znB2nj1 LU8R8rnrQBfFFpcEdn/DjwhCgI540qG8PyjqdCTYHxj3+oiNpPRe5sHRydRu6w269vA7 2C3TcQ1dDNnxBwKytGLaYupkABq3ss++My7NUXvaL1SKnEtXcIpC94U82zX2bLHFHkok bLsCVyjRV7TBnjexNPFSU9mvJJ4rE4IJspyF+Hu09zSfVoDuVYpyFChyU63DosD3PG3Q 5ZlQ== X-Gm-Message-State: AC+VfDyo4zP/vsITXz78VesAMEkubDUJXbKkyU6PZEJ3tnFkl33XY9oX ozCFXjJc4WP7ubM0m0CjjCdbBQ== X-Google-Smtp-Source: ACHHUZ4aHJMWvu6GGsGlQsfHojz/Cp67wTkc++GX8Vcd9jLm1kt9so8w4FaDgcJ5yrCL0/C1EzRIjg== X-Received: by 2002:a19:ca58:0:b0:4f8:b349:6938 with SMTP id h24-20020a19ca58000000b004f8b3496938mr10742697lfj.65.1687817749077; Mon, 26 Jun 2023 15:15:49 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h10-20020a5d504a000000b00313e8dc7facsm6692504wrt.116.2023.06.26.15.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:15:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E0ECD1FFC9; Mon, 26 Jun 2023 22:59:28 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier , Robert Henry , Aaron Lindsay Subject: [PATCH v2 17/26] plugins: force slow path when plugins instrument memory ops Date: Mon, 26 Jun 2023 22:59:17 +0100 Message-Id: <20230626215926.2522656-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x130.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The lack of SVE memory instrumentation has been an omission in plugin handling since it was introduced. Fortunately we can utilise the probe_* functions to force all all memory access to follow the slow path. We do this by checking the access type and presence of plugin memory callbacks and if set return the TLB_MMIO flag. We have to jump through a few hoops in user mode to re-use the flag but it was the desired effect: ./qemu-system-aarch64 -display none -serial mon:stdio \ -M virt -cpu max -semihosting-config enable=on \ -kernel ./tests/tcg/aarch64-softmmu/memory-sve \ -plugin ./contrib/plugins/libexeclog.so,ifilter=st1w,afilter=0x40001808 -d plugin gives (disas doesn't currently understand st1w): 0, 0x40001808, 0xe54342a0, ".byte 0xa0, 0x42, 0x43, 0xe5", store, 0x40213010, RAM, store, 0x40213014, RAM, store, 0x40213018, RAM And for user-mode: ./qemu-aarch64 \ -plugin contrib/plugins/libexeclog.so,afilter=0x4007c0 \ -d plugin \ ./tests/tcg/aarch64-linux-user/sha512-sve gives: 1..10 ok 1 - do_test(&tests[i]) 0, 0x4007c0, 0xa4004b80, ".byte 0x80, 0x4b, 0x00, 0xa4", load, 0x5500800370, load, 0x5500800371, load, 0x5500800372, load, 0x5500800373, load, 0x5500800374, load, 0x5500800375, load, 0x5500800376, load, 0x5500800377, load, 0x5500800378, load, 0x5500800379, load, 0x550080037a, load, 0x550080037b, load, 0x550080037c, load, 0x550080037d, load, 0x550080037e, load, 0x550080037f, load, 0x5500800380, load, 0x5500800381, load, 0x5500800382, load, 0x5500800383, load, 0x5500800384, load, 0x5500800385, load, 0x5500800386, lo ad, 0x5500800387, load, 0x5500800388, load, 0x5500800389, load, 0x550080038a, load, 0x550080038b, load, 0x550080038c, load, 0x550080038d, load, 0x550080038e, load, 0x550080038f, load, 0x5500800390, load, 0x5500800391, load, 0x5500800392, load, 0x5500800393, load, 0x5500800394, load, 0x5500800395, load, 0x5500800396, load, 0x5500800397, load, 0x5500800398, load, 0x5500800399, load, 0x550080039a, load, 0x550080039b, load, 0x550080039c, load, 0x550080039d, load, 0x550080039e, load, 0x550080039f, load, 0x55008003a0, load, 0x55008003a1, load, 0x55008003a2, load, 0x55008003a3, load, 0x55008003a4, load, 0x55008003a5, load, 0x55008003a6, load, 0x55008003a7, load, 0x55008003a8, load, 0x55008003a9, load, 0x55008003aa, load, 0x55008003ab, load, 0x55008003ac, load, 0x55008003ad, load, 0x55008003ae, load, 0x55008003af (4007c0 is the ld1b in the sha512-sve) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: Robert Henry Cc: Aaron Lindsay --- v2 - allow TLB_MMIO to appear in user-mode probe_access --- include/exec/cpu-all.h | 2 +- include/hw/core/cpu.h | 17 +++++++++++++++++ accel/tcg/cputlb.c | 4 +++- accel/tcg/user-exec.c | 8 ++++++-- target/arm/tcg/sve_helper.c | 4 ---- tests/tcg/aarch64/Makefile.target | 8 ++++++++ 6 files changed, 35 insertions(+), 8 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 09bf4c0cc6..2b10173c61 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -301,7 +301,7 @@ CPUArchState *cpu_copy(CPUArchState *env); * be signaled by probe_access_flags(). */ #define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) -#define TLB_MMIO 0 +#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) #define TLB_WATCHPOINT 0 #else diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 3b765beb9b..a4405a6dd6 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -981,6 +981,23 @@ void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); void cpu_watchpoint_remove_all(CPUState *cpu, int mask); #endif +/** + * cpu_plugin_mem_cbs_enabled() - are plugin memory callbacks enabled? + * @cs: CPUState pointer + * + * The memory callbacks are installed if a plugin has instrumented an + * instruction for memory. This can be useful to know if you want to + * force a slow path for a series of memory accesses. + */ +static inline bool cpu_plugin_mem_cbs_enabled(const CPUState *cpu) +{ +#ifdef CONFIG_PLUGIN + return !!cpu->plugin_mem_cbs; +#else + return false; +#endif +} + /** * cpu_get_address_space: * @cpu: CPU to get address space from diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 14ce97c33b..e2888a7e7a 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1544,7 +1544,9 @@ static int probe_access_internal(CPUArchState *env, target_ulong addr, *pfull = &env_tlb(env)->d[mmu_idx].fulltlb[index]; /* Fold all "mmio-like" bits into TLB_MMIO. This is not RAM. */ - if (unlikely(flags & ~(TLB_WATCHPOINT | TLB_NOTDIRTY))) { + if (unlikely(flags & ~(TLB_WATCHPOINT | TLB_NOTDIRTY)) + || + (access_type != MMU_INST_FETCH && cpu_plugin_mem_cbs_enabled(env_cpu(env)))) { *phost = NULL; return TLB_MMIO; } diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index dc8d6b5d40..6944115d2d 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -745,6 +745,10 @@ static int probe_access_internal(CPUArchState *env, target_ulong addr, if (guest_addr_valid_untagged(addr)) { int page_flags = page_get_flags(addr); if (page_flags & acc_flag) { + if ((acc_flag == PAGE_READ || acc_flag == PAGE_WRITE) + && cpu_plugin_mem_cbs_enabled(env_cpu(env))) { + return TLB_MMIO; + } return 0; /* success */ } maperr = !(page_flags & PAGE_VALID); @@ -767,7 +771,7 @@ int probe_access_flags(CPUArchState *env, target_ulong addr, int size, g_assert(-(addr | TARGET_PAGE_MASK) >= size); flags = probe_access_internal(env, addr, size, access_type, nonfault, ra); - *phost = flags ? NULL : g2h(env_cpu(env), addr); + *phost = (flags & TLB_INVALID_MASK) ? NULL : g2h(env_cpu(env), addr); return flags; } @@ -778,7 +782,7 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size, g_assert(-(addr | TARGET_PAGE_MASK) >= size); flags = probe_access_internal(env, addr, size, access_type, false, ra); - g_assert(flags == 0); + g_assert((flags & ~TLB_MMIO) == 0); return size ? g2h(env_cpu(env), addr) : NULL; } diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index 0097522470..7c103fc9f7 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -5688,9 +5688,6 @@ void sve_ldN_r(CPUARMState *env, uint64_t *vg, const target_ulong addr, flags = info.page[0].flags | info.page[1].flags; if (unlikely(flags != 0)) { -#ifdef CONFIG_USER_ONLY - g_assert_not_reached(); -#else /* * At least one page includes MMIO. * Any bus operation can fail with cpu_transaction_failed, @@ -5727,7 +5724,6 @@ void sve_ldN_r(CPUARMState *env, uint64_t *vg, const target_ulong addr, memcpy(&env->vfp.zregs[(rd + i) & 31], &scratch[i], reg_max); } return; -#endif } /* The entire operation is in RAM, on valid pages. */ diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target index 3430fd3cd8..cec1d4b287 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -91,6 +91,14 @@ sha512-vector: sha512.c TESTS += sha512-vector +ifneq ($(CROSS_CC_HAS_SVE),) +sha512-sve: CFLAGS=-O3 -march=armv8.1-a+sve +sha512-sve: sha512.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + +TESTS += sha512-sve +endif + ifeq ($(HOST_GDB_SUPPORTS_ARCH),y) GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py From patchwork Mon Jun 26 21:59:18 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: 1800235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FNFfLS0K; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhpD6YfJz20ZQ for ; Tue, 27 Jun 2023 08:09:24 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuMU-0004hs-Kn; Mon, 26 Jun 2023 18:07:06 -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 1qDuLP-0003BV-0g for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:02 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLK-00071y-CZ for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:58 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f9b4a71623so36859415e9.1 for ; Mon, 26 Jun 2023 15:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817152; x=1690409152; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=11KGvl02MUnRlabivlCyzSFcj3NOwo4O5qJ7ZZfB8KY=; b=FNFfLS0Kh7bJQR06kiismpZVGHURNbbKbVUNbAVOprZzBxgE9aKFC9DosLTEzYmOWB bicOATZGoNwacClLJGj82aadnzjfEWr+uJV/0a29+8nQp1LtIowVO0+uTJ3WELPFlzXI /CDhbZUkLW2eFUp5q6o2a1WQYEUDfjxk9EkDXR7CFA8TE9Fa1WJrMJB40Bj4t+AhSBBf 1OuMd3Ed1nx1RPth3HWqrh1Ghcz6fyE25BhWmCJJGNCj3e5ext+DW1riizIl2PpZcBzU bE4qvCWsJcPRY31vFyEdKxSZgbT5i4dGp/RVnjGF76wiSpNE0myZkUY6+B4ua6k1EJ+E nQ9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817152; x=1690409152; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=11KGvl02MUnRlabivlCyzSFcj3NOwo4O5qJ7ZZfB8KY=; b=jWcV/NNQRCDSyPPzMDqtlOiNVX5B6nA5flJrjIX13BdTMYfTlbuZE0Z84wBN77MLa5 UpYuU/laBwYtOtdmP0EO0ysEAmyRQ13ModaUuaVM42+I9xq5W31UDyr9iXeSGya/jU6h 8zNIFDlbY8dD1cWh3yA+cmRCq5bJ8xwQZW9ShnmgJTTd5oVzSG5F4hvz6Qv5rR2GzuAp q3b2jW8QbulQw+jFiK7XGaVSymDGCYzqdThIdsJQfpoiiXK9vGWFxqO0tgLgDUKFzn5e UdYJ4sPJv1+083Tv1jD6Uw865CWUXzBIubJst7SfkM5gHOSjgaI+ynZh5N4+I+EApfS6 +5eg== X-Gm-Message-State: AC+VfDwYuBpiRp89pZLQJJuBcg6XtG1g10rm3HIJU6I/QqcFDpZxpNwh ud3a0u3DmqWE941pwd91a1XkuA== X-Google-Smtp-Source: ACHHUZ7IFHIvC14LKq8pUAdS3IG3rm8wrynv17LCE6yT/RaPXfQMHWAP7T7ZHOWRDtrjR0tlWlMFxg== X-Received: by 2002:a1c:721a:0:b0:3f9:c19:dfbd with SMTP id n26-20020a1c721a000000b003f90c19dfbdmr16130029wmc.0.1687817151817; Mon, 26 Jun 2023 15:05:51 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n2-20020a05600c294200b003fa78d1055esm8799597wmd.21.2023.06.26.15.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 20A0B1FFCA; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 18/26] plugins: fix memory leak while parsing options Date: Mon, 26 Jun 2023 22:59:18 +0100 Message-Id: <20230626215926.2522656-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It was hard to track down this leak as it was an internal allocation by glib and the backtraces did not give much away. The autofree was freeing the allocation with g_free() but not taking care of the individual strings. They should have been freed with g_strfreev() instead. Searching the glib source code for the correct string free function led to: G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL) and indeed if you read to the bottom of the documentation page you will find: typedef gchar** GStrv; A typedef alias for gchar**. This is mostly useful when used together with g_auto(). So fix up all the g_autofree g_strsplit case that smugly thought they had de-allocation covered. Reviewed-by: Richard Henderson Message-Id: <20230623122100.1640995-20-alex.bennee@linaro.org> Message-Id: <20230519170454.2353945-3-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- 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 | 2 +- tests/plugin/bb.c | 2 +- tests/plugin/insn.c | 2 +- tests/plugin/mem.c | 2 +- tests/plugin/syscall.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 2e25184a7f..5036213f1b 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -772,7 +772,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, for (i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "iblksize") == 0) { l1_iblksize = STRTOLL(tokens[1]); diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index b4a855adaf..686ae0a537 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -148,7 +148,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { for (int i = 0; i < argc; i++) { - g_autofree char **tokens = g_strsplit(argv[i], "=", 2); + g_auto(GStrv) tokens = g_strsplit(argv[i], "=", 2); if (g_strcmp0(tokens[0], "filename") == 0) { file_name = g_strdup(tokens[1]); } diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index e255bd21fd..7129d526f8 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -227,7 +227,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (int i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "ifilter") == 0) { parse_insn_match(tokens[1]); } else if (g_strcmp0(tokens[0], "afilter") == 0) { diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 062200a7a4..6b74d25fea 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -135,7 +135,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, { for (int i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "inline") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { fprintf(stderr, "boolean argument parsing failed: %s\n", opt); diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 0d12910af6..8316ae50c7 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -169,7 +169,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, for (i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", -1); + g_auto(GStrv) tokens = g_strsplit(opt, "=", -1); if (g_strcmp0(tokens[0], "sortby") == 0) { if (g_strcmp0(tokens[1], "reads") == 0) { diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 4a5ec3d936..0ed01ea931 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -333,7 +333,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (i = 0; i < argc; i++) { char *p = argv[i]; - g_autofree char **tokens = g_strsplit(p, "=", -1); + g_auto(GStrv) tokens = g_strsplit(p, "=", -1); if (g_strcmp0(tokens[0], "inline") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { fprintf(stderr, "boolean argument parsing failed: %s\n", p); diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 691d4edb0c..739ac0c66b 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -263,7 +263,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, for (i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "track") == 0) { if (g_strcmp0(tokens[1], "read") == 0) { diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index a41ffe83fa..e36f0b9562 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -323,7 +323,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (i = 0; i < argc; i++) { char *p = argv[i]; - g_autofree char **tokens = g_strsplit(p, "=", 2); + g_auto(GStrv) tokens = g_strsplit(p, "=", 2); if (g_strcmp0(tokens[0], "verbose") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &verbose)) { diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index 7d470a1011..df50d1fd3b 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,7 +104,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "inline") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { fprintf(stderr, "boolean argument parsing failed: %s\n", opt); diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index cd5ea5d4ae..e251a84d86 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -196,7 +196,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, { for (int i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "inline") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { fprintf(stderr, "boolean argument parsing failed: %s\n", opt); diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c index 4570f7d815..f3b9f696a0 100644 --- a/tests/plugin/mem.c +++ b/tests/plugin/mem.c @@ -83,7 +83,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (int i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "haddr") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_haddr)) { diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 96040c578f..72e1a5bf90 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c @@ -121,7 +121,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, for (int i = 0; i < argc; i++) { char *opt = argv[i]; - g_autofree char **tokens = g_strsplit(opt, "=", 2); + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "print") == 0) { if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_print)) { From patchwork Mon Jun 26 21:59:19 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: 1800221 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=I7E8Pre1; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhkx0pPqz20ZQ for ; Tue, 27 Jun 2023 08:06:33 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuFO-0002jo-2p; Mon, 26 Jun 2023 17:59:46 -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 1qDuFI-0002dn-Jh for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:40 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuFD-0004u9-L6 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 17:59:40 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-313e742a787so2019502f8f.1 for ; Mon, 26 Jun 2023 14:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687816774; x=1690408774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1/YdtjXXo0e3CzVmNtcCXnVaZZ7ekw+aGjDVemCbNnQ=; b=I7E8Pre15es8TOJfJ8KyIvALf9qJfOa+MHJW9yHzib485/MFM1BgPQbkuC1mjnONcW aETVXRTWZFT/d1Ho5nVtAHDhLCNhBZwYGOLa4mMPzj994XDkAG7wc/V1JoNfNsODJiK8 OnygqkjnB5Tjeuj8jDhKqZX4CpXSmlAfN4SfHVXDrUD+qVh3LhL+sEBbEaF6N5JmRNiV LmK7THYimzxVLD1KUqIBqTIloLBMI0EjhaC2t52Mj1HvTmX+dwfc7/e6bL2qCB5ui0Hu IpYBijvSEgNZ82eYYs16WgBDCTL6Is1/swSAwTI3EH6O1FO5MydJplMm2ABzho+zs+G7 cktQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687816774; x=1690408774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1/YdtjXXo0e3CzVmNtcCXnVaZZ7ekw+aGjDVemCbNnQ=; b=W86flBN44j3gbbrRoT0CAHVclH9EjiePdlQELlixmN9KjZGasnyzByW5548vQgWbBR c5a2mHxJU8/CJ8+f81v0kXjKeIVKNNd6Zo5enGntuqnCSeM9xmBQYEIzjzOPAxf/P00q H4HXqDXrpDsN7z1AE0EQxK1gSgAjE+wjwmBfGkFcKa3zSjmcOmZ+GYLvGz21snR6HvQb XfJiqGdQgqycfVSiE50d/Lw2qULXLm8wDYz7BRl9yZmOmR4qYTXz2Q8fe4aDpAkTLIxi ORphlCHJ6I/BNzaer0iJXYvZnzaKuD8aw0KwJY3TVolWBlN7c2iMNMrvWXCF29HoaAnj PKfQ== X-Gm-Message-State: AC+VfDyJZFBqHV+XWpJWvp0mo059roeX9Yi9EYvRqEAgkxoWnlvoXpld 2w/m/mHYg33+wqA6q+kLvlu0Dw== X-Google-Smtp-Source: ACHHUZ5R6UChdvwddCv4W9OXe00jGjvSGG0bjvW2eiMLWCg5aPFhYLH+/IcEsZr73Ab8A4zYM2rPCQ== X-Received: by 2002:a5d:428e:0:b0:311:360e:ea3a with SMTP id k14-20020a5d428e000000b00311360eea3amr22828082wrq.34.1687816774274; Mon, 26 Jun 2023 14:59:34 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id s8-20020adff808000000b00313e23edbd5sm8053448wrp.102.2023.06.26.14.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 14:59:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 39F781FFBE; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 19/26] plugins: update lockstep to use g_memdup2 Date: Mon, 26 Jun 2023 22:59:19 +0100 Message-Id: <20230626215926.2522656-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The old g_memdup is deprecated, use the replacement. Message-Id: <20230623122100.1640995-21-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index e36f0b9562..3614c3564c 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -130,7 +130,7 @@ static void report_divergance(ExecState *us, ExecState *them) } } divergence_log = g_slist_prepend(divergence_log, - g_memdup(&divrec, sizeof(divrec))); + g_memdup2(&divrec, sizeof(divrec))); /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { From patchwork Mon Jun 26 21:59:20 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: 1800232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CpkZZ0CK; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhnM2Qcsz20b0 for ; Tue, 27 Jun 2023 08:08:38 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuLi-0003WB-1z; Mon, 26 Jun 2023 18:06:25 -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 1qDuLL-0003B3-VR for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:02 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLH-000711-As for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:55 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f9bece8e19so59491445e9.1 for ; Mon, 26 Jun 2023 15:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zOww9rbYnTUV82Nt8luSAT3uGVvZz6IBM9I4dizL0VQ=; b=CpkZZ0CKU8Y+Kgdy29V40D9fpialqs9DGS75Oea7uipjHWC0mEMCs0yUl4OJl6iGl8 17ktNqlW44ICSP9a6csLe/GyZ3VMPk0Troi0LStvCxUOuGTS73RwJ2RVVtmIB4xLSq0N sbbR1+3MolhJunBP1YiVWGFYEhIGCeOsqRNOLL00vrIS9UiWui111IMpITWm4AdylRa5 O0YBrHTRVbCCbL8+W+TWGhrtbPmS70vO2b9LxOoSTC9tnhWMZLFqw02d0HFLFOJPyGbb kAl/4l7q7tHYztH/sG6QFYB9v2KAL4B0fxW9FvSJx75+e4/c9Y17O3xWAZ1HOOMpe2KW lFuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zOww9rbYnTUV82Nt8luSAT3uGVvZz6IBM9I4dizL0VQ=; b=Xe7yfxO8JunsDrgGT4oxSZWIW/9UFvxLtHfyV4vkDVI7bfWLA1OspwwMX00hx/8vnf avT27Amv1nlQqiO8eBAIt77iszOslQXPyi1JjxiEgk/7I7RcV916hpzZ232on3dgfkTa CUfVVRH5fJffxNBB9/xLGnf5naVxGasEBK5K2/ajN/qWYMUYLiDEQ4FO4x0VCOttGzHS QBrByIEwSmtyq/c2WlrmLZ5PdC4xoWvrv6JUa+fIjQqZoDLAwRldrm3nOdypIyUVGxFd DGSS7O+N2e35XEn2zKKbjNs4aHq4Jjg0LvDEPRhEbgFzejxAf3M+uwDNn9aPL+Ywi1bP pkyg== X-Gm-Message-State: AC+VfDzs6UDw7rPZvTOru8K/D4ZghNhjfBbkWvWBJ3hKULd8UNbXe72q VMCMOQgmVV86Nu6GPyipGguaUA== X-Google-Smtp-Source: ACHHUZ6abYZhOsMJt33EE6iHT4AZmQVYk1hPldQaJmFQaIOREfuztc9xkfqfoXOLEh29uaQvqjXPAQ== X-Received: by 2002:adf:db47:0:b0:313:f084:2ecb with SMTP id f7-20020adfdb47000000b00313f0842ecbmr5038461wrj.52.1687817149131; Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b3-20020a056000054300b002c70ce264bfsm8543321wrf.76.2023.06.26.15.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5A95B1FFCB; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 20/26] docs/devel: add some front matter to the devel index Date: Mon, 26 Jun 2023 22:59:20 +0100 Message-Id: <20230626215926.2522656-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Give an overview of the most useful bits of the devel documentation to read depending on what the developer wants to do. Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-2-alex.bennee@linaro.org> --- v2 - removed excessive start --- docs/devel/index-process.rst | 2 ++ docs/devel/index-tcg.rst | 2 ++ docs/devel/index.rst | 24 ++++++++++++++++++++++-- docs/devel/tcg.rst | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/devel/index-process.rst b/docs/devel/index-process.rst index d50dd74c3e..362f97ee30 100644 --- a/docs/devel/index-process.rst +++ b/docs/devel/index-process.rst @@ -1,3 +1,5 @@ +.. _development_process: + QEMU Community Processes ------------------------ diff --git a/docs/devel/index-tcg.rst b/docs/devel/index-tcg.rst index b44ff8b5a4..a992844e5c 100644 --- a/docs/devel/index-tcg.rst +++ b/docs/devel/index-tcg.rst @@ -1,3 +1,5 @@ +.. _tcg: + TCG Emulation ------------- diff --git a/docs/devel/index.rst b/docs/devel/index.rst index 09cfb322be..abf60457c2 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -2,10 +2,30 @@ Developer Information --------------------- -This section of the manual documents various parts of the internals of QEMU. -You only need to read it if you are interested in reading or +This section of the manual documents various parts of the internals of +QEMU. You only need to read it if you are interested in reading or modifying QEMU's source code. +QEMU is a large and mature project with a number of complex subsystems +that can be overwhelming to understand. The development documentation +is not comprehensive but hopefully presents enough to get you started. +If there are areas that are unclear please reach out either via the +IRC channel or mailing list and hopefully we can improve the +documentation for future developers. + +All developers will want to familiarise themselves with +:ref:`development_process` and how the community interacts. Please pay +particular attention to the :ref:`coding-style` and +:ref:`submitting-a-patch` sections to avoid common pitfalls. + +If you wish to implement a new hardware model you will want to read +through the :ref:`qom` documentation to understand how QEMU's object +model works. + +Those wishing to enhance or add new CPU emulation capabilities will +want to read our :ref:`tcg` documentation, especially the overview of +the :ref:`tcg_internals`. + .. toctree:: :maxdepth: 1 diff --git a/docs/devel/tcg.rst b/docs/devel/tcg.rst index b4096a17df..2786f2f679 100644 --- a/docs/devel/tcg.rst +++ b/docs/devel/tcg.rst @@ -1,3 +1,5 @@ +.. _tcg_internals: + ==================== Translator Internals ==================== From patchwork Mon Jun 26 21:59:21 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: 1800242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GaoLL0Av; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhq43bDDz20b0 for ; Tue, 27 Jun 2023 08:10:08 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuMK-0003z2-87; Mon, 26 Jun 2023 18:06:56 -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 1qDuLN-0003BN-8I for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:04 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLJ-00071r-Cu for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:56 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-313e68e99c7so3466430f8f.1 for ; Mon, 26 Jun 2023 15:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817151; x=1690409151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/lZ58MHVs7VVcDhLDA+codKww1SNsRkU8Vn2ofdw4A8=; b=GaoLL0Av24FtXSfp1pDXtwYtHpzcPpIef97X4uobrcSHzsML1boLPKxWYeqUdHXEVw iUSXlF7V8UpZjO51vxa3nPuc8qywonSsTOYa/6wgnWBj5t0lpmk9nstj6MvXj5eZU92e TcTcpS7mOMrBSbyUucmQAneK/m75ZBntPrji8qqoAUbaFe7Dpx9qph0S2yeYqdzwDjBa C/cvGHK/m77xnyRaEwvAzYg/Lu6d2AFk+W8uzFHcmYH9FN/hI79vnouXxwv/RuvwmzLU +T2okMMxTRKEWS1BHsfRh1kuxWywJhf96Augt3H4ql6J48faqbOphnjFUeKrZpfQPMFt A33A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817151; x=1690409151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/lZ58MHVs7VVcDhLDA+codKww1SNsRkU8Vn2ofdw4A8=; b=VHanD11HFSTHcV5m2eia2y2/UdIMIuiRXUT3olSnh7aygj8XijJWnrr0EE2+RAt0U2 yspv4lh+5POGkgYh1e9x00B9hn9abj36dQV7FaIGuD92CBkWxXziAXu9dbGGdSZTeuj2 Dz+bCY1pDoVi34QT/8GG05RxBmlbQD7kEPybhA5JgdCjDRb2JFXxRJNH11nmEmWTaLvx eCCWEV155UFlbvmzk277JSNW53ul2hci15RGQeS1+mBvClbPawxMYhv3cBBaT17JsMXW l4HQCtr9TY7bR2Pj2YvAIpA9KweMl1uLFzKLKOtjZo46HmelzkQOMPkA1i/Tdk88jypf 2qRQ== X-Gm-Message-State: AC+VfDyz+6arzjgzgNphkApQ4t2NvRXlel3hYbCXjCnjtAj+8PqZDFgL 3AUCrnk/50/SNcXK1oBwNyT8gg== X-Google-Smtp-Source: ACHHUZ46vPtCXTrmB7xGGeOqCcYwyJaYdRK6vqHi8/6xYhQfECY6cVyBUCht8WISIku2eGi8XpwjJA== X-Received: by 2002:a05:6000:1949:b0:313:e161:d013 with SMTP id e9-20020a056000194900b00313e161d013mr6253303wry.15.1687817151622; Mon, 26 Jun 2023 15:05:51 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n1-20020a5d4c41000000b0030ae499da59sm8423516wrt.111.2023.06.26.15.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 73D7E1FFCC; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 21/26] include/migration: mark vmstate_register() as a legacy function Date: Mon, 26 Jun 2023 22:59:21 +0100 Message-Id: <20230626215926.2522656-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Mention that QOM-ified devices already have support for registering the description. Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Peter Xu Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-3-alex.bennee@linaro.org> --- include/migration/vmstate.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 084f5e784a..35579b2c1f 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -1209,7 +1209,14 @@ int vmstate_register_with_alias_id(VMStateIf *obj, uint32_t instance_id, int required_for_version, Error **errp); -/* Returns: 0 on success, -1 on failure */ +/** + * vmstate_register() - legacy function to register state serialisation description + * + * New code shouldn't be using this function as QOM-ified devices have + * dc->vmsd to store the serialisation description. + * + * Returns: 0 on success, -1 on failure + */ static inline int vmstate_register(VMStateIf *obj, int instance_id, const VMStateDescription *vmsd, void *opaque) From patchwork Mon Jun 26 21:59:22 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: 1800238 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=spjoV6bN; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhpM4Mnfz20b0 for ; Tue, 27 Jun 2023 08:09:31 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuMM-0004DI-Og; Mon, 26 Jun 2023 18:06:58 -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 1qDuLK-00039O-Kp for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:57 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLG-00070x-MO for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:53 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-307d20548adso3504575f8f.0 for ; Mon, 26 Jun 2023 15:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TbjDA6/5bOs3H7Ssf20nW03+FRXs+W/n1dbicENLHRc=; b=spjoV6bNfxMsUcg2BzBon78rrkZJiGiF4n5Q5CfiKWidNtKB4Axty8GqBTxhjSoym/ K1UgR02/o4oi10EhHxFWZm3mPgqZ4XjX2w+WfRByoGwloUyKICYtHgIkLsvFlasytA50 4q+8Izs/dUWvD/vJ8JqIpQxLGkreuDhrbYQvJzNq7B7GVVB7A/dJfN4mFp54S+RvcQnj 7lg/Ng540bqhWBZd3FwJcLEtU5nIaXQ0dNww57x7sVS00XdCUdwuFvDOi/90QC/KgTO7 2kXjLhboRr/FWynSyL0zB6kJaG3w0jDXYth29p/BYmj2OMqsqZGuaF850PBE5d1RMPOe sqfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TbjDA6/5bOs3H7Ssf20nW03+FRXs+W/n1dbicENLHRc=; b=Foj/EDaGRs/3RFfwEhrVHVHv59mvdo6lICNVYNi57gDuSJkuXbAUJOrf9isJELnfb5 weB0to64MvW6agmYb6VxNKm7kxVj3tHd8a4bdXtofvP/qnXk/I14tuPi3M2DtLKPnKyh iuriM4tNkC3SrpZVq/kG75SN/Wv3UPU7c7sHb7vlxhh66ahgJWvuSinlz7BuavKlrRO5 jxKUe/JgdGse+I9W6RLidq+RElqu+qTxOnFMiI4mwy+PuZwQOZm7gPHkrq90uSxXjBsA vjB1WlfT28nFW5AM9/uEL5Zf+t/lEuzxSDFny7ToVgrQEtml0l0uuXfMOdBrPme4x+7V lItQ== X-Gm-Message-State: AC+VfDwL9epodND6Tjt9g8ddxaWjdurTy2aTzYXzr7GI574F5LrJaEdd 9TJhX2H9aMxkbY6A55DYk8vJ5w== X-Google-Smtp-Source: ACHHUZ7+KxtOBhY1NhX+7p0y1EaguOgLt9OHB52M3gis3DXU0K8fZGb70ENbaRtLLeeDx8Ir0mzu6A== X-Received: by 2002:a5d:4a4b:0:b0:30f:bfc5:2f0f with SMTP id v11-20020a5d4a4b000000b0030fbfc52f0fmr20766686wrs.53.1687817148907; Mon, 26 Jun 2023 15:05:48 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t4-20020a5d5344000000b0030aee3da084sm8562365wrv.49.2023.06.26.15.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9090A1FFBF; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 22/26] include/hw/qdev-core: fixup kerneldoc annotations Date: Mon, 26 Jun 2023 22:59:22 +0100 Message-Id: <20230626215926.2522656-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Fix up the kerneldoc markup and start documenting the various fields in QDEV related structures. This involved: - moving overall description to a DOC: comment at top - fixing various markup issues for types and structures - adding missing Return: statements - adding some typedefs to hide QLIST macros in headers Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-4-alex.bennee@linaro.org> --- include/hw/qdev-core.h | 365 ++++++++++++++++++++++++++++------------- 1 file changed, 252 insertions(+), 113 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index f1070d6dc7..ef2b48db84 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -10,6 +10,65 @@ #include "hw/hotplug.h" #include "hw/resettable.h" +/** + * DOC: The QEMU Device API + * + * All modern devices should represented as a derived QOM class of + * TYPE_DEVICE. The device API introduces the additional methods of + * @realize and @unrealize to represent additional stages in a device + * objects life cycle. + * + * Realization + * ----------- + * + * Devices are constructed in two stages: + * + * 1) object instantiation via object_initialize() and + * 2) device realization via the #DeviceState.realized property + * + * The former may not fail (and must not abort or exit, since it is called + * during device introspection already), and the latter may return error + * information to the caller and must be re-entrant. + * Trivial field initializations should go into #TypeInfo.instance_init. + * Operations depending on @props static properties should go into @realize. + * After successful realization, setting static properties will fail. + * + * As an interim step, the #DeviceState.realized property can also be + * set with qdev_realize(). In the future, devices will propagate this + * state change to their children and along busses they expose. The + * point in time will be deferred to machine creation, so that values + * set in @realize will not be introspectable beforehand. Therefore + * devices must not create children during @realize; they should + * initialize them via object_initialize() in their own + * #TypeInfo.instance_init and forward the realization events + * appropriately. + * + * Any type may override the @realize and/or @unrealize callbacks but needs + * to call the parent type's implementation if keeping their functionality + * is desired. Refer to QOM documentation for further discussion and examples. + * + * .. note:: + * Since TYPE_DEVICE doesn't implement @realize and @unrealize, types + * derived directly from it need not call their parent's @realize and + * @unrealize. For other types consult the documentation and + * implementation of the respective parent types. + * + * Hiding a device + * --------------- + * + * To hide a device, a DeviceListener function hide_device() needs to + * be registered. It can be used to defer adding a device and + * therefore hide it from the guest. The handler registering to this + * DeviceListener can save the QOpts passed to it for re-using it + * later. It must return if it wants the device to be hidden or + * visible. When the handler function decides the device shall be + * visible it will be added with qdev_device_add() and realized as any + * other device. Otherwise qdev_device_add() will return early without + * adding the device. The guest will not see a "hidden" device until + * it was marked visible and qdev_device_add called again. + * + */ + enum { DEV_NVECTORS_UNSPECIFIED = -1, }; @@ -38,7 +97,7 @@ typedef void (*BusRealize)(BusState *bus, Error **errp); typedef void (*BusUnrealize)(BusState *bus); /** - * DeviceClass: + * struct DeviceClass - The base class for all devices. * @props: Properties accessing state fields. * @realize: Callback function invoked when the #DeviceState:realized * property is changed to %true. @@ -47,72 +106,36 @@ typedef void (*BusUnrealize)(BusState *bus); * @hotpluggable: indicates if #DeviceClass is hotpluggable, available * as readonly "hotpluggable" property of #DeviceState instance * - * # Realization # - * Devices are constructed in two stages, - * 1) object instantiation via object_initialize() and - * 2) device realization via #DeviceState:realized property. - * The former may not fail (and must not abort or exit, since it is called - * during device introspection already), and the latter may return error - * information to the caller and must be re-entrant. - * Trivial field initializations should go into #TypeInfo.instance_init. - * Operations depending on @props static properties should go into @realize. - * After successful realization, setting static properties will fail. - * - * As an interim step, the #DeviceState:realized property can also be - * set with qdev_realize(). - * In the future, devices will propagate this state change to their children - * and along busses they expose. - * The point in time will be deferred to machine creation, so that values - * set in @realize will not be introspectable beforehand. Therefore devices - * must not create children during @realize; they should initialize them via - * object_initialize() in their own #TypeInfo.instance_init and forward the - * realization events appropriately. - * - * Any type may override the @realize and/or @unrealize callbacks but needs - * to call the parent type's implementation if keeping their functionality - * is desired. Refer to QOM documentation for further discussion and examples. - * - * - * - * Since TYPE_DEVICE doesn't implement @realize and @unrealize, types - * derived directly from it need not call their parent's @realize and - * @unrealize. - * For other types consult the documentation and implementation of the - * respective parent types. - * - * - * - * # Hiding a device # - * To hide a device, a DeviceListener function hide_device() needs to - * be registered. - * It can be used to defer adding a device and therefore hide it from - * the guest. The handler registering to this DeviceListener can save - * the QOpts passed to it for re-using it later. It must return if it - * wants the device to be hidden or visible. When the handler function - * decides the device shall be visible it will be added with - * qdev_device_add() and realized as any other device. Otherwise - * qdev_device_add() will return early without adding the device. The - * guest will not see a "hidden" device until it was marked visible - * and qdev_device_add called again. - * */ struct DeviceClass { - /*< private >*/ + /* private: */ ObjectClass parent_class; - /*< public >*/ + /* public: */ + /** + * @categories: device categories device belongs to + */ DECLARE_BITMAP(categories, DEVICE_CATEGORY_MAX); + /** + * @fw_name: name used to identify device to firmware interfaces + */ const char *fw_name; + /** + * @desc: human readable description of device + */ const char *desc; - /* - * The underscore at the end ensures a compile-time error if someone - * assigns to dc->props instead of using device_class_set_props. + /** + * @props_: properties associated with device, should only be + * assigned by using device_class_set_props(). The underscore + * ensures a compile-time error if someone attempts to assign + * dc->props directly. */ Property *props_; - /* - * Can this device be instantiated with -device / device_add? + /** + * @user_creatable: Can user instantiate with -device / device_add? + * * All devices should support instantiation with device_add, and * this flag should not exist. But we're not there, yet. Some * devices fail to instantiate with cryptic error messages. @@ -120,25 +143,35 @@ struct DeviceClass { * behavior would be cruel; clearing this flag will protect them. * It should never be cleared without a comment explaining why it * is cleared. + * * TODO remove once we're there */ bool user_creatable; bool hotpluggable; /* callbacks */ - /* - * Reset method here is deprecated and replaced by methods in the - * resettable class interface to implement a multi-phase reset. + /** + * @reset: deprecated device reset method pointer + * + * Modern code should use the ResettableClass interface to + * implement a multi-phase reset. + * * TODO: remove once every reset callback is unused */ DeviceReset reset; DeviceRealize realize; DeviceUnrealize unrealize; - /* device state */ + /** + * @vmsd: device state serialisation description for + * migration/save/restore + */ const VMStateDescription *vmsd; - /* Private to qdev / bus. */ + /** + * @bus_type: bus type + * private: to qdev / bus. + */ const char *bus_type; }; @@ -167,37 +200,96 @@ typedef struct { bool engaged_in_io; } MemReentrancyGuard; + +typedef QLIST_HEAD(, NamedGPIOList) NamedGPIOListHead; +typedef QLIST_HEAD(, NamedClockList) NamedClockListHead; +typedef QLIST_HEAD(, BusState) BusStateHead; + /** - * DeviceState: - * @reset: ResettableState for the device; handled by Resettable interface. + * struct DeviceState - common device state, accessed with qdev helpers * * This structure should not be accessed directly. We declare it here * so that it can be embedded in individual device state structures. */ struct DeviceState { - /*< private >*/ + /* private: */ Object parent_obj; - /*< public >*/ + /* public: */ + /** + * @id: global device id + */ char *id; + /** + * @canonical_path: canonical path of realized device in the QOM tree + */ char *canonical_path; + /** + * @realized: has device been realized? + */ bool realized; + /** + * @pending_deleted_event: track pending deletion events during unplug + */ bool pending_deleted_event; + /** + * @pending_deleted_expires_ms: optional timeout for deletion events + */ int64_t pending_deleted_expires_ms; + /** + * @opts: QDict of options for the device + */ QDict *opts; + /** + * @hotplugged: was device added after PHASE_MACHINE_READY? + */ int hotplugged; + /** + * @allow_unplug_during_migration: can device be unplugged during migration + */ bool allow_unplug_during_migration; + /** + * @parent_bus: bus this device belongs to + */ BusState *parent_bus; - QLIST_HEAD(, NamedGPIOList) gpios; - QLIST_HEAD(, NamedClockList) clocks; - QLIST_HEAD(, BusState) child_bus; + /** + * @gpios: QLIST of named GPIOs the device provides. + */ + NamedGPIOListHead gpios; + /** + * @clocks: QLIST of named clocks the device provides. + */ + NamedClockListHead clocks; + /** + * @child_bus: QLIST of child buses + */ + BusStateHead child_bus; + /** + * @num_child_bus: number of @child_bus entries + */ int num_child_bus; + /** + * @instance_id_alias: device alias for handling legacy migration setups + */ int instance_id_alias; + /** + * @alias_required_for_version: indicates @instance_id_alias is + * needed for migration + */ int alias_required_for_version; + /** + * @reset: ResettableState for the device; handled by Resettable interface. + */ ResettableState reset; + /** + * @unplug_blockers: list of reasons to block unplugging of device + */ GSList *unplug_blockers; - - /* Is the device currently in mmio/pio/dma? Used to prevent re-entrancy */ + /** + * @mem_reentrancy_guard: Is the device currently in mmio/pio/dma? + * + * Used to prevent re-entrancy confusing things. + */ MemReentrancyGuard mem_reentrancy_guard; }; @@ -264,13 +356,24 @@ typedef struct BusChild { #define QDEV_HOTPLUG_HANDLER_PROPERTY "hotplug-handler" +typedef QTAILQ_HEAD(, BusChild) BusChildHead; +typedef QLIST_ENTRY(BusState) BusStateEntry; + /** - * BusState: + * struct BusState: + * @obj: parent object + * @parent: parent Device + * @name: name of bus * @hotplug_handler: link to a hotplug handler associated with bus. - * @reset: ResettableState for the bus; handled by Resettable interface. + * @max_index: max number of child buses + * @realized: is the bus itself realized? + * @full: is the bus full? + * @num_children: current number of child buses */ struct BusState { + /* private: */ Object obj; + /* public: */ DeviceState *parent; char *name; HotplugHandler *hotplug_handler; @@ -279,18 +382,24 @@ struct BusState { bool full; int num_children; - /* - * children is a RCU QTAILQ, thus readers must use RCU to access it, + /** + * @children: an RCU protected QTAILQ, thus readers must use RCU to access it, * and writers must hold the big qemu lock */ - - QTAILQ_HEAD(, BusChild) children; - QLIST_ENTRY(BusState) sibling; + BusChildHead children; + /** + * @sibling: next bus + */ + BusStateEntry sibling; + /** + * @reset: ResettableState for the bus; handled by Resettable interface. + */ ResettableState reset; }; /** - * GlobalProperty: + * typedef GlobalProperty - a global property type + * * @used: Set to true if property was used when initializing a device. * @optional: If set to true, GlobalProperty will be skipped without errors * if the property doesn't exist. @@ -324,7 +433,8 @@ compat_props_add(GPtrArray *arr, * This only allocates the memory and initializes the device state * structure, ready for the caller to set properties if they wish. * The device still needs to be realized. - * The returned object has a reference count of 1. + * + * Return: a derived DeviceState object with a reference count of 1. */ DeviceState *qdev_new(const char *name); @@ -334,16 +444,18 @@ DeviceState *qdev_new(const char *name); * * This is like qdev_new(), except it returns %NULL when type @name * does not exist, rather than asserting. + * + * Return: a derived DeviceState object with a reference count of 1 or + * NULL if type @name does not exist. */ DeviceState *qdev_try_new(const char *name); /** - * qdev_is_realized: + * qdev_is_realized() - check if device is realized * @dev: The device to check. * - * May be called outside big qemu lock. - * - * Returns: %true% if the device has been fully constructed, %false% otherwise. + * Context: May be called outside big qemu lock. + * Return: true if the device has been fully constructed, false otherwise. */ static inline bool qdev_is_realized(DeviceState *dev) { @@ -361,11 +473,11 @@ static inline bool qdev_is_realized(DeviceState *dev) * @dev must not be plugged into a bus already. * If @bus, plug @dev into @bus. This takes a reference to @dev. * If @dev has no QOM parent, make one up, taking another reference. - * On success, return true. - * On failure, store an error through @errp and return false. * * If you created @dev using qdev_new(), you probably want to use * qdev_realize_and_unref() instead. + * + * Return: true on success, else false setting @errp with error */ bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp); @@ -392,6 +504,8 @@ bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp); * for the only reference to the child device to be held by the parent * via the child<> property, and so the reference-count-drop done here * would be incorrect. For that use case you want qdev_realize(). + * + * Return: true on success, else false setting @errp with error */ bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp); @@ -420,16 +534,16 @@ void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id, HotplugHandler *qdev_get_bus_hotplug_handler(DeviceState *dev); HotplugHandler *qdev_get_machine_hotplug_handler(DeviceState *dev); bool qdev_hotplug_allowed(DeviceState *dev, Error **errp); + /** - * qdev_get_hotplug_handler: Get handler responsible for device wiring - * - * Find HOTPLUG_HANDLER for @dev that provides [pre|un]plug callbacks for it. + * qdev_get_hotplug_handler() - Get handler responsible for device wiring + * @dev: the device we want the HOTPLUG_HANDLER for. * * Note: in case @dev has a parent bus, it will be returned as handler unless * machine handler overrides it. * - * Returns: pointer to object that implements TYPE_HOTPLUG_HANDLER interface - * or NULL if there aren't any. + * Return: pointer to object that implements TYPE_HOTPLUG_HANDLER interface + * or NULL if there aren't any. */ HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev); void qdev_unplug(DeviceState *dev, Error **errp); @@ -459,15 +573,15 @@ void qdev_del_unplug_blocker(DeviceState *dev, Error *reason); * qdev_unplug_blocked: Confirm if a device is blocked from unplug * * @dev: Device to be tested - * @reason: Returns one of the reasons why the device is blocked, - * if any + * @errp: The reasons why the device is blocked, if any * - * Returns: true if device is blocked from unplug, false otherwise + * Returns: true (also setting @errp) if device is blocked from unplug, + * false otherwise */ bool qdev_unplug_blocked(DeviceState *dev, Error **errp); /** - * GpioPolarity: Polarity of a GPIO line + * typedef GpioPolarity - Polarity of a GPIO line * * GPIO lines use either positive (active-high) logic, * or negative (active-low) logic. @@ -499,6 +613,8 @@ typedef enum { * connect another device's output GPIO line to this input. * * For named input GPIO lines, use qdev_get_gpio_in_named(). + * + * Return: qemu_irq corresponding to anonymous input GPIO line */ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n); @@ -516,6 +632,8 @@ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n); * array); this function will assert() if passed an invalid name or index. * * For anonymous input GPIO lines, use qdev_get_gpio_in(). + * + * Return: qemu_irq corresponding to named input GPIO line */ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n); @@ -523,7 +641,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n); * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO lines * @dev: Device whose GPIO to connect * @n: Number of the anonymous output GPIO line (which must be in range) - * @input_pin: qemu_irq to connect the output line to + * @pin: qemu_irq to connect the output line to * * This function connects an anonymous output GPIO line on a device * up to an arbitrary qemu_irq, so that when the device asserts that @@ -594,6 +712,8 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, * * You probably don't need to use this function -- it is used only * by the platform-bus subsystem. + * + * Return: qemu_irq associated with GPIO or NULL if un-wired. */ qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n); @@ -604,14 +724,17 @@ qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n); * @name: Name of the output GPIO array * @n: Number of the GPIO line in the array * - * This function is provided only for use by the qtest testing framework - * and is not suitable for use in non-testing parts of QEMU. + * .. note:: + * This function is provided only for use by the qtest testing framework + * and is not suitable for use in non-testing parts of QEMU. * * This function breaks an existing connection of an outbound GPIO * line from @dev, and replaces it with the new qemu_irq @icpt, as if * ``qdev_connect_gpio_out_named(dev, icpt, name, n)`` had been called. * The previously connected qemu_irq is returned, so it can be restored * by a second call to qdev_intercept_gpio_out() if desired. + * + * Return: old disconnected qemu_irq if one existed */ qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu_irq icpt, const char *name, int n); @@ -683,9 +806,7 @@ void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, const char *name, int n); /** - * qdev_init_gpio_in_named_with_opaque: create an array of input GPIO lines - * for the specified device - * + * qdev_init_gpio_in_named_with_opaque() - create an array of input GPIO lines * @dev: Device to create input GPIOs for * @handler: Function to call when GPIO line value is set * @opaque: Opaque data pointer to pass to @handler @@ -698,8 +819,11 @@ void qdev_init_gpio_in_named_with_opaque(DeviceState *dev, const char *name, int n); /** - * qdev_init_gpio_in_named: create an array of input GPIO lines - * for the specified device + * qdev_init_gpio_in_named() - create an array of input GPIO lines + * @dev: device to add array to + * @handler: a &typedef qemu_irq_handler function to call when GPIO is set + * @name: Name of the GPIO input (must be unique for this device) + * @n: Number of GPIO lines in this input set * * Like qdev_init_gpio_in_named_with_opaque(), but the opaque pointer * passed to the handler is @dev (which is the most commonly desired behaviour). @@ -762,14 +886,17 @@ int qdev_walk_children(DeviceState *dev, void *opaque); /** - * device_cold_reset: + * device_cold_reset() - perform a recursive cold reset on a device + * @dev: device to reset. + * * Reset device @dev and perform a recursive processing using the resettable * interface. It triggers a RESET_TYPE_COLD. */ void device_cold_reset(DeviceState *dev); /** - * bus_cold_reset: + * bus_cold_reset() - perform a recursive cold reset on a bus + * @bus: bus to reset * * Reset bus @bus and perform a recursive processing using the resettable * interface. It triggers a RESET_TYPE_COLD. @@ -777,14 +904,18 @@ void device_cold_reset(DeviceState *dev); void bus_cold_reset(BusState *bus); /** - * device_is_in_reset: - * Return true if the device @dev is currently being reset. + * device_is_in_reset() - check device reset state + * @dev: device to check + * + * Return: true if the device @dev is currently being reset. */ bool device_is_in_reset(DeviceState *dev); /** - * bus_is_in_reset: - * Return true if the bus @bus is currently being reset. + * bus_is_in_reset() - check bus reset state + * @bus: bus to check + * + * Return: true if the bus @bus is currently being reset. */ bool bus_is_in_reset(BusState *bus); @@ -797,7 +928,14 @@ char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev); void device_class_set_props(DeviceClass *dc, Property *props); /** - * device_class_set_parent_reset: + * device_class_set_parent_reset() - legacy set device reset handlers + * @dc: device class + * @dev_reset: function pointer to reset handler + * @parent_reset: function pointer to parents reset handler + * + * Modern code should use the ResettableClass interface to + * implement a multi-phase reset instead. + * * TODO: remove the function when DeviceClass's reset method * is not used anymore. */ @@ -871,14 +1009,15 @@ void device_listener_register(DeviceListener *listener); void device_listener_unregister(DeviceListener *listener); /** - * @qdev_should_hide_device: + * qdev_should_hide_device() - check if device should be hidden + * * @opts: options QDict * @from_json: true if @opts entries are typed, false for all strings * @errp: pointer to error object * - * Check if a device should be added. - * When a device is added via qdev_device_add() this will be called, - * and return if the device should be added now or not. + * When a device is added via qdev_device_add() this will be called. + * + * Return: if the device should be added now or not. */ bool qdev_should_hide_device(const QDict *opts, bool from_json, Error **errp); From patchwork Mon Jun 26 21:59:23 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: 1800225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=FGR2MZ6E; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhmp0PFwz20b0 for ; Tue, 27 Jun 2023 08:08:10 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuLY-0003KH-9l; Mon, 26 Jun 2023 18:06:08 -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 1qDuLL-0003B1-VA for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:02 -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 1qDuLH-000716-AF for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:55 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3113dabc549so5503583f8f.1 for ; Mon, 26 Jun 2023 15:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3JC9WCIJtw9nwrfN71qlgt4usYXlUperbuOAmE+qnSw=; b=FGR2MZ6EMI02Ucd5wWjy7V/egqOJMi5nVn1esQiLF+i3ntR1MsFaPfeR/T6DqgZMQp 8SvHKYCOy5XfKti8HjE61pj62sbAD8cQY3/3/R/zWb3Tyo0WkAeDfTjvct4De/4W7MFN k4Kd/DlcjQWAY5ViT8YpQMU5hmlzb4o5aruKis9jJy29rjbc75kkVNb1E3DW6qVfwyo+ qHIX1kHr4t5Xe039oWeBP73xHFLwdvH4TYRtvikgoKSAmdoqNbhUCDBewPLKrlWf2kXw Z+SjYqAWV1nxtgeAZxzds69ykW66sd/7853R7+O/vejNaSkJy9fn5Mn8k6w9WqNBkOY8 PLrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3JC9WCIJtw9nwrfN71qlgt4usYXlUperbuOAmE+qnSw=; b=NeOpwqswDEr7B25JJGpuVZXdTxJN8ETXnAR1CU6yQ0V3f11BW0GIT5oGqGgtIbf56m OecVs5xB9Joyo/QtIlrIxa4wV6ivnwOeYYJfhEj+0H7sUylB+OKcRpcZLLKUwLXpzV1a 8JHdBJcylzIxeyjw3ytUTZ3+X7O3aCPidhJcMtYv2KvjkdC/3DUmnasMXaIGzCBrPQFT kFQq9x1gz0J7YyWOvZ5e6NPwYTr9V/zdq90a2yMOdNMPOyZg14Lb6KBTVlgo7iXwDMWz aJxwT4aX33AmrwSCREU74uiE0+/hJ8ZBbfu/Pbkiar7DujybFIKYsUjx4smXIpzaSDYm fI/A== X-Gm-Message-State: AC+VfDy/iKooctmM1GzBj2W0DS8/uvVfMkDl5POBkU73N3nxDvtEeRR9 B4cmO9texxC2ohdJtyFYGxOEYg== X-Google-Smtp-Source: ACHHUZ7BzfMVgSjmMQYDPOZce7lOqwr3zHM0fz/CZanc6P5jtCLNkDhICzWWE+6+AT/RfiZ3HRPMJg== X-Received: by 2002:a5d:62d2:0:b0:313:e8f9:dbfa with SMTP id o18-20020a5d62d2000000b00313e8f9dbfamr8144855wrv.35.1687817149583; Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n5-20020adfe345000000b0030e5bd253aasm8527934wrj.39.2023.06.26.15.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ABDF61FFCD; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier , BALATON Zoltan Subject: [PATCH v2 23/26] docs/devel/qom.rst: Correct code style Date: Mon, 26 Jun 2023 22:59:23 +0100 Message-Id: <20230626215926.2522656-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> 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=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Philippe Mathieu-Daudé Per commit 067109a11c ("docs/devel: mention the spacing requirement for QOM"): For a storage structure the first declaration should always be called “parent_obj” and for a class structure the first member should always be called “parent_class” Adapt the QOM rST document accordingly. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230622101717.70468-1-philmd@linaro.org> Signed-off-by: Alex Bennée --- docs/devel/qom.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index c9237950d0..2828843058 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -26,7 +26,7 @@ features: typedef DeviceClass MyDeviceClass; typedef struct MyDevice { - DeviceState parent; + DeviceState parent_obj; int reg0, reg1, reg2; } MyDevice; @@ -147,7 +147,7 @@ will also have a wrapper function to call it easily: typedef struct MyDeviceClass { - DeviceClass parent; + DeviceClass parent_class; void (*frobnicate) (MyDevice *obj); } MyDeviceClass; From patchwork Mon Jun 26 21:59:24 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: 1800237 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=reDTl2fW; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QqhpL6CPkz20ZQ for ; Tue, 27 Jun 2023 08:09:30 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuM9-0003mm-SU; Mon, 26 Jun 2023 18:06:45 -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 1qDuLM-0003B7-TM for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:02 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLI-00071Z-Kw for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:56 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f9b4a71623so36859255e9.1 for ; Mon, 26 Jun 2023 15:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817150; x=1690409150; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MH8q2iOgTUeX14EJZw8vp3pnXPRkiEedRymAvSCpuUo=; b=reDTl2fW8w+mwUUub3P/EUrm7eH6/xv+SZMZYprBT+gTma36oycMQreo8LSusX0ZmJ 0zumbmd9WXUFP6Gl2uQeVMVCFlswF57nUMZRmZYgRQcIEzHn2RPjzA/Jc+FfseZGfodI 0JKhDsSkBs0sAF3GOPdehHREPri7mZy9uC0q61i/GCl8SzyJN4ZSsle/dtJCtaoN+BrL djW1aw99VoWoKgCeYapYvaxNdZx+3XKuRMCOqGhofrQzH3097DJUxc8xTKPipA13i3VJ NWt4MBr4mtx1NtIGRfOb5rMxjgxjZ4qvQ3gBVwOMswcFbre3x0PMJ7mkmnLHdoqf73MH pPaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817150; x=1690409150; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MH8q2iOgTUeX14EJZw8vp3pnXPRkiEedRymAvSCpuUo=; b=R/9NqX2IMklmjWT3OLnmJ4GtDBj60EtSCgwRFlzdkBzSd9sEejmGGsPhHpIGMcUqyl 5tplS0oQF011L0uDgutMlUAyheQBsQGOHViD5hBRiXuxdxYb6ga8VcRoU+3/SE0xNHtb vb6C1wVgIzJmpdCJdlUMPasYemWuMtCPxJG2PqDAuCljDCKZKpbaenvYTHgmrCaigzaU K0cntMocePbiHIqGlJ6vp7oX7wxM/BM8S0I2O1Wqx1nCrUXycIsX3zzArScijBdEutgh /2Hg/55dXmLhV2Y/4TRldf065c/BA2LYmY7Krn5kY2Cmy/eb+IuRNA+me5f/OHjxxJXb nLZQ== X-Gm-Message-State: AC+VfDzLpaGQoi23SnV0jg6LZUUWy2b80wDihC1J37aHV4KlmiwlR+aZ 1bnxB5cX4TBXuweIGck50qPMUA== X-Google-Smtp-Source: ACHHUZ4m5W2MtgqMXvBOQKCkl7zE2ldHa3Q6N8ux2tvVo5vs+huJeIUjM/e4pXclDbuYDjU0TkWEFg== X-Received: by 2002:a05:600c:2942:b0:3f7:5d:4a06 with SMTP id n2-20020a05600c294200b003f7005d4a06mr9703538wmd.1.1687817150541; Mon, 26 Jun 2023 15:05:50 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u8-20020a05600c210800b003f9b4330880sm8849979wml.29.2023.06.26.15.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CBF651FFCE; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 24/26] docs/devel: split qom-api reference into new file Date: Mon, 26 Jun 2023 22:59:24 +0100 Message-Id: <20230626215926.2522656-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Lets try and keep the overview of the sub-system digestible by splitting the core API stuff into a separate file. As QOM and QDEV work together we should also try and enumerate the qdev_ functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-5-alex.bennee@linaro.org> --- v2 - also include qdev API --- docs/devel/index-api.rst | 2 ++ docs/devel/qdev-api.rst | 7 +++++++ docs/devel/qom-api.rst | 9 +++++++++ docs/devel/qom.rst | 3 ++- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/devel/qdev-api.rst create mode 100644 docs/devel/qom-api.rst diff --git a/docs/devel/index-api.rst b/docs/devel/index-api.rst index 7108821746..539ad29c21 100644 --- a/docs/devel/index-api.rst +++ b/docs/devel/index-api.rst @@ -11,5 +11,7 @@ generated from in-code annotations to function prototypes. loads-stores memory modules + qom-api + qdev-api ui zoned-storage diff --git a/docs/devel/qdev-api.rst b/docs/devel/qdev-api.rst new file mode 100644 index 0000000000..3f35eea025 --- /dev/null +++ b/docs/devel/qdev-api.rst @@ -0,0 +1,7 @@ +.. _qdev-api: + +================================ +QEMU Device (qdev) API Reference +================================ + +.. kernel-doc:: include/hw/qdev-core.h diff --git a/docs/devel/qom-api.rst b/docs/devel/qom-api.rst new file mode 100644 index 0000000000..ed1f17e797 --- /dev/null +++ b/docs/devel/qom-api.rst @@ -0,0 +1,9 @@ +.. _qom-api: + +===================================== +QEMU Object Model (QOM) API Reference +===================================== + +This is the complete API documentation for :ref:`qom`. + +.. kernel-doc:: include/qom/object.h diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index 2828843058..c342ce18e3 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -387,4 +387,5 @@ OBJECT_DEFINE_ABSTRACT_TYPE() macro can be used instead: API Reference ------------- -.. kernel-doc:: include/qom/object.h +See the :ref:`QOM API` and :ref:`QDEV API` +documents for the complete API description. From patchwork Mon Jun 26 21:59:25 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: 1800233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=mXj/AcoO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhp43CGXz20ZQ for ; Tue, 27 Jun 2023 08:09:16 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuMS-0004UC-1A; Mon, 26 Jun 2023 18:07:04 -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 1qDuLO-0003BT-R0 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:04 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLJ-00071p-Dm for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:58 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3fa8cd4a113so17176685e9.2 for ; Mon, 26 Jun 2023 15:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817151; x=1690409151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5iMtZ+QxrIdtSm3RSwhWDx4L6tPX96mwOLg/Wme4Yys=; b=mXj/AcoO36v9I9gg+XNKQD4oEPUngzrjeVqDU5I8lUH7IscD3QB95PwW/GnCzoumI+ rAEKJwLpLs65OJZp0zmBkSl2dQ99E0XItDOxJpmx+Y03sopi5NVBE7wWpp80RT6vtpB2 Fk5jlIpcFYxai42CVaorjK0hIPgutMaEV++jynyS3121fVlS5R8rUI5dmNfQLVrMyCUJ OIZ5M3iygOAUGniqoH65oMwUedcdjkZWQizP/6DmmF+psqOFgTSyYCuYyQG2ljz6jIYe AxsbyarBMB16MPyjIGmQZjhpLqZpVPN9gTiy48HQBwq3rLu6RX1OwngpybaXzOV8dY+g P6VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817151; x=1690409151; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5iMtZ+QxrIdtSm3RSwhWDx4L6tPX96mwOLg/Wme4Yys=; b=YsTpRUmbdu9BSF/Wvp7Fen9JICYZQOSonZDm9bMh4DVvxHLZxXYk4dVpQ+8Qp/WFsE ELZ5JH6hURlb50v2LiGmrr9Z74pxloUrFc0DTzOLfg7vYfiNX/HcyxYzagwCqiNsIjWa 3Jn222RwbJTfLxQQ37wuWZtuy/iR2pRnIbgG32nEa+JbyVhpMtu2VWnw9kfgnxwGPIDQ sUyzzpTkp7EOV8vy6tfaenRQfPrUnIBroTdH/q57TRUkxpfcsal1wTM87iRmSEOETAOo IV+aMNCBXxV0/XckdtoKo7M0pbK5ntX1psRgDbv+JFah3CxxTcWCq85pdGosOImsu4u9 Ki8w== X-Gm-Message-State: AC+VfDyAYGR6IY+jTQ3uiS+cWW01eNh+Dii7Yzk1lBTz1lTB7oa2m6aP YXqRbeGnoDIyEU6tXxm2JNpGYKqQNcf7v8LcNvE= X-Google-Smtp-Source: ACHHUZ6r0dyGM79hvmoaKBTrtpN+AQtFmmZuuUc80cU8oNE5+mcCswo7y09+4L0GxwIN9vuRNLx1mw== X-Received: by 2002:a05:600c:230b:b0:3fa:8874:fe69 with SMTP id 11-20020a05600c230b00b003fa8874fe69mr4027230wmo.29.1687817151393; Mon, 26 Jun 2023 15:05:51 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z24-20020a05600c221800b003fa96fe2bd9sm3901038wml.22.2023.06.26.15.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:50 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E54811FFCF; Mon, 26 Jun 2023 22:59:29 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 25/26] docs/devel: introduce some key concepts for QOM development Date: Mon, 26 Jun 2023 22:59:25 +0100 Message-Id: <20230626215926.2522656-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Using QOM correctly is increasingly important to maintaining a modern code base. However the current documentation skips some important concepts before launching into a simple example. Lets: - at least mention properties - mention TYPE_OBJECT and TYPE_DEVICE - talk about why we have realize/unrealize - mention the QOM tree - lightly re-arrange the order we mention things Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-6-alex.bennee@linaro.org> --- v3 - moved around as per Paolo's review --- docs/devel/qom.rst | 58 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index c342ce18e3..0b506426d7 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -13,6 +13,24 @@ features: - System for dynamically registering types - Support for single-inheritance of types - Multiple inheritance of stateless interfaces +- Mapping internal members to publicly exposed properties + +The root object class is TYPE_OBJECT which provides for the basic +object methods. + +The QOM tree +============ + +The QOM tree is a composition tree which represents all of the objects +that make up a QEMU "machine". You can view this tree by running +``info qom-tree`` in the :ref:`QEMU monitor`. It will contain both +objects created by the machine itself as well those created due to +user configuration. + +Creating a QOM class +==================== + +A simple minimal device implementation may look something like bellow: .. code-block:: c :caption: Creating a minimal type @@ -48,6 +66,12 @@ In the above example, we create a simple type that is described by #TypeInfo. #TypeInfo describes information about the type including what it inherits from, the instance and class size, and constructor/destructor hooks. +The TYPE_DEVICE class is the parent class for all modern devices +implemented in QEMU and adds some specific methods to handle QEMU +device model. This includes managing the lifetime of devices from +creation through to when they become visible to the guest and +eventually unrealized. + Alternatively several static types could be registered using helper macro DEFINE_TYPES() @@ -98,7 +122,7 @@ when the object is needed. module_obj(TYPE_MY_DEVICE); Class Initialization -==================== +-------------------- Before an object is initialized, the class for the object must be initialized. There is only one class object for all instance objects @@ -168,7 +192,7 @@ will also have a wrapper function to call it easily: } Interfaces -========== +---------- Interfaces allow a limited form of multiple inheritance. Instances are similar to normal types except for the fact that are only defined by @@ -182,7 +206,7 @@ an argument to a method on its corresponding SomethingIfClass, or to dynamically cast it to an object that implements the interface. Methods -======= +------- A *method* is a function within the namespace scope of a class. It usually operates on the object instance by passing it as a @@ -275,8 +299,8 @@ Alternatively, object_class_by_name() can be used to obtain the class and its non-overridden methods for a specific type. This would correspond to ``MyClass::method(...)`` in C++. -The first example of such a QOM method was #CPUClass.reset, -another example is #DeviceClass.realize. +One example of such methods is ``DeviceClass.reset``. More examples +can be found at :ref:`device-life-cycle`. Standard type declaration and definition macros =============================================== @@ -382,10 +406,32 @@ OBJECT_DEFINE_ABSTRACT_TYPE() macro can be used instead: OBJECT_DEFINE_ABSTRACT_TYPE(MyDevice, my_device, MY_DEVICE, DEVICE) +.. _device-life-cycle: + +Device Life-cycle +================= + +As class initialisation cannot fail devices have an two additional +methods to handle the creation of dynamic devices. The ``realize`` +function is called with ``Error **`` pointer which should be set if +the device cannot complete its setup. Otherwise on successful +completion of the ``realize`` method the device object is added to the +QOM tree and made visible to the guest. + +The reverse function is ``unrealize`` and should be were clean-up +code lives to tidy up after the system is done with the device. + +All devices can be instantiated by C code, however only some can +created dynamically via the command line or monitor. +Likewise only some can be unplugged after creation and need an +explicit ``unrealize`` implementation. This is determined by the +``user_creatable`` variable in the root ``DeviceClass`` structure. +Devices can only be unplugged if their ``parent_bus`` has a registered +``HotplugHandler``. API Reference -------------- +============= See the :ref:`QOM API` and :ref:`QDEV API` documents for the complete API description. From patchwork Mon Jun 26 21:59:26 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: 1800228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=brGcfdTz; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qqhn2426Kz20ZQ for ; Tue, 27 Jun 2023 08:08:22 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDuMJ-0003xG-VC; Mon, 26 Jun 2023 18:06:56 -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 1qDuLN-0003B9-5a for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:06:02 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDuLH-000715-AL for qemu-devel@nongnu.org; Mon, 26 Jun 2023 18:05:56 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-307d20548adso3504584f8f.0 for ; Mon, 26 Jun 2023 15:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bRHf9h4G/bLvyIWMS65t7lGQ8fTomW8W7GqhcAfU7Pw=; b=brGcfdTz7xr3Ga32f4sU/4Z91NcHjo+pIUzY/6Vu0rneSXMf37avVqxo3Bvm8V2VgO 5cOzTJ2T9kimhBDB6qkBA6/1DREmUNdHLCNSVSJAmndmqLIXay96EE6CdIZPL/gZccMc tT+/ulfdp59+yw0QyPMpDwAV10cCS+KkthQ3Rbysy4N3W15j682sSLI5+0I6gethSIU/ ri+uePHyUJB9EbKqZAvy3iWtobjfl+oMKOrMz47FPtBjmdaStTTNXZMnU38sJfuiDUgy slwfYJe4kHl+jLiMeyedIIztcHjbAcV2HxmWnVgMHVQMt4EIC3Ft4J2yNk1SE2QyISXO GKcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687817149; x=1690409149; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bRHf9h4G/bLvyIWMS65t7lGQ8fTomW8W7GqhcAfU7Pw=; b=PC3xqfCPOegBlELdrEgUjmakjm9yEAjwu2AA93n//afapJnOZEz3alFdHbDVkcpAH2 R64EUSCBXWB9UARVKtKE1NMcHe0+8LNLNpa0ierh/qgylOYqljZlsCcSdHT/ZJXmqXj8 JmF3ArXX6RrcoS4iYqiglFWnGkmrru9W6rOCco0qM6lXnTgnly3zOrovur+2EMmUO/YH hcRw5JA75vNgyv0alBsivApsHatwoOjSv3sZ5CI8v0Wn3Z2d500pp8Rg2qL9eIWoU6nH zlXmD60Zf34UiRPgzTYxdp0ljNGqM9QHYd4Bqw+yUr5rX3J5qvgjiIEeXeiDK3Pft7B/ 1etw== X-Gm-Message-State: AC+VfDzYEf+s7068DHUNc9nO171VokoIt0jcYgYpnzKVNXZ7jG+RNdIQ byIXs/+3pCrGVdO9WzczmCSECg== X-Google-Smtp-Source: ACHHUZ5dRwh23s0EHeLza5zqm4lzsrPXJoBYBleqls9ic+ve8UIZUShQOZrW2ytj7yN2lXO+sQV3sg== X-Received: by 2002:a5d:4e8f:0:b0:30f:bf2e:4b99 with SMTP id e15-20020a5d4e8f000000b0030fbf2e4b99mr20610579wru.49.1687817149379; Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id da16-20020a056000197000b0031274a184d5sm8519676wrb.109.2023.06.26.15.05.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 15:05:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1111D1FFD0; Mon, 26 Jun 2023 22:59:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alexander Bulekov , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Juan Quintela , Alexandre Iooss , Thomas Huth , Marcel Apfelbaum , Leif Lindholm , Riku Voipio , Peter Maydell , Paolo Bonzini , Bandan Das , Leonardo Bras , Cleber Rosa , Richard Henderson , Beraldo Leal , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mahmoud Mandour , Stefan Hajnoczi , Yanan Wang , Eduardo Habkost , Bin Meng , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Darren Kenny , Radoslaw Biernacki , Marcin Juszkiewicz , Qiuhao Li , Laurent Vivier Subject: [PATCH v2 26/26] tests/plugin: Remove duplicate insn log from libinsn.so Date: Mon, 26 Jun 2023 22:59:26 +0100 Message-Id: <20230626215926.2522656-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230626215926.2522656-1-alex.bennee@linaro.org> References: <20230626215926.2522656-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Richard Henderson This is a perfectly natural occurrence for x86 "rep movb", where the "rep" prefix forms a counted loop of the one insn. During the tests/tcg/multiarch/memory test, this logging is triggered over 350000 times. Within the context of cross-i386-tci build, which is already slow by nature, the logging is sufficient to push the test into timeout. Signed-off-by: Richard Henderson Message-Id: <20230621111520.1390967-1-richard.henderson@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/insn.c | 9 +-------- tests/tcg/i386/Makefile.softmmu-target | 9 --------- tests/tcg/i386/Makefile.target | 6 ------ tests/tcg/x86_64/Makefile.softmmu-target | 9 --------- 4 files changed, 1 insertion(+), 32 deletions(-) diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index e251a84d86..5fd3017c2b 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -19,7 +19,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; #define MAX_CPUS 8 /* lets not go nuts */ typedef struct { - uint64_t last_pc; uint64_t insn_count; } InstructionCount; @@ -51,13 +50,7 @@ static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) { unsigned int i = cpu_index % MAX_CPUS; InstructionCount *c = &counts[i]; - uint64_t this_pc = GPOINTER_TO_UINT(udata); - if (this_pc == c->last_pc) { - g_autofree gchar *out = g_strdup_printf("detected repeat execution @ 0x%" - PRIx64 "\n", this_pc); - qemu_plugin_outs(out); - } - c->last_pc = this_pc; + c->insn_count++; } diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.softmmu-target index ed922d59c8..5266f2335a 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -33,14 +33,5 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS) memory: CFLAGS+=-DCHECK_UNALIGNED=1 -# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so -run-plugin-%-with-libinsn.so: - $(call run-test, $@, \ - $(QEMU) -monitor none -display none \ - -chardev file$(COMMA)path=$@.out$(COMMA)id=output \ - -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ - -d plugin -D $*-with-libinsn.so.pout \ - $(QEMU_OPTS) $*) - # Running QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index 821822ed0c..f2ee7a4db7 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -63,12 +63,6 @@ else SKIP_I386_TESTS+=test-i386-fprem endif -# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so -run-plugin-%-with-libinsn.so: - $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ - -d plugin -D $*-with-libinsn.so.pout $*) - # Update TESTS I386_TESTS:=$(filter-out $(SKIP_I386_TESTS), $(ALL_X86_TESTS)) TESTS=$(MULTIARCH_TESTS) $(I386_TESTS) diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Makefile.softmmu-target index 7207fee94c..1bd763f2e6 100644 --- a/tests/tcg/x86_64/Makefile.softmmu-target +++ b/tests/tcg/x86_64/Makefile.softmmu-target @@ -33,14 +33,5 @@ EXTRA_RUNS+=$(MULTIARCH_RUNS) memory: CFLAGS+=-DCHECK_UNALIGNED=1 -# non-inline runs will trigger the duplicate instruction heuristics in libinsn.so -run-plugin-%-with-libinsn.so: - $(call run-test, $@, \ - $(QEMU) -monitor none -display none \ - -chardev file$(COMMA)path=$@.out$(COMMA)id=output \ - -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ - -d plugin -D $*-with-libinsn.so.pout \ - $(QEMU_OPTS) $*) - # Running QEMU_OPTS+=-device isa-debugcon,chardev=output -device isa-debug-exit,iobase=0xf4,iosize=0x4 -kernel