From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264317; cv=none; d=zohomail.com; s=zohoarc; b=WYTYdMKjI3XGyN+d1Lx05az2nLtk+zShgEciiNapBpjuFyDqXgTx8+bNTqqEl/nKm98G65TlSV6r5I5SO/QBzsuAO1V7o9MCs92+RGiAqTMUD+f+H60esg1LAgf+qDqPePs1agUTQV/sHSGplJIWlDC2317/7Z8C+2KnLYI16Fg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264317; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j5fFJhx+vMgfG1V76vPOjIITII9gIRW1UvsbXoaqfhQ=; b=BJaYSuynVamNPsM2FnZRA9JrYnfcoriDzoGEQt9wcJslcaBrpM7hv8DrBNX6vRs3pkX3wuobi+Z7LU3vey+vL2fbuXfGXJk3dr1LOmXv/vQ0qrCv5lA/DgQWAcRBqIx2WPWt+LOrf9C2k4+k6q4+fAR+4++pvR7V3pkDkFHJQ6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264317696970.9293082120292; Mon, 29 Jul 2024 07:45:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRbr-0003eY-R1; Mon, 29 Jul 2024 10:44:23 -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 1sYRbq-0003ay-ES for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:22 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbm-0008MZ-OQ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:21 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7ac449a0e6so262260066b.1 for ; Mon, 29 Jul 2024 07:44:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad411bcsm511230266b.109.2024.07.29.07.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1C0A65F8DA; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264257; x=1722869057; darn=nongnu.org; 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=j5fFJhx+vMgfG1V76vPOjIITII9gIRW1UvsbXoaqfhQ=; b=Gp9o/a0FRpYF53rV+54dRNr8gvIGVLLmNgQUKjFo+INqZE4iO5A7f5YPXh4GLQpiCK 9BZsLTYbjiQfGJmUidGRUHgbeLsrB/8NPyzsqi199odIDxD1HXvo4Y1z3KJg4RseDTlU c+q38a+70YCYFFDnQYUXQ5h+nIxasRmwqppAs1pHG0KP0sb/Ora11i/AxaqbegTYw2ET fRvHFtVsXFxWTDUV9KaBrSuLaNRsrUGO5Ks0OshjMGPLILMbcgNIgf6UwRDvAHIyG7ZU u/me/56R3eIp+R0YPBInYTv+THKuYivSRsPz+yvXCrTSS6B/LCB9sCbIgrY71T6VaruC vJBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264257; x=1722869057; 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=j5fFJhx+vMgfG1V76vPOjIITII9gIRW1UvsbXoaqfhQ=; b=vhgBbPU3NRmpbpqx9ZMg++XXYGPjOpS4uS22EE9FVbjTuH1gLFJ9kUhggYDRSRZAG0 6IlKb8wDUml+g1rhI2oG6SIX6qD0j1VpG67Y9AwO8e2XkthCc4m+S4Cp9VQ7zJXJJfrB Z5+9FqDUv4uRVueGhJ7orYL2bH06eri5Cz6dDVS3J1X5S7qGgZHugddltacyhSGDxmM3 affbQa8Er1DyAv2aj5JFQJdSHOUc4kQeAWcvCR80r/QrQ4M7C6yOYdDpt0muTnRbjS+d NTFAM3YYg1489jD2JM2XRSQRLOzqirNX+xbW+onGC3gKWHqWUS0a8F3lJOEAF7jubvyz jozg== X-Gm-Message-State: AOJu0YwT21MxJ3c2vtcIDiJQEASnoWkrd8qsf1rzQw1ZU46vIq4peJks 1lDaG/NL7GlOZHKCbimxzJAndxG812srmyzXLb/6EDw/UWfIrllyZup+2OSE5AA= X-Google-Smtp-Source: AGHT+IFxoNmmMsy1h/7fYoWEIEUAYxhhkKCm/iVRs9WvorySlcHEQ9jIDr2TPCGtWEZlVGMSwgJ/fw== X-Received: by 2002:a17:907:84e:b0:a7d:26ff:aeb0 with SMTP id a640c23a62f3a-a7d4000b79bmr474456366b.30.1722264256673; Mon, 29 Jul 2024 07:44:16 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 01/14] gitlab: record installed packages in /packages.txt in containers Date: Mon, 29 Jul 2024 15:44:01 +0100 Message-Id: <20240729144414.830369-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x630.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264320296116600 From: Daniel P. Berrang=C3=A9 The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, because when it comes to debug failures, the original container is often lost. This extends the manually written dockerfiles to also create the /packages.txt file. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20240724095505.33544-2-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e Acked-by: Richard Henderson --- tests/docker/dockerfiles/debian-all-test-cross.docker | 3 ++- tests/docker/dockerfiles/debian-hexagon-cross.docker | 3 ++- tests/docker/dockerfiles/debian-legacy-test-cross.docker | 3 ++- tests/docker/dockerfiles/debian-loongarch-cross.docker | 3 ++- tests/docker/dockerfiles/debian-tricore-cross.docker | 3 ++- tests/docker/dockerfiles/debian-xtensa-cross.docker | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/= docker/dockerfiles/debian-all-test-cross.docker index 6cc38a3633..8ab244e018 100644 --- a/tests/docker/dockerfiles/debian-all-test-cross.docker +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker @@ -62,7 +62,8 @@ RUN DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ gcc-s390x-linux-gnu \ libc6-dev-s390x-cross \ gcc-sparc64-linux-gnu \ - libc6-dev-sparc64-cross + libc6-dev-sparc64-cross && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' = --show > /packages.txt =20 =20 ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/d= ocker/dockerfiles/debian-hexagon-cross.docker index f2d40f2dee..23152b4918 100644 --- a/tests/docker/dockerfiles/debian-hexagon-cross.docker +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -33,7 +33,8 @@ RUN apt-get update && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --sh= ow > /packages.txt =20 RUN /usr/bin/pip3 install tomli =20 diff --git a/tests/docker/dockerfiles/debian-legacy-test-cross.docker b/tes= ts/docker/dockerfiles/debian-legacy-test-cross.docker index d75e0b85e2..5a6616b7d3 100644 --- a/tests/docker/dockerfiles/debian-legacy-test-cross.docker +++ b/tests/docker/dockerfiles/debian-legacy-test-cross.docker @@ -36,7 +36,8 @@ RUN DEBIAN_FRONTEND=3Dnoninteractive eatmydata \ python3-pip \ python3-setuptools \ python3-venv \ - python3-wheel + python3-wheel && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' = --show > /packages.txt =20 RUN /usr/bin/pip3 install tomli =20 diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests= /docker/dockerfiles/debian-loongarch-cross.docker index 6a9197528b..79eab5621e 100644 --- a/tests/docker/dockerfiles/debian-loongarch-cross.docker +++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker @@ -32,7 +32,8 @@ RUN apt-get update && \ python3-pip \ python3-setuptools \ python3-venv \ - python3-wheel + python3-wheel && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' = --show > /packages.txt =20 RUN /usr/bin/pip3 install tomli =20 diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/d= ocker/dockerfiles/debian-tricore-cross.docker index 16276aa21d..479b4d6eba 100644 --- a/tests/docker/dockerfiles/debian-tricore-cross.docker +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker @@ -34,7 +34,8 @@ RUN apt update && \ python3-pip \ python3-setuptools \ python3-wheel \ - python3-venv + python3-venv && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' -= -show > /packages.txt =20 RUN /usr/bin/pip3 install tomli =20 diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/do= cker/dockerfiles/debian-xtensa-cross.docker index 413881899b..d011eee2ad 100644 --- a/tests/docker/dockerfiles/debian-xtensa-cross.docker +++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker @@ -16,7 +16,8 @@ RUN apt-get update && \ curl \ gettext \ git \ - python3-minimal + python3-minimal && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --sh= ow > /packages.txt =20 ENV CPU_LIST dc232b dc233c de233_fpu dsp3400 ENV TOOLCHAIN_RELEASE 2020.07 --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264429; cv=none; d=zohomail.com; s=zohoarc; b=Zgk0C36D+RoUQ4x7x9MEBhnzTBArhH+6FbnXYfwc4ZF47FVfpTjn6rHM1Y959pVZHOqb9GdSgH/rXmVcyCzjgFhgQ1gx/MsdShfoA9liv1tYDYzjzroz6apsK5yCf1nkPn0mm2FowRJ7BXqlNtBDPUxKhF6VzKzRFg+ViZCxO4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264429; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=T3GszRkz8geRaMKEq8CHOzLhtMD92I0hXo79XzAv5so=; b=BlSlkCoeR/MXHrqo2nFcTyAiXUbXUUx+pBo0jfevjUOKGhcwaveBTBitWidQBJ6F2dkRU7WZc+8LXPqnGmnQdx6P5S9XZlow1z5Y1CyUG8ch9ajXLTz3+AF832pc5h8YYlykB1RnAN4Mtthi+xA+kKg/1FPiZA1mjSBzuT5QGvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264429838755.8570228097818; Mon, 29 Jul 2024 07:47:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRbt-0003kz-57; Mon, 29 Jul 2024 10:44: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 1sYRbr-0003dO-9o for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:23 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbn-0008Mh-7A for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:22 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a7a9a7af0d0so474252766b.3 for ; Mon, 29 Jul 2024 07:44:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41976sm518778766b.130.2024.07.29.07.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:15 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3374A5F92D; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264257; x=1722869057; darn=nongnu.org; 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=T3GszRkz8geRaMKEq8CHOzLhtMD92I0hXo79XzAv5so=; b=pEcO7j9I2xMgVr21v+Bp/m+53kOVGtrq3JgQQPNi7OVma39u+ZuECWWU2j5xSZcQb3 QoLcy7y3vohvpv8JSyYMJUAkHu/ocKcqh5PbSR45uFp/mZa9u3ofw70KIHEScJtukEu3 W3jkzdRmc4Y4jqpNpcgnpfmWIHOYyKExNfPVqyv5BeEa8ZemyOseGuQ0L9Js88s2oeGP AMIhPqGdvgsM8KR2ghD5y6btDCoJhT9Znac4dFVoEu8enCjTcSbayimbdr+rxLtjY7xK 3gvsHVGlLaTZqxtEtTF0rAI0/KarMOp5WP0IQPNpGdswAgcomL5W11et68kR6dkUxSyw 33TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264257; x=1722869057; 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=T3GszRkz8geRaMKEq8CHOzLhtMD92I0hXo79XzAv5so=; b=BlJFIX6tZMKp+Yh+BcvUJ3dPLPOuHrR+qycF8HgljSXLvUP9wq+pYPKD7cpBi9OXnc gzhxd1jF1xc3QclJ1jsgozpBACDuhYto7+6WuGyGggR4rF/rYLvaV6foIGzv5TmNuFEI vW5CUufHD7YYVMFSycP2IRfd0t4tmGv4n6Gaw6lnJQRje0QdzZ7LfbnJ1gp43wkGHN0R xcxfdeRaxLl7puouOfi4XZxI7PRYNJmN9hYikvADjw8VnnEGNQ9oXJXoSdNtIfMen3OL C2B0D7QrDyJBmjSO7JiYlVxTUphzDy2Xydyh3BqayhbGEhc4rqvtv96BBXvogmHpsP0a adoA== X-Gm-Message-State: AOJu0YxWcdVNStopOohrIZARJvpztLL0+6ZoHNH6n6bPfPoKhrcfajAC FInwNgYTo0IWMotjJWwgtxGT0s8+QZYpbbX8POOOjj1Q2lQTXBnUOXmj+yic1mw= X-Google-Smtp-Source: AGHT+IHsL9GVI03IDp731rAG6GHIVAfI+LUj5scFzgtsovFBrefGaBwW73UfGf+Y9O+g5aIIe7Nscg== X-Received: by 2002:a17:907:c48e:b0:a77:da14:8409 with SMTP id a640c23a62f3a-a7d40135360mr437751466b.48.1722264257006; Mon, 29 Jul 2024 07:44:17 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 02/14] gitlab: display /packages.txt in build jobs Date: Mon, 29 Jul 2024 15:44:02 +0100 Message-Id: <20240729144414.830369-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264431965116600 From: Daniel P. Berrang=C3=A9 The lcitool created containers save the full distro package list details into /packages.txt. The idea is that build jobs will 'cat' this file, so that the build log has a record of what packages were used. This is important info, because when it comes to debug failures, the original container is often lost. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20240724095505.33544-3-berrange@redhat.com> Signed-off-by: Alex Benn=C3=A9e Acked-by: Richard Henderson --- .gitlab-ci.d/buildtest-template.yml | 1 + .gitlab-ci.d/crossbuild-template.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 8f7ebfaed8..844c26623d 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -9,6 +9,7 @@ when: always before_script: - JOBS=3D$(expr $(nproc) + 1) + - cat /packages.txt script: - export CCACHE_BASEDIR=3D"$(pwd)" - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild= -template.yml index d9f81b7061..53051ec793 100644 --- a/.gitlab-ci.d/crossbuild-template.yml +++ b/.gitlab-ci.d/crossbuild-template.yml @@ -8,6 +8,8 @@ key: "$CI_JOB_NAME" when: always timeout: 80m + before_script: + - cat /packages.txt script: - export CCACHE_BASEDIR=3D"$(pwd)" - export CCACHE_DIR=3D"$CCACHE_BASEDIR/ccache" --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264464; cv=none; d=zohomail.com; s=zohoarc; b=DCThCVG6FkcQZiodyJ7V9gwCyNlvubMoXHyUAzE+sjexadd7017SEuRCy7MhU39BGB3V+mB6UqcDECMdlbpyDbNAmPFSQ4JmQ94Wcq8ADWJPv4qxc8hJeVyX1Kztonm5Ert6jA43KZjLWGVAHZ6wsioU/WudZffwxkrbw20/dsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264464; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Nvj8Ss11XrIK8lq+iSCvax0w8uaS1gwduZupTcQVtM=; b=YgOIhm2UsAnyGODxgv5fE3fALZSrjmnAjh8wNxRfNJKDI308RhjGV/yU/NEOoyMHGbP5WJOODpCWI4k8BzlX/p2DMOENH7qU4lx35DHCt1V+AVPp9mcfof91PrmS0wBu/h/PJ691Fm1J/Uovp426QxkIA+QHanc+A0oF3HH/0G4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264464892918.9652962017409; Mon, 29 Jul 2024 07:47:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRbs-0003jy-ST; Mon, 29 Jul 2024 10:44:24 -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 1sYRbr-0003f5-RO for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:23 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbn-0008Mt-6i for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:23 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a7a9a7af0d0so474253566b.3 for ; Mon, 29 Jul 2024 07:44:18 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acadb021asm515686066b.188.2024.07.29.07.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:16 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 54C8E5F93A; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264257; x=1722869057; darn=nongnu.org; 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=8Nvj8Ss11XrIK8lq+iSCvax0w8uaS1gwduZupTcQVtM=; b=r2HNDz/hdizmZqTAt2Y0ucZYoYJdZTcxSfTmqH4rE1vp3jf07A//YUjjtHqVL49z+k cEh6mA3kP0gmROxvZONysTpEabZPC44l5bqGlc/6vwCJGG6lA069f057CXvWDY6Qw3TZ YPdb1Rnvl5eacSWaPuxUj8WOInIe2duH2KSXhDzB8JRhJTjXAzUKjDKP1KochvWKKh/X wNkzZd6gJ93UvApbZWOYHUA8fNQjMyngyE2pEa5T7657R6mKPXERqjSEj+6xTkVIInLD dVZ7dTs9h97RWR2E9xJ1OhRbibCJv8QYOtKvepHqyesQW0jISqnvUZF7/erut0q2ugjp 3djw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264257; x=1722869057; 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=8Nvj8Ss11XrIK8lq+iSCvax0w8uaS1gwduZupTcQVtM=; b=mNBHCQCNd340u1DADd60a+RWr2nLRSsEILQWoIKh5Znjf4iV9InOXspRuyATK5RTHy 6ergQMzRqV6nc15sPraxyrAgfsxBIc+iCuHavGZjRW+lQdu5meZKL0z8VYQJHKAxK7yN le0dBdpgTUIsoIaB1WjlURFn/h4nbnsEE4D5uK/SW8UQ8qdolWg0WrFN0mjqxAKMAo0p sUo+p2iXBr8odwOp2bV+v3yowM3wX1dsTN2xjFuSlwwAecTXUEneeNDnBT+ILys/NXH1 jNMBtM8VG1Hof8u32hLZ4jS/EO4e5B05UQXRda8DX8CmWSJwsRrNZnRhNsPKrUnwAcMQ ieTQ== X-Gm-Message-State: AOJu0YwFkebinMtlO2iycrsHc8jBmvEYh8HqVMwAaoQ4NgJjX23TXNoS HSCsjkqYJIUfMcPnX9XiaPuDExuzJH9lsQ1i8ezXR6BZ1LoJX3gHHKI4u1yUxhs= X-Google-Smtp-Source: AGHT+IEkw3C7vjILME9oJ4bcjpE870ppouH4MvRz3UNcGd9Gj0Qn5TzKiqOSYxPCooHrCSd530LaOA== X-Received: by 2002:a17:907:988:b0:a7d:2bf7:5619 with SMTP id a640c23a62f3a-a7d4015fc9dmr501573666b.58.1722264257344; Mon, 29 Jul 2024 07:44:17 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 03/14] tests/tcg: Use --noexecstack with assembler files Date: Mon, 29 Jul 2024 15:44:03 +0100 Message-Id: <20240729144414.830369-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x636.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264466260116600 From: Richard Henderson Add the --noexecstack assembler command-line option to avoid: /usr/bin/ld: warning: boot.o: missing .note.GNU-stack section implies exe= cutable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a = future version of the linker which is enabled by default with current debian cross toolchains. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240724010733.22129-2-richard.henderson@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/Makefile.target | 2 +- tests/tcg/aarch64/Makefile.softmmu-target | 2 +- tests/tcg/alpha/Makefile.softmmu-target | 2 +- tests/tcg/arm/Makefile.softmmu-target | 2 +- tests/tcg/arm/Makefile.target | 2 +- tests/tcg/i386/Makefile.softmmu-target | 2 +- tests/tcg/loongarch64/Makefile.softmmu-target | 2 +- tests/tcg/riscv64/Makefile.softmmu-target | 2 +- tests/tcg/s390x/Makefile.softmmu-target | 2 +- tests/tcg/x86_64/Makefile.softmmu-target | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index cb8cfeb6da..1f8e5b3d30 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -115,7 +115,7 @@ endif %: %.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) %: %.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS) else # For system targets we include a different Makefile fragment as the # build options for bare programs are usually pretty different. They diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/= Makefile.softmmu-target index dd6d595830..139e04d15f 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -28,7 +28,7 @@ config-cc.mak: Makefile .PRECIOUS: $(CRT_OBJS) =20 %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -= c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/alpha/Makefile.softmmu-target b/tests/tcg/alpha/Make= file.softmmu-target index 09193a62d6..a0eca4d6ea 100644 --- a/tests/tcg/alpha/Makefile.softmmu-target +++ b/tests/tcg/alpha/Makefile.softmmu-target @@ -22,7 +22,7 @@ LDFLAGS+=3D-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) = -lgcc .PRECIOUS: $(CRT_OBJS) =20 %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -= c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/arm/Makefile.softmmu-target b/tests/tcg/arm/Makefile= .softmmu-target index 547063c08c..b66074b0b4 100644 --- a/tests/tcg/arm/Makefile.softmmu-target +++ b/tests/tcg/arm/Makefile.softmmu-target @@ -36,7 +36,7 @@ LDFLAGS+=3D-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) = -lgcc .PRECIOUS: $(CRT_OBJS) =20 %.o: $(ARM_SRC)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -= c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index 8e287191af..06ddf3e04f 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -25,7 +25,7 @@ ARM_TESTS +=3D test-arm-iwmmxt # Clang assembler does not support IWMXT, so use the external assembler. test-arm-iwmmxt: CFLAGS +=3D -marm -march=3Diwmmxt -mabi=3Daapcs -mfpu=3Df= pv4-sp-d16 $(CROSS_CC_HAS_FNIA) test-arm-iwmmxt: test-arm-iwmmxt.S - $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS) =20 # Float-convert Tests ARM_TESTS +=3D fcvt diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefi= le.softmmu-target index 5266f2335a..4096a1cf31 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -25,7 +25,7 @@ EXTRA_RUNS+=3D$(MULTIARCH_RUNS) .PRECIOUS: $(CRT_OBJS) =20 %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/loongarch64/Makefile.softmmu-target b/tests/tcg/loon= garch64/Makefile.softmmu-target index 908f3a8c0f..d5d5c1a7f6 100644 --- a/tests/tcg/loongarch64/Makefile.softmmu-target +++ b/tests/tcg/loongarch64/Makefile.softmmu-target @@ -22,7 +22,7 @@ LDFLAGS+=3D-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) = -lgcc .PRECIOUS: $(CRT_OBJS) =20 %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -= c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/riscv64/Makefile.softmmu-target b/tests/tcg/riscv64/= Makefile.softmmu-target index d5b126e5f1..7c1d44d3f4 100644 --- a/tests/tcg/riscv64/Makefile.softmmu-target +++ b/tests/tcg/riscv64/Makefile.softmmu-target @@ -10,7 +10,7 @@ LDFLAGS =3D -T $(LINK_SCRIPT) CFLAGS +=3D -g -Og =20 %.o: %.S - $(CC) $(CFLAGS) $< -c -o $@ + $(CC) $(CFLAGS) $< -Wa,--noexecstack -c -o $@ %: %.o $(LINK_SCRIPT) $(LD) $(LDFLAGS) $< -o $@ =20 diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index 4c8e15e625..f60f94b090 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -6,7 +6,7 @@ CFLAGS+=3D-ggdb -O0 LDFLAGS=3D-nostdlib -static =20 %.o: %.S - $(CC) -march=3Dz13 -m64 -c $< -o $@ + $(CC) -march=3Dz13 -m64 -Wa,--noexecstack -c $< -o $@ =20 %.o: %.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=3Dz13 -m64 -c $< -o $@ diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Ma= kefile.softmmu-target index 1bd763f2e6..ef6bcb4dc7 100644 --- a/tests/tcg/x86_64/Makefile.softmmu-target +++ b/tests/tcg/x86_64/Makefile.softmmu-target @@ -25,7 +25,7 @@ EXTRA_RUNS+=3D$(MULTIARCH_RUNS) .PRECIOUS: $(CRT_OBJS) =20 %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@ =20 # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264384; cv=none; d=zohomail.com; s=zohoarc; b=YAZE8ZPeNqFaGfBte563lzcSVP/d1n3gu3gjUhFlfGPpsm6ODNTr1L2dmk7eOm6dHCg4NHRArUDcG7vPliRXGG1ZXc1DukJewuN/XYo9Rhqv6+GMZ29IAwTewgKrKiPow0Z+xq/tqeCRz3qchLHt/S+33FdecUa4GbgeV3DkCTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264384; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/v/k/yniP5nVbC0OuXzGFTLMBK/X3Q5pTmqVGs8gUbQ=; b=NnMJGe0anr+u1CDXZ7b/SHgvuKizoiLhfRDQViaFr80EJ3BZvGDO6Z4u+G+p0r6rrqgI7Pea1rup1ryoxGbk9UGjJILJI3lxq0Ox9tXUpq5hWQEgHUX0RS9e7zYOJ0OGUFAzix8leEpW5T5/OdJKxyCcPJEYSZVvsD28tZ6cCkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264384888343.2788298205728; Mon, 29 Jul 2024 07:46:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRby-0004Ak-RS; Mon, 29 Jul 2024 10:44:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYRbv-0003xV-TC for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:27 -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 1sYRbq-0008No-4u for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:27 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-36865a516f1so2025736f8f.0 for ; Mon, 29 Jul 2024 07:44:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab22bfdsm516374666b.34.2024.07.29.07.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6E59A5F94C; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264260; x=1722869060; darn=nongnu.org; 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=/v/k/yniP5nVbC0OuXzGFTLMBK/X3Q5pTmqVGs8gUbQ=; b=SzdKklmzyf7WP1srhXZZT5zSqzINWURblWDIr0y8H/CsfrkjTcAqBu1DwQ+4pZb7ZT /RZAgSGgRmsRLkAmO/NczNTi9W/IS07/2MPSoMAZo+xS5fYDekJD0uheeWp2BkGckafa xM1YN0kxAan2LJ0QcD1Ep5Eor0+EsoIeWYYZG0uPsnrTmi090w7miujpeva9oGmLJkxR BkYEh8quAh/rcMqTLUCt4jiV5y5Wey/ifVYfCnEVhZh5jTGB/6/oyoSL0K9DoLeuOP/Q XdVOlI4vLW2Y38mTOfpzZpnA6WBJhUxrMB7tycaEziqwLHB/SZiCxXB+BiyGfErLdrPA 8RIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264260; x=1722869060; 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=/v/k/yniP5nVbC0OuXzGFTLMBK/X3Q5pTmqVGs8gUbQ=; b=hiRUHA1OgcewKCjn0wk+ky7ZFDBjvR0iFSE6l4PJ6Ktn/zDkoYFPCyI0uC4fUzRZYL 28dLqAMEBuoFw0VjWBAvqROhYVPodvrkGuSE3szKq0tyXhTXZAGOwLq3wOaqxH5aXPOY 2CURCI1hdH0B+ub1Sgicxdv1o6o3OytX5w691pgNq4ohWjeBdTmqkuk3Y9lVAf+nmquH ucMeACOAr81JO+HOHBMwN7zxNw8Q4/Td5lPXna5+2OZa71PMpdCtH7IpMIC3HzlHx5z8 C8VX2b8cqYknDCYNKHLDmbP8Zh+5j4eF6YKIyoSkMt+cMHsEd8MgdoFYHGWauei5LelP 5JJA== X-Gm-Message-State: AOJu0YyQgxR/49PMQpzNpI/qIiX2p2jEqP4wfoZcByslme7Tka0IXAlB wlgf6o0sZkbBTUPmFMuhuWs4Yi0QbwsVUcg3LleVugh9CTUI1JOrHgm1hKyjEDM= X-Google-Smtp-Source: AGHT+IEgeVGE/c3HbNhA+uFrQD89n8ygvnu1W/8UdExBBLwR3Otvv7+kSvxZWXQE7OnZqNjkBHF4PA== X-Received: by 2002:a05:6000:1b91:b0:368:7e54:baaa with SMTP id ffacd0b85a97d-36b5cf254e7mr6122234f8f.4.1722264258943; Mon, 29 Jul 2024 07:44:18 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 04/14] tests/tcg/loongarch64: Use --no-warn-rwx-segments to link system tests Date: Mon, 29 Jul 2024 15:44:04 +0100 Message-Id: <20240729144414.830369-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264386095116600 From: Richard Henderson Recent debian cross-linker for loongarch issues ld: warning: hello has a LOAD segment with RWX permissions This is partially related to tests/tcg/loongarch64/system/kernel.ld, but is not fixed by explicitly adding a single LOAD PHDR. Disable the warning, since it does not apply to kernel images. Signed-off-by: Richard Henderson Message-Id: <20240724010733.22129-3-richard.henderson@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- tests/tcg/loongarch64/Makefile.softmmu-target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/loongarch64/Makefile.softmmu-target b/tests/tcg/loon= garch64/Makefile.softmmu-target index d5d5c1a7f6..6d4a20fde7 100644 --- a/tests/tcg/loongarch64/Makefile.softmmu-target +++ b/tests/tcg/loongarch64/Makefile.softmmu-target @@ -16,7 +16,7 @@ LINK_SCRIPT=3D$(LOONGARCH64_SYSTEM_SRC)/kernel.ld LDFLAGS=3D-Wl,-T$(LINK_SCRIPT) TESTS+=3D$(LOONGARCH64_TESTS) $(MULTIARCH_TESTS) CFLAGS+=3D-nostdlib -g -O1 -march=3Dloongarch64 -mabi=3Dlp64d $(MINILIB_IN= C) -LDFLAGS+=3D-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc +LDFLAGS+=3D-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc -Wl,--no-wa= rn-rwx-segments =20 # building head blobs .PRECIOUS: $(CRT_OBJS) --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264461; cv=none; d=zohomail.com; s=zohoarc; b=FEI4Rds9pIAKYMRpKiHBvSHnY3PcJJTJTDScFpORY0Jpf/lmRbddrna0K+22MFdcLyR1Jow18zKCbtO7e7Q3Io2HNFXuk07Bkc8lb1oEWLw139xDOesm++DkKY/qMZHvPsD78D/7MJnZQoGqCXk23tsvkRNc3KcgxEqy8QQntC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264461; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jkd6LFuw9dfVXklEdc2dhr9bRuw+JJYLw6zlp56juC8=; b=ZkXVmmnbL0pLjnLPYKZQEDoTNJnmDCDyU+2RMH9hLJ6b0L+jSClUzCAe2hmgG69/Rpj3kvJokjLd5RUNYsq69oZRjmCFePg9zfZ2kdlmNw6zCIljAOTq99r3yJW7/AfnlalF96kj7/WGWr+N5BOLvZr5CdbKYOMDPd9+KbLlFk4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172226446099589.48500098080069; Mon, 29 Jul 2024 07:47:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc1-0004Nk-Jz; Mon, 29 Jul 2024 10:44:33 -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 1sYRbx-00043s-9C for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:29 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbq-0008Nd-5b for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:29 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5af6a1afa7bso3185376a12.1 for ; Mon, 29 Jul 2024 07:44:21 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5af2f233be4sm4597887a12.41.2024.07.29.07.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 850715F9CC; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264260; x=1722869060; darn=nongnu.org; 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=jkd6LFuw9dfVXklEdc2dhr9bRuw+JJYLw6zlp56juC8=; b=Y8lHAcKOhkw2IR09ZLukGLyKJaq2zb+CMI6JUjfGI/8xREJ7VYCmHQ2AZgE0rKj2Sk 1kckP0ySdEj4j/dTSg5Ijjg1OX0rX7G7rmn5oxsw2d2jwsgybDOdj4H81f27STp/By5s Muwsm6lxLuxxBrgG0xKofeCwIFGZzrqIJUXD6R8/0M0BaVvHewWtqwbskYFo0OBqELJn ymFFySVSgIAF4Zo7W/YRF5iYi4sahHSKpdQtLIbfYRPysHVOTQ5kqIrFnw4+82MiCWPI oZCPy7tFY5abZj/wVCTryxw6UHV1BBBlkuJvzxACkN1SwVPTbNPR1NeGCTzpOhA5H3X6 tB0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264260; x=1722869060; 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=jkd6LFuw9dfVXklEdc2dhr9bRuw+JJYLw6zlp56juC8=; b=LSNXaH4EQ+ZZMJL7n9KFKjcx10nn2ECJbDbMvS6wTbISpdc/ueeuA7o74wWmgifgZh uUf0SzUp2JPkm8sR73UNnE7fvEmCzPuWw99ZfEKrAlfCpokFt41hTsHHTnt44zIPICbU Bl1WXCngf/FppE3hywOrIaSXbs8OvLpHJ2uL/d3dbyX05wvFwwrYZfr1UpdhogOyxwP2 VDmeBE5AK7Rl1jYUNFzskektmRxeAZPEon8C7lhhoGf4gomrl6G7EVhmGKtb+7PHgLUd pnzv2FZvpUsbROPnU7E0QU6popvuD9Pb91rLRzhBFxcsQ/0+Fh6GlY/9r6ANuVaKRIK2 DVlg== X-Gm-Message-State: AOJu0YyB4krRMcdYeDCUj6ecH8kT1wLroKm1I615Jq8UXuaAFGQ8JTmP qNtmZqGtoXSHN5Ezt6CC0qbqmCF+QqtwlxHFxAPAXURwiF8qva79DhvpAyyfeS4= X-Google-Smtp-Source: AGHT+IH91duaUyTno3iK0GWmplPV/TkFQqJitVs82wUjLe0nxKZ20fAvbTHzOnq1qhFihMSZq89dkw== X-Received: by 2002:a05:6402:1ece:b0:5a2:68a2:ae52 with SMTP id 4fb4d7f45d1cf-5b01d37c1fdmr6001624a12.0.1722264259585; Mon, 29 Jul 2024 07:44:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 05/14] tests/tcg: update README Date: Mon, 29 Jul 2024 15:44:05 +0100 Message-Id: <20240729144414.830369-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264462054116600 Update the document with details about the layout of tests. Remove the out of date cris comments. Refer to the developer guide for details about how to run the tests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- tests/tcg/README | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/tcg/README b/tests/tcg/README index 706bb185b4..6d08ca50dc 100644 --- a/tests/tcg/README +++ b/tests/tcg/README @@ -1,9 +1,14 @@ -This directory contains various interesting guest programs for -regression testing. Tests are either multi-arch, meaning they can be -built for all guest architectures that support linux-user executable, -or they are architecture specific. - -CRIS -=3D=3D=3D=3D -The testsuite for CRIS is in tests/tcg/cris. You can run it -with "make test-cris". +This directory contains various interesting guest binaries for +regression testing the Tiny Code Generator doing system and user-mode +emulation. + +The multiarch directory contains shared code for tests that can be +built for all guest architectures. Architecture specific code can be +found in their respective directories. + +System mode tests will be under the "system" subdirectories. + +GDB scripts for exercising the gdbstub on specific tests will be found +under the "gdbstb" subdirectories. + +See the developer guide for more instructions on "make check-tcg" --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264410; cv=none; d=zohomail.com; s=zohoarc; b=lM7DVUKrAoHyo6Lly9bZy+iUxQ44X8niIaNajtB3TYM4FRRtlsTEO4DCU5s6+zAhwLMmlO6/QdnfYULtEi0u2oVWANsxcFBiYn6jKxuEdeB7xriGnOxRFbmjZaxIZ1vxzg5dRGjo0xjIbs3i1gAJog8V3cOMYIl+ATcX3OuIsuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264410; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TdNyQjx9vy1t8eoHD/QTCnhZHijRSE/LPFIBD5gVquQ=; b=YkqkwExkTyOPKhDKa1HlQmc1z0691cF73YLPwlSS0zZiQ4A5HkUeH3hOCdiAOcp/5S3Y1H2Px0MS/yexwdYgFR69evMmJlpDMonTmREw33kXH++JU1Z5jilKY/czPfb/il8JKVq97LKEVyQn2foRt0IVEeqVe8F0vMDB1ZTdzII= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264410663321.1597763477597; Mon, 29 Jul 2024 07:46:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRbv-0003wZ-Qj; Mon, 29 Jul 2024 10:44:27 -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 1sYRbu-0003rp-JC for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:26 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbp-0008Nk-9f for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:26 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5a10835480bso5361298a12.2 for ; Mon, 29 Jul 2024 07:44:20 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac6377e06fsm5901911a12.28.2024.07.29.07.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:17 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9DEE25F9F3; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264260; x=1722869060; darn=nongnu.org; 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=TdNyQjx9vy1t8eoHD/QTCnhZHijRSE/LPFIBD5gVquQ=; b=lpFmL4de2DiDohtCspV95InlqOV/tmh0lKc85jYntv+dVHAZLP4ewt7gNmKMh2Gnq5 +kD3IJFYqbZugQrwZBTmTcwZrTBYo88eMGjABqsr65/tntJKY3oxj7jxQmwaJqTRihlP dZjrmOvRcyOmVPJry5PC61Z3eli9dL3mMPYo04dYPnHWW5l/LzdjJx+E2eNETZ05A3pt cM0UPHUXduCVmpZtDow6EWD35an35Mo1/Okp931pTCg9+gIXz8yobrShPEEtHyZ/lhG6 0k0/UeU7QQ5cCuJ5XwgKCtuDrhls87JJSd6qgq/9CuPMMjzofGwc8XoXFtDOWiuOdVrT QM5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264260; x=1722869060; 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=TdNyQjx9vy1t8eoHD/QTCnhZHijRSE/LPFIBD5gVquQ=; b=UAYFM3SQtVdSz74dhm663WzE90PVY1L86Ek1wxCHdhvBUNd8HMdPBjBLx0h59ysbk0 V7mujyMw7ROkzw5c60XZJQ5h72v+MV/H8J9gRZBY4rv8o+MQpGuG84cSH2OXNKBjuOJ4 lOGdYHiT/XRqyzC5GfBsy+tOs7h3T0e/y9P/wvgWnKXzaO2IB6J8qiEh9+OKMzw8vI3H gZBPgdnw9xfLxP+Z2ETF25FRc+nwaR1i05H1AUGbsQzeqwYHZaDPEbHVMWjj6Z1oqkq4 axWxGI5y5oyeeGHsZ+GsSK9aO/edEBkfyRoOvE9bRTMAPKZbILIvG8k8SDEl6R5Qum/o TDzw== X-Gm-Message-State: AOJu0Yx+x+c7Qmkm7GiUxpVzm+vM9tPs0O2EAJNXGhsmMPlEiFEgtMHF seM2CEMANbtlV9H6KCmN4BcSiD0po7HjcJvVu3N0Thv0MUgwGLLIgdILX//IxUw= X-Google-Smtp-Source: AGHT+IHHhSkKmpbbjVHqoyAkSBJA735SFd4BmTgn67DBvO4GcXVK7szvrETNIxZkj23mIXlWB4PcGQ== X-Received: by 2002:a05:6402:2681:b0:5af:758a:6929 with SMTP id 4fb4d7f45d1cf-5b022003a1cmr6077793a12.23.1722264259275; Mon, 29 Jul 2024 07:44:19 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 06/14] docs/devel: update the testing introduction Date: Mon, 29 Jul 2024 15:44:06 +0100 Message-Id: <20240729144414.830369-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264411940116600 Move the mention of "check-help" up to the intro text and also mention the meson test integration. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- docs/devel/testing.rst | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 23d3f44f52..b984c5dd26 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -3,13 +3,28 @@ Testing in QEMU =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -This document describes the testing infrastructure in QEMU. +QEMU's testing infrastructure is fairly complex as it covers +everything from unit testing and exercising specific sub-systems all +the way to full blown acceptance tests. To get an overview of the +tests you can run ``make check-help`` from either the source or build +tree. + +Most (but not all) tests are also integrated into the meson build +system so can be run directly from the build tree, for example: + +.. code:: + + [./pyvenv/bin/]meson test --suite qemu:softfloat + +will run just the softfloat tests. + +The rest of this document will cover the details for specific test +groups. =20 Testing with "make check" ------------------------- =20 -The "make check" testing family includes most of the C based tests in QEMU= . For -a quick help, run ``make check-help`` from the source tree. +The "make check" testing family includes most of the C based tests in QEMU. =20 The usual way to run these tests is: =20 --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264431; cv=none; d=zohomail.com; s=zohoarc; b=CrXMIUSTLK2bD1nZLo0kK+Ztji7wxnKD4zds0NL+2R7GIospR1XakjUUrOxJAlO44ZWn0yVGLPeSEg8buR/Gy1FaU0kOY/yuuEaYAIpC9DLCfnP851403EtwkXuylkIuQWpaF/aLsNNSqkhuxPKOtw9xMhYY2owk+UxfX9bqsoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264431; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GENiq4e8KZQrz58joiPbir+V04pOx1NyhbMnGqm72qs=; b=GMdCEMBsqEZgz45xMqVz3q+8R4oWSeLVuG6LWuRc5gsTAubrhBoc4M/cKbUTYP8NzwdC9U0dhQHzk0kPCVPMgbmU8OcMs22m7itlSfgVPnU6XsalSiibrL/3/Lp//4UicQbxyiT/M/RhAOpjUDzGRzLb8QMhgciyFN5VLtakJ08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264431807329.0287519119852; Mon, 29 Jul 2024 07:47:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc1-0004NJ-Gj; Mon, 29 Jul 2024 10:44:33 -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 1sYRbz-0004CJ-5Q for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:31 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbr-0008PA-Uq for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:30 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a7aada2358fso653652166b.0 for ; Mon, 29 Jul 2024 07:44:22 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab4de85sm515866566b.52.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:18 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B4C765FA06; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264262; x=1722869062; darn=nongnu.org; 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=GENiq4e8KZQrz58joiPbir+V04pOx1NyhbMnGqm72qs=; b=TnCSR4Md/GxcZyni38dY5d2R1F1Y8UPR2aZp3JYXwZDsdNs1xu75Ulqi2/EWkOXYG8 RrX7cFplt30ozV/M7BBllGr1bErmZQ2f8Dbwhr7aPC3LggphUS+oIW0U9HmWy7gamASi 4Gtylewpt/nyX2xLcuWSC7EAY/QtMOjKfins9Td5760Go5+lGwe+Kxpl2/a1B/5kWd7E udNrf9zIVLYxsukE0sHd7r+vHJoGULnePrJjn6sBZICzi0urFN6JReaPa69ig9muVNc6 G4BA1ncwzpcXESjNY/G7K2dmT0FwV4lGRbVO14lhUrilZmRVz7d9lYxvx4plp+zLZIWQ IPIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264262; x=1722869062; 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=GENiq4e8KZQrz58joiPbir+V04pOx1NyhbMnGqm72qs=; b=ClIWLbP0MZIW4Vyu4NLT72ntirZQIGo6Xt3G/I1/Qp51ftHua28FhChPEq+soB5evs NWSL+89EA9zT+dEahqhB/4HrJ2V6i3gppkr02aHa7BCNXbcXsAFLRXJayn9WJV+uLriX PCOWCvwf1/8SMui4QAofzPJ1LvsmIKcFVz02a8lgFO5vHiWyLlBUpdtrz5kVgM15O8hd O9YV11zpIpuGzgynVHLERtt02wfk4tfOEJkiopUgeRw+evIIFaO5Ryjl95SNTMofAHdY mZmoo35JobyGqijccwPJOZCZaInjOd0KNV0zW+5nmSgmYJ7s6Kj0MUTzSy3NDJX4P4d5 GgHg== X-Gm-Message-State: AOJu0Yxlwu++2LkwGal/80fR7UL/IjfEXckWuzwBuvw++CaLLjdfQwMc L9a9LeFrRCK77/r5rLbp/BqjZuqThYltFPdQKij2Lq0pMJClba6qn90ElNgpqA0= X-Google-Smtp-Source: AGHT+IG0/8LbXJz3R5yJW31iuocEeDzsi0u8V4yfCpH41bAtspf5nJ+467kKd1hi8/985d+hriSNzQ== X-Received: by 2002:a17:907:7e9f:b0:a77:ce4c:8c9c with SMTP id a640c23a62f3a-a7d3f85b7b6mr879809966b.8.1722264261746; Mon, 29 Jul 2024 07:44:21 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 07/14] docs/devel: document how to run individual TCG tests Date: Mon, 29 Jul 2024 15:44:07 +0100 Message-Id: <20240729144414.830369-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264433950116600 Since 6f6ca067d2 (tests/tcg: add some help output for running individual tests) we made it easier to run individual tests for a given architecture. Lets reference that in the developer documentation. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- docs/devel/testing.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index b984c5dd26..af73d3d64f 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -1490,6 +1490,19 @@ And run with:: Adding ``V=3D1`` to the invocation will show the details of how to invoke QEMU for the test which is useful for debugging tests. =20 +Running individual tests +~~~~~~~~~~~~~~~~~~~~~~~~ + +Tests can also be run directly from the test build directory. If you +run ``make help`` from the test build directory you will get a list of +all the tests that can be run. Please note that same binaries are used +in multiple tests, for example:: + + make run-plugin-test-mmap-with-libinline.so + +will run the mmap test with the ``libinline.so`` TCG plugin. The +gdbstub tests also re-use the test binaries but while exercising gdb. + TCG test dependencies ~~~~~~~~~~~~~~~~~~~~~ =20 --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264392; cv=none; d=zohomail.com; s=zohoarc; b=DTEPeogVu5KTPSBGtJuNzvKMAsfgyXhKwNoFGRE5pnQLJY5iZbXBli7ITOGZWiurr2SJU0OwYiU4B8uKJ31Y+ys7/GuUco8Vo/KXVE5fGbNEKew++PsPbMCVVu01qQz5SHg0473hxbhu3XainNhQnonZ5HczblhFmxQSOzT7gqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264392; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=k68dUaa5yNSOgGnmccLcS4zpOsOezQjGJywa7D7FDBg=; b=TsdFF4E3iEUby/u0+3pLl++3C57IlUYI2vUUbxXD2Zy7fj/QT3n3KRBm3rs7ZsBkJw7KnFS2XiaJw7dxEIngP9+XUQGMNQvQj5zvTUe/QYWzPkHo963tU4IihqGXVewtEd4VgVX6fkPaoRUEHzbaDDvOoF87vzIph4AOghKij3k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264392244245.98978023326174; Mon, 29 Jul 2024 07:46:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc2-0004Qs-AK; Mon, 29 Jul 2024 10:44: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 1sYRc1-0004Lh-4I for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:33 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbs-0008Pk-BZ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:32 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-58f9874aeb4so4785709a12.0 for ; Mon, 29 Jul 2024 07:44:23 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad902e2sm520163766b.146.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CC9615FA08; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264263; x=1722869063; darn=nongnu.org; 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=k68dUaa5yNSOgGnmccLcS4zpOsOezQjGJywa7D7FDBg=; b=BoV095cys7xqWDm8wqPwaBpdfNGen9D8k02VQOZjkxN/vb2dSOODpfQFF72ROMHJQL 1KO0wZtX/DPNqXsaWigkSjzZm3F+T0m5RQ/UDJspmHZEctQLDynD6D0hLHXF3P9N+Zxz 0Z4aaY2XHfG2oizP/NxMaEvw6xEB61cqlJaPGjgTDCAF1mBC3vCxtrPbFFP8yrhp7AUN MZ0/dLaAIe5Cr/qi8xG6DNjK1ItgMLrxFSiFJWsP288srNXo+zhOrGVo33ihnCj39qK/ zl+sqFM/mY6aiO9G6/9OK8Aqy5NCtfjkmNZmZyBpIUxO5RJhY1oOmcZ/QSiJkm4LHONF wdjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264263; x=1722869063; 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=k68dUaa5yNSOgGnmccLcS4zpOsOezQjGJywa7D7FDBg=; b=eUR9OYgr2p2mkyV50jDT1h6HVCDOfE9A4c1gU0ddhji1G2rZie3p23OTwClJP6AxBt gsrI+owR98tiVbzKFRS7psaKPzARkwrbSSgPue8+pddgUgfgyMQZrwqeP0SfYgsEKxio KX5WP9W1iJcvF05r/Eh/D0J4/mlkIEgCGk18GJ0xP5ufFaDgmPdS9iZfJb41Z+xgKEIu 6ChlQa/hhhPzSeEIDlAhKyY3NHB7ncYNCLAyCkjyo7+m4t/gFAV3qSOt7aK7P7YCyp/z YfWVZ1p0Egf6fFONfoelu4rvSlJsNfE2uKj3bXAO866fTk/WCuvPXUiMyRu5QKbydjiT PVlA== X-Gm-Message-State: AOJu0YwZRonmam1oYeAjTHNF5e9UWcYakZuty9vDRdiQy9MPKd+FdNTc wuW6nv3/PhE41KWaiRZ/F5aZkIIsEUgd4S9T+C3vjG8R22UWuf+GAjzDydNVT68= X-Google-Smtp-Source: AGHT+IHisnIBoJDnsJGlOaz1G2ZgOZJJy3ylebaI2AyDcFA0RiUAwTnoNA5VQHG6BKW8J01ncI8GJw== X-Received: by 2002:a17:907:944b:b0:a7a:bae8:f29e with SMTP id a640c23a62f3a-a7d400a0385mr487093366b.29.1722264262589; Mon, 29 Jul 2024 07:44:22 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 08/14] tests/avocado: remove tcg_plugins virt_mem_icount test Date: Mon, 29 Jul 2024 15:44:08 +0100 Message-Id: <20240729144414.830369-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264393872116600 Since 4f8d886085 (tests/plugin/mem: migrate to new per_vcpu API) this test was skipping due to not being able to run callback and inline memory instrumentation at the same time. However b480f7a621 (tests/plugin: add test plugin for inline operations) tests for all this matching up so we don't need the additional complexity in avocado. Remove the test. Signed-off-by: Alex Benn=C3=A9e Fixes: 4f8d886085 Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- tests/avocado/tcg_plugins.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py index 15fd87b2c1..a930fca2c0 100644 --- a/tests/avocado/tcg_plugins.py +++ b/tests/avocado/tcg_plugins.py @@ -120,36 +120,3 @@ def test_aarch64_virt_insn_icount(self): else: count =3D int(m.group("count")) self.log.info(f"Counted: {count} instructions") - - def test_aarch64_virt_mem_icount(self): - """ - :avocado: tags=3Daccel:tcg - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - :avocado: tags=3Dcpu:cortex-a53 - """ - kernel_path =3D self._grab_aarch64_kernel() - kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + - 'console=3DttyAMA0') - console_pattern =3D 'Kernel panic - not syncing: VFS:' - - plugin_log =3D tempfile.NamedTemporaryFile(mode=3D"r+t", prefix=3D= "plugin", - suffix=3D".log") - - self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libmem.so,inline=3Dtrue,callback=3Dtrue"= , plugin_log.name, - console_pattern, - args=3D('-icount', 'shift=3D1')) - - with plugin_log as lf, \ - mmap.mmap(lf.fileno(), 0, access=3Dmmap.ACCESS_READ) as s: - m =3D re.findall(br"mem accesses: (?P\d+)", s) - if m is None or len(m) !=3D 2: - self.fail("no memory access counts found") - else: - inline =3D int(m[0]) - callback =3D int(m[1]) - if inline !=3D callback: - self.fail("mismatched access counts") - else: - self.log.info(f"Counted {inline} memory accesses") --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264432; cv=none; d=zohomail.com; s=zohoarc; b=b9Qvl9151eR7x5wXTzsFOMdkLZjyqxE1ya15u8ph9oEP8qaRoL+T4YSRtzdSRO0oSudHU+UNGrkYngDv6aBY1mYI16INcBCMhXY90gYh67KAic2kP8Na2qsEllnPrUvdTskosJoLXAvOhQAtSaUhuRYVmc2ncTjCvR4Fw1biK0I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264432; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=g5nNh5K9JK+/T3reUDrggUkqIh+tpzSlqYJ3Fy2gqeo=; b=EwnFYH8dAYpXUwRP+5yJxG9AIoxlJQN/qjzJGixVKjajICQY/wDjiL9TbU54N71QXKfk2x1jC5o8KEiJ2StBMv+BaqOSAIe1GAz5UYD5FsGhnytPcjvcaHqaCsK98I8E8f3Izne+0SvjRfki5ZuN0/AgmJBtCmGA6CUfmXrlXL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264432622370.1704861903486; Mon, 29 Jul 2024 07:47:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc2-0004Qg-9G; Mon, 29 Jul 2024 10:44: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 1sYRby-0004B8-Sg for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:30 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbq-0008Od-Dd for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:30 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a7aac70e30dso459416366b.1 for ; Mon, 29 Jul 2024 07:44:21 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab4de06sm514722166b.71.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E88105FA0C; Mon, 29 Jul 2024 15:44:15 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264261; x=1722869061; darn=nongnu.org; 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=g5nNh5K9JK+/T3reUDrggUkqIh+tpzSlqYJ3Fy2gqeo=; b=rmyPFoaYhDPr0aTXUcIqtaUD0GKlNs5ZMWU9QgaayAnuuP2i6Tj9JYKYgHFjN7EwbX eCKGgzqAIRCLn1sxdT28ryljaBkjnCzmiWMOdYfRLsKc3CMJYLDQWGJrPzkBa2CmUe3U 4TinW/dCgPLhCeyjj1QxtQBc97foWahkhZTceXPHqpsO+jBN5ULq8V9iADDQ4y3KEv2H GktuOSCfHHsWuZZ6xY7sza21cXUwn5olXErdbxVkUD3Fp+Rp4RAaTX8dAquz0uVUTJAI 34yKBlo4y2vMGKzffGqGyurz6aQvOGCjcL1FMRbGjdGW9C+vnuXudfxQAEU+xdletoHN 0mcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264261; x=1722869061; 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=g5nNh5K9JK+/T3reUDrggUkqIh+tpzSlqYJ3Fy2gqeo=; b=lLQOgYWY39R+RSzzaXBLBupOMYDJjFdSDiHj5P8g7LyqYuvCRN/IGYm+6Vz1gCH6XJ Gu+u7JZc/vFGVSckF4yzzcOYMtfkK1ctXzXP57zgBMleGkYlC+NUXI7/wU+Vk5K4Uscn WVPxBHtnpF77+kzrUNmxd5JHv+G3P8fNGfcBZZQ1jzqCK91myXJUqSqs4Yui5HfoB+mm oT7AdUxKE+BkCdT9g3iEjOkkcs8Z83zfxjzmc8HJfazrRdF423DTDYYhG/iU4U3I+qmF 6hyxjQtR3K7vjb40xTQZmaTmrkyvyImvCg/LU2p/uGQH9TbfVogK8SDky+tB7d5f5fPp sZUA== X-Gm-Message-State: AOJu0YwPXWBoq/ohlD0HQNSCKcYLjxUIAB62zni9SRuycRDjaV4VJL8J TvNYmY21ONPnwU0e0OqY/EcAATwuPXAKgdYRVKyL7lqd7f5C/qsIWxr6DoS1u+M= X-Google-Smtp-Source: AGHT+IF9IdjkQYGmEiFx1If2oalFfkPo8nhunRaTr/FU0hYbqn+5gt/XC/cjA2mLIrDjBjI1TMcoOg== X-Received: by 2002:a17:907:97c4:b0:a7a:bd5a:1eb3 with SMTP id a640c23a62f3a-a7d3fdb7aa1mr669122166b.8.1722264260641; Mon, 29 Jul 2024 07:44:20 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 09/14] tests/tcg: move test plugins into tcg subdir Date: Mon, 29 Jul 2024 15:44:09 +0100 Message-Id: <20240729144414.830369-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264433987116600 You cannot use plugins without TCG enabled so it doesn't make sense to have them separated off in the test directory structure. While we are at it rename the directory to plugins to reflect the plural nature of the directory and match up with contrib/plugins. Signed-off-by: Alex Benn=C3=A9e Suggested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- MAINTAINERS | 2 +- tests/{plugin =3D> tcg/plugins}/bb.c | 0 tests/{plugin =3D> tcg/plugins}/empty.c | 0 tests/{plugin =3D> tcg/plugins}/inline.c | 0 tests/{plugin =3D> tcg/plugins}/insn.c | 0 tests/{plugin =3D> tcg/plugins}/mem.c | 0 tests/{plugin =3D> tcg/plugins}/syscall.c | 0 tests/avocado/tcg_plugins.py | 4 ++-- tests/meson.build | 2 +- tests/tcg/Makefile.target | 4 ++-- tests/{plugin =3D> tcg/plugins}/meson.build | 6 +++--- 11 files changed, 9 insertions(+), 9 deletions(-) rename tests/{plugin =3D> tcg/plugins}/bb.c (100%) rename tests/{plugin =3D> tcg/plugins}/empty.c (100%) rename tests/{plugin =3D> tcg/plugins}/inline.c (100%) rename tests/{plugin =3D> tcg/plugins}/insn.c (100%) rename tests/{plugin =3D> tcg/plugins}/mem.c (100%) rename tests/{plugin =3D> tcg/plugins}/syscall.c (100%) rename tests/{plugin =3D> tcg/plugins}/meson.build (70%) diff --git a/MAINTAINERS b/MAINTAINERS index 98eddf7ae1..72b3c67360 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3751,7 +3751,7 @@ R: Pierrick Bouvier S: Maintained F: docs/devel/tcg-plugins.rst F: plugins/ -F: tests/plugin/ +F: tests/tcg/plugins/ F: tests/avocado/tcg_plugins.py F: contrib/plugins/ =20 diff --git a/tests/plugin/bb.c b/tests/tcg/plugins/bb.c similarity index 100% rename from tests/plugin/bb.c rename to tests/tcg/plugins/bb.c diff --git a/tests/plugin/empty.c b/tests/tcg/plugins/empty.c similarity index 100% rename from tests/plugin/empty.c rename to tests/tcg/plugins/empty.c diff --git a/tests/plugin/inline.c b/tests/tcg/plugins/inline.c similarity index 100% rename from tests/plugin/inline.c rename to tests/tcg/plugins/inline.c diff --git a/tests/plugin/insn.c b/tests/tcg/plugins/insn.c similarity index 100% rename from tests/plugin/insn.c rename to tests/tcg/plugins/insn.c diff --git a/tests/plugin/mem.c b/tests/tcg/plugins/mem.c similarity index 100% rename from tests/plugin/mem.c rename to tests/tcg/plugins/mem.c diff --git a/tests/plugin/syscall.c b/tests/tcg/plugins/syscall.c similarity index 100% rename from tests/plugin/syscall.c rename to tests/tcg/plugins/syscall.c diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py index a930fca2c0..a6ff457e27 100644 --- a/tests/avocado/tcg_plugins.py +++ b/tests/avocado/tcg_plugins.py @@ -77,7 +77,7 @@ def test_aarch64_virt_insn(self): suffix=3D".log") =20 self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libinsn.so", plugin_log.name, + "tests/tcg/plugins/libinsn.so", plugin_log.name, console_pattern) =20 with plugin_log as lf, \ @@ -107,7 +107,7 @@ def test_aarch64_virt_insn_icount(self): suffix=3D".log") =20 self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libinsn.so", plugin_log.name, + "tests/tcg/plugins/libinsn.so", plugin_log.name, console_pattern, args=3D('-icount', 'shift=3D1')) =20 diff --git a/tests/meson.build b/tests/meson.build index acb6807094..80dd3029cf 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -78,7 +78,7 @@ subdir('decode') =20 if 'CONFIG_TCG' in config_all_accel subdir('fp') - subdir('plugin') + subdir('tcg/plugins') endif =20 subdir('unit') diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 1f8e5b3d30..452a2cde65 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -142,8 +142,8 @@ RUN_TESTS=3D$(patsubst %,run-%, $(TESTS)) =20 # If plugins exist also include those in the tests ifeq ($(CONFIG_PLUGIN),y) -PLUGIN_SRC=3D$(SRC_PATH)/tests/plugin -PLUGIN_LIB=3D../../plugin +PLUGIN_SRC=3D$(SRC_PATH)/tests/tcg/plugins +PLUGIN_LIB=3D../plugins VPATH+=3D$(PLUGIN_LIB) PLUGINS=3D$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c))) =20 diff --git a/tests/plugin/meson.build b/tests/tcg/plugins/meson.build similarity index 70% rename from tests/plugin/meson.build rename to tests/tcg/plugins/meson.build index 9eece5bab5..f847849b1b 100644 --- a/tests/plugin/meson.build +++ b/tests/tcg/plugins/meson.build @@ -2,15 +2,15 @@ t =3D [] if get_option('plugins') foreach i : ['bb', 'empty', 'inline', 'insn', 'mem', 'syscall'] if host_os =3D=3D 'windows' - t +=3D shared_module(i, files(i + '.c') + '../../contrib/plugins/win= 32_linker.c', - include_directories: '../../include/qemu', + t +=3D shared_module(i, files(i + '.c') + '../../../contrib/plugins/= win32_linker.c', + include_directories: '../../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], link_args: ['-Lplugins', '-lqemu_plugin_api'], dependencies: glib) =20 else t +=3D shared_module(i, files(i + '.c'), - include_directories: '../../include/qemu', + include_directories: '../../../include/qemu', dependencies: glib) endif endforeach --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264428; cv=none; d=zohomail.com; s=zohoarc; b=JOH1058ODokd//GVTjfN7xX/NK20Bg93CY0P+f1fKWeHey61BMHuY2g22v0LTd1ZmiDBV9bBTte6lvdJlG90aKpyoTKThF7ExQAc+Ru8j2AHvkoSLwiqdDuc4QTkFdIvlXkCp9k26RZkhWKYgcelUdQAbAwFPS5K+10oCHw0uHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264428; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZUlZRSoZXKOSR3VK0h/wIN8Ft8vW/iIJGWwtuJjGLoo=; b=NUqOlvR6W9TT+Fk5NaZi14KUm5mqmJzmAo6i86UVIovaSKPExlncHFua9Azq8xT17tUUNmHgTGvZXDXH00FfvSFuWss5bI0gQ9yTvU0SkjN+ptkaCiBADFMURasfz3saOsL9x0SRHOAgxf7S8sGNEPm4zfivCVCQQIR1g19d26w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264428045541.648772756598; Mon, 29 Jul 2024 07:47:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRcC-000598-Ao; Mon, 29 Jul 2024 10:44: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 1sYRcA-0004zy-3l for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:42 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbw-0008S1-CN for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:41 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2eecd2c6432so55726631fa.3 for ; Mon, 29 Jul 2024 07:44:27 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac63b59bfesm5873770a12.44.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 10CEC5FA0E; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264266; x=1722869066; darn=nongnu.org; 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=ZUlZRSoZXKOSR3VK0h/wIN8Ft8vW/iIJGWwtuJjGLoo=; b=AXcDJ0YwB5dmUThC7XnUeO4uD+rStIVVRue1nqLTJOp5u3udtBbTuEwwJMfHoTDzKx JNjsjLWmZQd+ryemfnOxqGAH0RRdhnkqTCs41w0w3soXBQCTwfsVTLUBuVdA0HZ++Vsx rYsEUsd6QQ8i2hrog9ZvNGFLy9AieA3iaiZ8T1h7I+L4a8uvMp00vNfbseiYgPBkRLPo RkedP4fZn7b8j1bvCez6CyzkvOmXMZAArsUStmCevJ3PCelofEHu35ltmtU1711HSWED EgzHMwbaltlpM7Vm5oxX8oQESlfJW7A3e6YII//wdvB7aXQcu7yWBmPgPxbi2IK2mCEx SdIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264266; x=1722869066; 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=ZUlZRSoZXKOSR3VK0h/wIN8Ft8vW/iIJGWwtuJjGLoo=; b=jEJAj0GgL2YGVdSOSv6nc61kvs4oWKYDBA8Lva+H+S6gOBoLvMowMcPi+vUzg6XYAE yvgzIRuX0ReBxfk2UXz6go536+i7Bk7WbWvndJtLIy+iIdrYnz/Qq3qnN0ECQXmBhll2 ezfhZIpK1nTY+loKvckW+tFenkbRDxUGHyGwEEuLyJXQQB54h4K3UfcelWLXY0UQ6zIO u3OPnu5sGWOCcpnSmzK6EWNGDeWQJXz79jpzi3UUyLQxbqb9X89aen22qbC4OAWMHNep 5mENwuj4crgOyrgCK536YXfnSd/vH2YG/O3EQFMfleumno+7x2sLyvYV8FtypJWNTtnm WVZw== X-Gm-Message-State: AOJu0Yzf+0j9+DRIUu2Fdf345QjRNfw7VjJ67664OS4bO9DcshwNvA+4 zcj8lPEYIhukM03c6eTvUCvBM+pjcnmmMb+ICQafrggBRb8p2XKq4Ox1sm813qc= X-Google-Smtp-Source: AGHT+IEtgp0bkqOWDewhFsthGhrwE4vLjNvmje4z1qyCge0QHP/eCqBEGEqykK/RpZxDyeOzAbDqMg== X-Received: by 2002:a2e:9a87:0:b0:2ef:2f9e:dd19 with SMTP id 38308e7fff4ca-2f12edfeefbmr64121541fa.2.1722264265293; Mon, 29 Jul 2024 07:44:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 10/14] docs: split TCG plugin usage from devel section Date: Mon, 29 Jul 2024 15:44:10 +0100 Message-Id: <20240729144414.830369-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x22d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264430046116600 The devel section is getting quite messy with the breakdown of the example plugins which should be usable by users. As we mention plugins in the emulation section along with semihosting move the overview there leaving the development section about the details of writing plugins. While we are at make the headings nicer and convert the option lists into nicely formatted tables. Signed-off-by: Alex Benn=C3=A9e Acked-by: Richard Henderson --- docs/about/emulation.rst | 567 ++++++++++++++++++++++++++++++++++++- docs/devel/tcg-plugins.rst | 505 --------------------------------- 2 files changed, 564 insertions(+), 508 deletions(-) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index 3bfe8cc14a..c03033e4e9 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -95,9 +95,6 @@ depending on the guest architecture. - Yes - A configurable 32 bit soft core now owned by Cadence =20 -A number of features are only available when running under -emulation including :ref:`Record/Replay` and :ref:`TCG Plugins`. - .. _Semihosting: =20 Semihosting @@ -182,3 +179,567 @@ for that architecture. * - Xtensa - System - Tensilica ISS SIMCALL + +TCG Plugins +----------- + +QEMU TCG plugins provide a way for users to run experiments taking +advantage of the total system control emulation can have over a guest. +It provides a mechanism for plugins to subscribe to events during +translation and execution and optionally callback into the plugin +during these events. TCG plugins are unable to change the system state +only monitor it passively. However they can do this down to an +individual instruction granularity including potentially subscribing +to all load and store operations. + +See the developer section of the manual for details about +:ref:`writing plugins`. + +Usage +~~~~~ + +Any QEMU binary with TCG support has plugins enabled by default. +Earlier releases needed to be explicitly enabled with:: + + configure --enable-plugins + +Once built a program can be run with multiple plugins loaded each with +their own arguments:: + + $QEMU $OTHER_QEMU_ARGS \ + -plugin contrib/plugin/libhowvec.so,inline=3Don,count=3Dhint \ + -plugin contrib/plugin/libhotblocks.so + +Arguments are plugin specific and can be used to modify their +behaviour. In this case the howvec plugin is being asked to use inline +ops to count and break down the hint instructions by type. + +Linux user-mode emulation also evaluates the environment variable +``QEMU_PLUGIN``:: + + QEMU_PLUGIN=3D"file=3Dcontrib/plugins/libhowvec.so,inline=3Don,count=3Dh= int" $QEMU + +Example Plugins +~~~~~~~~~~~~~~~ + +There are a number of plugins included with QEMU and you are +encouraged to contribute your own plugins plugins upstream. There is a +``contrib/plugins`` directory where they can go. There are also some +basic plugins that are used to test and exercise the API during the +``make check-tcg`` target in ``tests/tcg/plugins`` that are never the +less useful for basic analysis. + +Empty +..... + +``tests/tcg/plugins/empty.c`` + +Purely a test plugin for measuring the overhead of the plugins system +itself. Does no instrumentation. + +Basic Blocks +............ + +``tests/tcg/plugins/bb.c`` + +A very basic plugin which will measure execution in coarse terms as +each basic block is executed. By default the results are shown once +execution finishes:: + + $ qemu-aarch64 -plugin tests/plugin/libbb.so \ + -d plugin ./tests/tcg/aarch64-linux-user/sha1 + SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 + bb's: 2277338, insns: 158483046 + +Behaviour can be tweaked with the following arguments: + +.. list-table:: Basic Block plugin arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - inline=3Dtrue|false + - Use faster inline addition of a single counter. Not per-cpu and not + thread safe. + * - idle=3Dtrue|false + - Dump the current execution stats whenever the guest vCPU idles + +Instruction +........... + +``tests/tcg/plugins/insn.c`` + +This is a basic instruction level instrumentation which can count the +number of instructions executed on each core/thread:: + + $ qemu-aarch64 -plugin tests/plugin/libinsn.so \ + -d plugin ./tests/tcg/aarch64-linux-user/threadcount + Created 10 threads + Done + cpu 0 insns: 46765 + cpu 1 insns: 3694 + cpu 2 insns: 3694 + cpu 3 insns: 2994 + cpu 4 insns: 1497 + cpu 5 insns: 1497 + cpu 6 insns: 1497 + cpu 7 insns: 1497 + total insns: 63135 + +Behaviour can be tweaked with the following arguments: + +.. list-table:: Instruction plugin arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - inline=3Dtrue|false + - Use faster inline addition of a single counter. + * - sizes=3Dtrue|false + - Give a summary of the instruction sizes for the execution + * - match=3D + - Only instrument instructions matching the string prefix + +The ``match`` option will show some basic stats including how many +instructions have executed since the last execution. For +example:: + + $ qemu-aarch64 -plugin tests/plugin/libinsn.so,match=3Dbl \ + -d plugin ./tests/tcg/aarch64-linux-user/sha512-vector + ... + 0x40069c, 'bl #0x4002b0', 10 hits, 1093 match hits, =CE=94+1257 since l= ast match, 98 avg insns/match + 0x4006ac, 'bl #0x403690', 10 hits, 1094 match hits, =CE=94+47 since las= t match, 98 avg insns/match + 0x4037fc, 'bl #0x4002b0', 18 hits, 1095 match hits, =CE=94+22 since las= t match, 98 avg insns/match + 0x400720, 'bl #0x403690', 10 hits, 1096 match hits, =CE=94+58 since las= t match, 98 avg insns/match + 0x4037fc, 'bl #0x4002b0', 19 hits, 1097 match hits, =CE=94+22 since las= t match, 98 avg insns/match + 0x400730, 'bl #0x403690', 10 hits, 1098 match hits, =CE=94+33 since las= t match, 98 avg insns/match + 0x4037ac, 'bl #0x4002b0', 12 hits, 1099 match hits, =CE=94+20 since las= t match, 98 avg insns/match + ... + +For more detailed execution tracing see the ``execlog`` plugin for +other options. + +Memory +...... + +``tests/tcg/plugins/mem.c`` + +Basic instruction level memory instrumentation:: + + $ qemu-aarch64 -plugin tests/plugin/libmem.so,inline=3Dtrue \ + -d plugin ./tests/tcg/aarch64-linux-user/sha1 + SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 + inline mem accesses: 79525013 + +Behaviour can be tweaked with the following arguments: + +.. list-table:: Memory plugin arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - inline=3Dtrue|false + - Use faster inline addition of a single counter + * - callback=3Dtrue|false + - Use callbacks on each memory instrumentation. + * - hwaddr=3Dtrue|false + - Count IO accesses (only for system emulation) + +System Calls +............ + +``tests/tcg/plugins/syscall.c`` + +A basic syscall tracing plugin. This only works for user-mode. By +default it will give a summary of syscall stats at the end of the +run:: + + $ qemu-aarch64 -plugin tests/plugin/libsyscall \ + -d plugin ./tests/tcg/aarch64-linux-user/threadcount + Created 10 threads + Done + syscall no. calls errors + 226 12 0 + 99 11 11 + 115 11 0 + 222 11 0 + 93 10 0 + 220 10 0 + 233 10 0 + 215 8 0 + 214 4 0 + 134 2 0 + 64 2 0 + 96 1 0 + 94 1 0 + 80 1 0 + 261 1 0 + 78 1 0 + 160 1 0 + 135 1 0 + +Hot Blocks +.......... + +``contrib/plugins/hotblocks.c`` + +The hotblocks plugin allows you to examine the where hot paths of +execution are in your program. Once the program has finished you will +get a sorted list of blocks reporting the starting PC, translation +count, number of instructions and execution count. This will work best +with linux-user execution as system emulation tends to generate +re-translations as blocks from different programs get swapped in and +out of system memory. + +If your program is single-threaded you can use the ``inline`` option for +slightly faster (but not thread safe) counters. + +Example:: + + $ qemu-aarch64 \ + -plugin contrib/plugins/libhotblocks.so -d plugin \ + ./tests/tcg/aarch64-linux-user/sha1 + SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 + collected 903 entries in the hash table + pc, tcount, icount, ecount + 0x0000000041ed10, 1, 5, 66087 + 0x000000004002b0, 1, 4, 66087 + ... + + +Hot Pages +......... + +``contrib/plugins/hotpages.c`` + +Similar to hotblocks but this time tracks memory accesses:: + + $ qemu-aarch64 \ + -plugin contrib/plugins/libhotpages.so -d plugin \ + ./tests/tcg/aarch64-linux-user/sha1 + SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 + Addr, RCPUs, Reads, WCPUs, Writes + 0x000055007fe000, 0x0001, 31747952, 0x0001, 8835161 + 0x000055007ff000, 0x0001, 29001054, 0x0001, 8780625 + 0x00005500800000, 0x0001, 687465, 0x0001, 335857 + 0x0000000048b000, 0x0001, 130594, 0x0001, 355 + 0x0000000048a000, 0x0001, 1826, 0x0001, 11 + +The hotpages plugin can be configured using the following arguments: + +.. list-table:: Hot pages arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - sortby=3Dreads|writes|address + - Log the data sorted by either the number of reads, the number of wri= tes, or + memory address. (Default: entries are sorted by the sum of reads and= writes) + * - io=3Don + - Track IO addresses. Only relevant to full system emulation. (Default= : off) + * - pagesize=3DN + - The page size used. (Default: N =3D 4096) + +Instruction Distribution +........................ + +``contrib/plugins/howvec.c`` + +This is an instruction classifier so can be used to count different +types of instructions. It has a number of options to refine which get +counted. You can give a value to the ``count`` argument for a class of +instructions to break it down fully, so for example to see all the system +registers accesses:: + + $ qemu-system-aarch64 $(QEMU_ARGS) \ + -append "root=3D/dev/sda2 systemd.unit=3Dbenchmark.service" \ + -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=3Dsreg -d plugin + +which will lead to a sorted list after the class breakdown:: + + Instruction Classes: + Class: UDEF not counted + Class: SVE (68 hits) + Class: PCrel addr (47789483 hits) + Class: Add/Sub (imm) (192817388 hits) + Class: Logical (imm) (93852565 hits) + Class: Move Wide (imm) (76398116 hits) + Class: Bitfield (44706084 hits) + Class: Extract (5499257 hits) + Class: Cond Branch (imm) (147202932 hits) + Class: Exception Gen (193581 hits) + Class: NOP not counted + Class: Hints (6652291 hits) + Class: Barriers (8001661 hits) + Class: PSTATE (1801695 hits) + Class: System Insn (6385349 hits) + Class: System Reg counted individually + Class: Branch (reg) (69497127 hits) + Class: Branch (imm) (84393665 hits) + Class: Cmp & Branch (110929659 hits) + Class: Tst & Branch (44681442 hits) + Class: AdvSimd ldstmult (736 hits) + Class: ldst excl (9098783 hits) + Class: Load Reg (lit) (87189424 hits) + Class: ldst noalloc pair (3264433 hits) + Class: ldst pair (412526434 hits) + Class: ldst reg (imm) (314734576 hits) + Class: Loads & Stores (2117774 hits) + Class: Data Proc Reg (223519077 hits) + Class: Scalar FP (31657954 hits) + Individual Instructions: + Instr: mrs x0, sp_el0 (2682661 hits) (op=3D0xd5384100/ Syste= m Reg) + Instr: mrs x1, tpidr_el2 (1789339 hits) (op=3D0xd53cd041/ Syste= m Reg) + Instr: mrs x2, tpidr_el2 (1513494 hits) (op=3D0xd53cd042/ Syste= m Reg) + Instr: mrs x0, tpidr_el2 (1490823 hits) (op=3D0xd53cd040/ Syste= m Reg) + Instr: mrs x1, sp_el0 (933793 hits) (op=3D0xd5384101/ Syste= m Reg) + Instr: mrs x2, sp_el0 (699516 hits) (op=3D0xd5384102/ Syste= m Reg) + Instr: mrs x4, tpidr_el2 (528437 hits) (op=3D0xd53cd044/ Syste= m Reg) + Instr: mrs x30, ttbr1_el1 (480776 hits) (op=3D0xd538203e/ Syste= m Reg) + Instr: msr ttbr1_el1, x30 (480713 hits) (op=3D0xd518203e/ Syste= m Reg) + Instr: msr vbar_el1, x30 (480671 hits) (op=3D0xd518c01e/ Syste= m Reg) + ... + +To find the argument shorthand for the class you need to examine the +source code of the plugin at the moment, specifically the ``*opt`` +argument in the InsnClassExecCount tables. + +Lockstep Execution +.................. + +``contrib/plugins/lockstep.c`` + +This is a debugging tool for developers who want to find out when and +where execution diverges after a subtle change to TCG code generation. +It is not an exact science and results are likely to be mixed once +asynchronous events are introduced. While the use of -icount can +introduce determinism to the execution flow it doesn't always follow +the translation sequence will be exactly the same. Typically this is +caused by a timer firing to service the GUI causing a block to end +early. However in some cases it has proved to be useful in pointing +people at roughly where execution diverges. The only argument you need +for the plugin is a path for the socket the two instances will +communicate over:: + + + $ qemu-system-sparc -monitor none -parallel none \ + -net none -M SS-20 -m 256 -kernel day11/zImage.elf \ + -plugin ./contrib/plugins/liblockstep.so,sockpath=3Dlockstep-sparc.soc= k \ + -d plugin,nochain + +which will eventually report:: + + qemu-system-sparc: warning: nic lance.0 has no peer + @ 0x000000ffd06678 vs 0x000000ffd001e0 (2/1 since last) + @ 0x000000ffd07d9c vs 0x000000ffd06678 (3/1 since last) + =CE=94 insn_count @ 0x000000ffd07d9c (809900609) vs 0x000000ffd06678 (80= 9900612) + previously @ 0x000000ffd06678/10 (809900609 insns) + previously @ 0x000000ffd001e0/4 (809900599 insns) + previously @ 0x000000ffd080ac/2 (809900595 insns) + previously @ 0x000000ffd08098/5 (809900593 insns) + previously @ 0x000000ffd080c0/1 (809900588 insns) + + +Hardware Profile +................ + +``contrib/plugins/hwprofile.c`` + +The hwprofile tool can only be used with system emulation and allows +the user to see what hardware is accessed how often. It has a number of op= tions: + +.. list-table:: Hardware Profile arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - track=3D[read|write] + - By default the plugin tracks both reads and writes. You can use + this option to limit the tracking to just one class of accesses. + * - source + - Will include a detailed break down of what the guest PC that made the + access was. Not compatible with the pattern option. Example output:: + + cirrus-low-memory @ 0xfffffd00000a0000 + pc:fffffc0000005cdc, 1, 256 + pc:fffffc0000005ce8, 1, 256 + pc:fffffc0000005cec, 1, 256 + + * - pattern + - Instead break down the accesses based on the offset into the HW + region. This can be useful for seeing the most used registers of + a device. Example output:: + + pci0-conf @ 0xfffffd01fe000000 + off:00000004, 1, 1 + off:00000010, 1, 3 + off:00000014, 1, 3 + off:00000018, 1, 2 + off:0000001c, 1, 2 + off:00000020, 1, 2 + ... + + +Execution Log +............. + +``contrib/plugins/execlog.c`` + +The execlog tool traces executed instructions with memory access. It can b= e used +for debugging and security analysis purposes. +Please be aware that this will generate a lot of output. + +The plugin needs default argument:: + + $ qemu-system-arm $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libexeclog.so -d plugin + +which will output an execution trace following this structure:: + + # vCPU, vAddr, opcode, disassembly[, load/store, memory addr, device]... + 0, 0xa12, 0xf8012400, "movs r4, #0" + 0, 0xa14, 0xf87f42b4, "cmp r4, r6" + 0, 0xa16, 0xd206, "bhs #0xa26" + 0, 0xa18, 0xfff94803, "ldr r0, [pc, #0xc]", load, 0x00010a28, RAM + 0, 0xa1a, 0xf989f000, "bl #0xd30" + 0, 0xd30, 0xfff9b510, "push {r4, lr}", store, 0x20003ee0, RAM, store, 0x= 20003ee4, RAM + 0, 0xd32, 0xf9893014, "adds r0, #0x14" + 0, 0xd34, 0xf9c8f000, "bl #0x10c8" + 0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM + +Please note that you need to configure QEMU with Capstone support to get d= isassembly. + +The output can be filtered to only track certain instructions or +addresses using the ``ifilter`` or ``afilter`` options. You can stack the +arguments if required:: + + $ qemu-system-arm $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libexeclog.so,ifilter=3Dst1w,afilter=3D0x400= 01808 -d plugin + +This plugin can also dump registers when they change value. Specify the na= me of the +registers with multiple ``reg`` options. You can also use glob style match= ing if you wish:: + + $ qemu-system-arm $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libexeclog.so,reg=3D\*_el2,reg=3Dsp -d plugin + +Be aware that each additional register to check will slow down +execution quite considerably. You can optimise the number of register +checks done by using the rdisas option. This will only instrument +instructions that mention the registers in question in disassembly. +This is not foolproof as some instructions implicitly change +instructions. You can use the ifilter to catch these cases:: + + $ qemu-system-arm $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libexeclog.so,ifilter=3Dmsr,ifilter=3Dblr,re= g=3Dx30,reg=3D\*_el1,rdisas=3Don + +Cache Modelling +............... + +``contrib/plugins/cache.c`` + +Cache modelling plugin that measures the performance of a given L1 cache +configuration, and optionally a unified L2 per-core cache when a given wor= king +set is run:: + + $ qemu-x86_64 -plugin ./contrib/plugins/libcache.so \ + -d plugin -D cache.log ./tests/tcg/x86_64-linux-user/float_convs + +will report the following:: + + core #, data accesses, data misses, dmiss rate, insn accesses, insn mi= sses, imiss rate + 0 996695 508 0.0510% 2642799 18617 = 0.7044% + + address, data misses, instruction + 0x424f1e (_int_malloc), 109, movq %rax, 8(%rcx) + 0x41f395 (_IO_default_xsputn), 49, movb %dl, (%rdi, %rax) + 0x42584d (ptmalloc_init.part.0), 33, movaps %xmm0, (%rax) + 0x454d48 (__tunables_init), 20, cmpb $0, (%r8) + ... + + address, fetch misses, instruction + 0x4160a0 (__vfprintf_internal), 744, movl $1, %ebx + 0x41f0a0 (_IO_setb), 744, endbr64 + 0x415882 (__vfprintf_internal), 744, movq %r12, %rdi + 0x4268a0 (__malloc), 696, andq $0xfffffffffffffff0, %rax + ... + +The plugin has a number of arguments, all of them are optional: + +.. list-table:: Cache modelling arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - limit=3DN + - Print top N icache and dcache thrashing instructions along with + their address, number of misses, and its disassembly. (default: 32) + * - icachesize=3DN + iblksize=3DB + iassoc=3DA + - Instruction cache configuration arguments. They specify the + cache size, block size, and associativity of the instruction + cache, respectively. (default: N =3D 16384, B =3D 64, A =3D 8) + * - dcachesize=3DN + - Data cache size (default: 16834) + * - dblksize=3DB + - Data cache block size (default: 64) + * - dassoc=3DA + - Data cache associativity (default: 8) + * - evict=3DPOLICY + - Sets the eviction policy to POLICY. Available policies are: + ``lru``, ``fifo``, and ``rand``. The plugin will use + the specified policy for both instruction and data caches. + (default: POLICY =3D ``lru``) + * - cores=3DN + - Sets the number of cores for which we maintain separate icache + and dcache. (default: for linux-user, N =3D 1, for full system + emulation: N =3D cores available to guest) + * - l2=3Don + - Simulates a unified L2 cache (stores blocks for both + instructions and data) using the default L2 configuration (cache + size =3D 2MB, associativity =3D 16-way, block size =3D 64B). + * - l2cachesize=3DN + - L2 cache size (default: 2097152 (2MB)), implies ``l2=3Don`` + * - l2blksize=3DB + - L2 cache block size (default: 64), implies ``l2=3Don`` + * - l2assoc=3DA + - L2 cache associativity (default: 16), implies ``l2=3Don`` + +Stop on Trigger +............... + +``contrib/plugins/stoptrigger.c`` + +The stoptrigger plugin allows to setup triggers to stop emulation. +It can be used for research purposes to launch some code and precisely sto= p it +and understand where its execution flow went. + +Two types of triggers can be configured: a count of instructions to stop a= t, +or an address to stop at. Multiple triggers can be set at once. + +By default, QEMU will exit with return code 0. A custom return code can be +configured for each trigger using ``:CODE`` syntax. + +For example, to stop at the 20-th instruction with return code 41, at addr= ess +0xd4 with return code 0 or at address 0xd8 with return code 42:: + + $ qemu-system-aarch64 $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libstoptrigger.so,icount=3D20:41,addr=3D0xd4= ,addr=3D0xd8:42 -d plugin + +The plugin will log the reason of exit, for example:: + + 0xd4 reached, exiting + +Other emulation features +------------------------ + +When running system emulation you can also enable deterministic +execution which allows for repeatable record/replay debugging. See +:ref:`Record/Replay` for more details. + diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 954623f9bf..d8725c2854 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -8,38 +8,6 @@ QEMU TCG Plugins =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -QEMU TCG plugins provide a way for users to run experiments taking -advantage of the total system control emulation can have over a guest. -It provides a mechanism for plugins to subscribe to events during -translation and execution and optionally callback into the plugin -during these events. TCG plugins are unable to change the system state -only monitor it passively. However they can do this down to an -individual instruction granularity including potentially subscribing -to all load and store operations. - -Usage ------ - -Any QEMU binary with TCG support has plugins enabled by default. -Earlier releases needed to be explicitly enabled with:: - - configure --enable-plugins - -Once built a program can be run with multiple plugins loaded each with -their own arguments:: - - $QEMU $OTHER_QEMU_ARGS \ - -plugin contrib/plugin/libhowvec.so,inline=3Don,count=3Dhint \ - -plugin contrib/plugin/libhotblocks.so - -Arguments are plugin specific and can be used to modify their -behaviour. In this case the howvec plugin is being asked to use inline -ops to count and break down the hint instructions by type. - -Linux user-mode emulation also evaluates the environment variable -``QEMU_PLUGIN``:: - - QEMU_PLUGIN=3D"file=3Dcontrib/plugins/libhowvec.so,inline=3Don,count=3Dh= int" $QEMU =20 Writing plugins --------------- @@ -191,479 +159,6 @@ which means callbacks may still occur after the unins= tall operation is requested. The plugin isn't completely uninstalled until the safe work has executed while all vCPUs are quiescent. =20 -Example Plugins -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -There are a number of plugins included with QEMU and you are -encouraged to contribute your own plugins plugins upstream. There is a -``contrib/plugins`` directory where they can go. There are also some -basic plugins that are used to test and exercise the API during the -``make check-tcg`` target in ``tests\plugins``. - -- tests/plugins/empty.c - -Purely a test plugin for measuring the overhead of the plugins system -itself. Does no instrumentation. - -- tests/plugins/bb.c - -A very basic plugin which will measure execution in course terms as -each basic block is executed. By default the results are shown once -execution finishes:: - - $ qemu-aarch64 -plugin tests/plugin/libbb.so \ - -d plugin ./tests/tcg/aarch64-linux-user/sha1 - SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 - bb's: 2277338, insns: 158483046 - -Behaviour can be tweaked with the following arguments: - - * inline=3Dtrue|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * idle=3Dtrue|false - - Dump the current execution stats whenever the guest vCPU idles - -- tests/plugins/insn.c - -This is a basic instruction level instrumentation which can count the -number of instructions executed on each core/thread:: - - $ qemu-aarch64 -plugin tests/plugin/libinsn.so \ - -d plugin ./tests/tcg/aarch64-linux-user/threadcount - Created 10 threads - Done - cpu 0 insns: 46765 - cpu 1 insns: 3694 - cpu 2 insns: 3694 - cpu 3 insns: 2994 - cpu 4 insns: 1497 - cpu 5 insns: 1497 - cpu 6 insns: 1497 - cpu 7 insns: 1497 - total insns: 63135 - -Behaviour can be tweaked with the following arguments: - - * inline=3Dtrue|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * sizes=3Dtrue|false - - Give a summary of the instruction sizes for the execution - - * match=3D - - Only instrument instructions matching the string prefix. Will show - some basic stats including how many instructions have executed since - the last execution. For example:: - - $ qemu-aarch64 -plugin tests/plugin/libinsn.so,match=3Dbl \ - -d plugin ./tests/tcg/aarch64-linux-user/sha512-vector - ... - 0x40069c, 'bl #0x4002b0', 10 hits, 1093 match hits, =CE=94+1257 since l= ast match, 98 avg insns/match - 0x4006ac, 'bl #0x403690', 10 hits, 1094 match hits, =CE=94+47 since las= t match, 98 avg insns/match=20 - 0x4037fc, 'bl #0x4002b0', 18 hits, 1095 match hits, =CE=94+22 since las= t match, 98 avg insns/match=20 - 0x400720, 'bl #0x403690', 10 hits, 1096 match hits, =CE=94+58 since las= t match, 98 avg insns/match=20 - 0x4037fc, 'bl #0x4002b0', 19 hits, 1097 match hits, =CE=94+22 since las= t match, 98 avg insns/match=20 - 0x400730, 'bl #0x403690', 10 hits, 1098 match hits, =CE=94+33 since las= t match, 98 avg insns/match=20 - 0x4037ac, 'bl #0x4002b0', 12 hits, 1099 match hits, =CE=94+20 since las= t match, 98 avg insns/match=20 - ... - -For more detailed execution tracing see the ``execlog`` plugin for -other options. - -- tests/plugins/mem.c - -Basic instruction level memory instrumentation:: - - $ qemu-aarch64 -plugin tests/plugin/libmem.so,inline=3Dtrue \ - -d plugin ./tests/tcg/aarch64-linux-user/sha1 - SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 - inline mem accesses: 79525013 - -Behaviour can be tweaked with the following arguments: - - * inline=3Dtrue|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * callback=3Dtrue|false - - Use callbacks on each memory instrumentation. - - * hwaddr=3Dtrue|false - - Count IO accesses (only for system emulation) - -- tests/plugins/syscall.c - -A basic syscall tracing plugin. This only works for user-mode. By -default it will give a summary of syscall stats at the end of the -run:: - - $ qemu-aarch64 -plugin tests/plugin/libsyscall \ - -d plugin ./tests/tcg/aarch64-linux-user/threadcount - Created 10 threads - Done - syscall no. calls errors - 226 12 0 - 99 11 11 - 115 11 0 - 222 11 0 - 93 10 0 - 220 10 0 - 233 10 0 - 215 8 0 - 214 4 0 - 134 2 0 - 64 2 0 - 96 1 0 - 94 1 0 - 80 1 0 - 261 1 0 - 78 1 0 - 160 1 0 - 135 1 0 - -- contrib/plugins/hotblocks.c - -The hotblocks plugin allows you to examine the where hot paths of -execution are in your program. Once the program has finished you will -get a sorted list of blocks reporting the starting PC, translation -count, number of instructions and execution count. This will work best -with linux-user execution as system emulation tends to generate -re-translations as blocks from different programs get swapped in and -out of system memory. - -If your program is single-threaded you can use the ``inline`` option for -slightly faster (but not thread safe) counters. - -Example:: - - $ qemu-aarch64 \ - -plugin contrib/plugins/libhotblocks.so -d plugin \ - ./tests/tcg/aarch64-linux-user/sha1 - SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 - collected 903 entries in the hash table - pc, tcount, icount, ecount - 0x0000000041ed10, 1, 5, 66087 - 0x000000004002b0, 1, 4, 66087 - ... - -- contrib/plugins/hotpages.c - -Similar to hotblocks but this time tracks memory accesses:: - - $ qemu-aarch64 \ - -plugin contrib/plugins/libhotpages.so -d plugin \ - ./tests/tcg/aarch64-linux-user/sha1 - SHA1=3D15dd99a1991e0b3826fede3deffc1feba42278e6 - Addr, RCPUs, Reads, WCPUs, Writes - 0x000055007fe000, 0x0001, 31747952, 0x0001, 8835161 - 0x000055007ff000, 0x0001, 29001054, 0x0001, 8780625 - 0x00005500800000, 0x0001, 687465, 0x0001, 335857 - 0x0000000048b000, 0x0001, 130594, 0x0001, 355 - 0x0000000048a000, 0x0001, 1826, 0x0001, 11 - -The hotpages plugin can be configured using the following arguments: - - * sortby=3Dreads|writes|address - - Log the data sorted by either the number of reads, the number of writes,= or - memory address. (Default: entries are sorted by the sum of reads and wri= tes) - - * io=3Don - - Track IO addresses. Only relevant to full system emulation. (Default: of= f) - - * pagesize=3DN - - The page size used. (Default: N =3D 4096) - -- contrib/plugins/howvec.c - -This is an instruction classifier so can be used to count different -types of instructions. It has a number of options to refine which get -counted. You can give a value to the ``count`` argument for a class of -instructions to break it down fully, so for example to see all the system -registers accesses:: - - $ qemu-system-aarch64 $(QEMU_ARGS) \ - -append "root=3D/dev/sda2 systemd.unit=3Dbenchmark.service" \ - -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=3Dsreg -d plugin - -which will lead to a sorted list after the class breakdown:: - - Instruction Classes: - Class: UDEF not counted - Class: SVE (68 hits) - Class: PCrel addr (47789483 hits) - Class: Add/Sub (imm) (192817388 hits) - Class: Logical (imm) (93852565 hits) - Class: Move Wide (imm) (76398116 hits) - Class: Bitfield (44706084 hits) - Class: Extract (5499257 hits) - Class: Cond Branch (imm) (147202932 hits) - Class: Exception Gen (193581 hits) - Class: NOP not counted - Class: Hints (6652291 hits) - Class: Barriers (8001661 hits) - Class: PSTATE (1801695 hits) - Class: System Insn (6385349 hits) - Class: System Reg counted individually - Class: Branch (reg) (69497127 hits) - Class: Branch (imm) (84393665 hits) - Class: Cmp & Branch (110929659 hits) - Class: Tst & Branch (44681442 hits) - Class: AdvSimd ldstmult (736 hits) - Class: ldst excl (9098783 hits) - Class: Load Reg (lit) (87189424 hits) - Class: ldst noalloc pair (3264433 hits) - Class: ldst pair (412526434 hits) - Class: ldst reg (imm) (314734576 hits) - Class: Loads & Stores (2117774 hits) - Class: Data Proc Reg (223519077 hits) - Class: Scalar FP (31657954 hits) - Individual Instructions: - Instr: mrs x0, sp_el0 (2682661 hits) (op=3D0xd5384100/ Syste= m Reg) - Instr: mrs x1, tpidr_el2 (1789339 hits) (op=3D0xd53cd041/ Syste= m Reg) - Instr: mrs x2, tpidr_el2 (1513494 hits) (op=3D0xd53cd042/ Syste= m Reg) - Instr: mrs x0, tpidr_el2 (1490823 hits) (op=3D0xd53cd040/ Syste= m Reg) - Instr: mrs x1, sp_el0 (933793 hits) (op=3D0xd5384101/ Syste= m Reg) - Instr: mrs x2, sp_el0 (699516 hits) (op=3D0xd5384102/ Syste= m Reg) - Instr: mrs x4, tpidr_el2 (528437 hits) (op=3D0xd53cd044/ Syste= m Reg) - Instr: mrs x30, ttbr1_el1 (480776 hits) (op=3D0xd538203e/ Syste= m Reg) - Instr: msr ttbr1_el1, x30 (480713 hits) (op=3D0xd518203e/ Syste= m Reg) - Instr: msr vbar_el1, x30 (480671 hits) (op=3D0xd518c01e/ Syste= m Reg) - ... - -To find the argument shorthand for the class you need to examine the -source code of the plugin at the moment, specifically the ``*opt`` -argument in the InsnClassExecCount tables. - -- contrib/plugins/lockstep.c - -This is a debugging tool for developers who want to find out when and -where execution diverges after a subtle change to TCG code generation. -It is not an exact science and results are likely to be mixed once -asynchronous events are introduced. While the use of -icount can -introduce determinism to the execution flow it doesn't always follow -the translation sequence will be exactly the same. Typically this is -caused by a timer firing to service the GUI causing a block to end -early. However in some cases it has proved to be useful in pointing -people at roughly where execution diverges. The only argument you need -for the plugin is a path for the socket the two instances will -communicate over:: - - - $ qemu-system-sparc -monitor none -parallel none \ - -net none -M SS-20 -m 256 -kernel day11/zImage.elf \ - -plugin ./contrib/plugins/liblockstep.so,sockpath=3Dlockstep-sparc.soc= k \ - -d plugin,nochain - -which will eventually report:: - - qemu-system-sparc: warning: nic lance.0 has no peer - @ 0x000000ffd06678 vs 0x000000ffd001e0 (2/1 since last) - @ 0x000000ffd07d9c vs 0x000000ffd06678 (3/1 since last) - =CE=94 insn_count @ 0x000000ffd07d9c (809900609) vs 0x000000ffd06678 (80= 9900612) - previously @ 0x000000ffd06678/10 (809900609 insns) - previously @ 0x000000ffd001e0/4 (809900599 insns) - previously @ 0x000000ffd080ac/2 (809900595 insns) - previously @ 0x000000ffd08098/5 (809900593 insns) - previously @ 0x000000ffd080c0/1 (809900588 insns) - -- contrib/plugins/hwprofile.c - -The hwprofile tool can only be used with system emulation and allows -the user to see what hardware is accessed how often. It has a number of op= tions: - - * track=3Dread or track=3Dwrite - - By default the plugin tracks both reads and writes. You can use one - of these options to limit the tracking to just one class of accesses. - - * source - - Will include a detailed break down of what the guest PC that made the - access was. Not compatible with the pattern option. Example output:: - - cirrus-low-memory @ 0xfffffd00000a0000 - pc:fffffc0000005cdc, 1, 256 - pc:fffffc0000005ce8, 1, 256 - pc:fffffc0000005cec, 1, 256 - - * pattern - - Instead break down the accesses based on the offset into the HW - region. This can be useful for seeing the most used registers of a - device. Example output:: - - pci0-conf @ 0xfffffd01fe000000 - off:00000004, 1, 1 - off:00000010, 1, 3 - off:00000014, 1, 3 - off:00000018, 1, 2 - off:0000001c, 1, 2 - off:00000020, 1, 2 - ... - -- contrib/plugins/execlog.c - -The execlog tool traces executed instructions with memory access. It can b= e used -for debugging and security analysis purposes. -Please be aware that this will generate a lot of output. - -The plugin needs default argument:: - - $ qemu-system-arm $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libexeclog.so -d plugin - -which will output an execution trace following this structure:: - - # vCPU, vAddr, opcode, disassembly[, load/store, memory addr, device]... - 0, 0xa12, 0xf8012400, "movs r4, #0" - 0, 0xa14, 0xf87f42b4, "cmp r4, r6" - 0, 0xa16, 0xd206, "bhs #0xa26" - 0, 0xa18, 0xfff94803, "ldr r0, [pc, #0xc]", load, 0x00010a28, RAM - 0, 0xa1a, 0xf989f000, "bl #0xd30" - 0, 0xd30, 0xfff9b510, "push {r4, lr}", store, 0x20003ee0, RAM, store, 0x= 20003ee4, RAM - 0, 0xd32, 0xf9893014, "adds r0, #0x14" - 0, 0xd34, 0xf9c8f000, "bl #0x10c8" - 0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM - -Please note that you need to configure QEMU with Capstone support to get d= isassembly. - -The output can be filtered to only track certain instructions or -addresses using the ``ifilter`` or ``afilter`` options. You can stack the -arguments if required:: - - $ qemu-system-arm $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libexeclog.so,ifilter=3Dst1w,afilter=3D0x400= 01808 -d plugin - -This plugin can also dump registers when they change value. Specify the na= me of the -registers with multiple ``reg`` options. You can also use glob style match= ing if you wish:: - - $ qemu-system-arm $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libexeclog.so,reg=3D\*_el2,reg=3Dsp -d plugin - -Be aware that each additional register to check will slow down -execution quite considerably. You can optimise the number of register -checks done by using the rdisas option. This will only instrument -instructions that mention the registers in question in disassembly. -This is not foolproof as some instructions implicitly change -instructions. You can use the ifilter to catch these cases: - - $ qemu-system-arm $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libexeclog.so,ifilter=3Dmsr,ifilter=3Dblr,re= g=3Dx30,reg=3D\*_el1,rdisas=3Don - -- contrib/plugins/cache.c - -Cache modelling plugin that measures the performance of a given L1 cache -configuration, and optionally a unified L2 per-core cache when a given wor= king -set is run:: - - $ qemu-x86_64 -plugin ./contrib/plugins/libcache.so \ - -d plugin -D cache.log ./tests/tcg/x86_64-linux-user/float_convs - -will report the following:: - - core #, data accesses, data misses, dmiss rate, insn accesses, insn mi= sses, imiss rate - 0 996695 508 0.0510% 2642799 18617 = 0.7044% - - address, data misses, instruction - 0x424f1e (_int_malloc), 109, movq %rax, 8(%rcx) - 0x41f395 (_IO_default_xsputn), 49, movb %dl, (%rdi, %rax) - 0x42584d (ptmalloc_init.part.0), 33, movaps %xmm0, (%rax) - 0x454d48 (__tunables_init), 20, cmpb $0, (%r8) - ... - - address, fetch misses, instruction - 0x4160a0 (__vfprintf_internal), 744, movl $1, %ebx - 0x41f0a0 (_IO_setb), 744, endbr64 - 0x415882 (__vfprintf_internal), 744, movq %r12, %rdi - 0x4268a0 (__malloc), 696, andq $0xfffffffffffffff0, %rax - ... - -The plugin has a number of arguments, all of them are optional: - - * limit=3DN - - Print top N icache and dcache thrashing instructions along with their - address, number of misses, and its disassembly. (default: 32) - - * icachesize=3DN - * iblksize=3DB - * iassoc=3DA - - Instruction cache configuration arguments. They specify the cache size, = block - size, and associativity of the instruction cache, respectively. - (default: N =3D 16384, B =3D 64, A =3D 8) - - * dcachesize=3DN - * dblksize=3DB - * dassoc=3DA - - Data cache configuration arguments. They specify the cache size, block s= ize, - and associativity of the data cache, respectively. - (default: N =3D 16384, B =3D 64, A =3D 8) - - * evict=3DPOLICY - - Sets the eviction policy to POLICY. Available policies are: :code:`lru`, - :code:`fifo`, and :code:`rand`. The plugin will use the specified policy= for - both instruction and data caches. (default: POLICY =3D :code:`lru`) - - * cores=3DN - - Sets the number of cores for which we maintain separate icache and dcach= e. - (default: for linux-user, N =3D 1, for full system emulation: N =3D cores - available to guest) - - * l2=3Don - - Simulates a unified L2 cache (stores blocks for both instructions and da= ta) - using the default L2 configuration (cache size =3D 2MB, associativity = =3D 16-way, - block size =3D 64B). - - * l2cachesize=3DN - * l2blksize=3DB - * l2assoc=3DA - - L2 cache configuration arguments. They specify the cache size, block siz= e, and - associativity of the L2 cache, respectively. Setting any of the L2 - configuration arguments implies ``l2=3Don``. - (default: N =3D 2097152 (2MB), B =3D 64, A =3D 16) - -- contrib/plugins/stoptrigger.c - -The stoptrigger plugin allows to setup triggers to stop emulation. -It can be used for research purposes to launch some code and precisely sto= p it -and understand where its execution flow went. - -Two types of triggers can be configured: a count of instructions to stop a= t, -or an address to stop at. Multiple triggers can be set at once. - -By default, QEMU will exit with return code 0. A custom return code can be -configured for each trigger using ``:CODE`` syntax. - -For example, to stop at the 20-th instruction with return code 41, at addr= ess -0xd4 with return code 0 or at address 0xd8 with return code 42:: - - $ qemu-system-aarch64 $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libstoptrigger.so,icount=3D20:41,addr=3D0xd4= ,addr=3D0xd8:42 -d plugin - -The plugin will log the reason of exit, for example:: - - 0xd4 reached, exiting - Plugin API =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264388; cv=none; d=zohomail.com; s=zohoarc; b=klbB4UzmC8E6AtMRLWPHmL08iWBTq40tEKVQkI0+uuLmgA5pprt02JkS6jU3zeJuMWd1sG1uXeuHo4OCM7tfLjYg3RGzipJ/pdXKTywN3AT4yU5ROAv4p8ePxZ0Hg1jqv2kVB+U2lzYXpWFclx8qV5xaSabAGahJ3DJX33ZC2Gg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=cxOj9xkZbVC/URhvnaDmY0Ycjcv6BCgXgj3wJ6hJyJ/U1CHYp9YcfP+9sKAhyPGKkDc6SbS1MElyHJZD5EbDNtkTZ5ZxEuH1NUfGiJWtKs/4l37crL65B05815R41wp9VsngrnO/LEA4zm+pczm6PZUpeptNIZA8Nd5W6ViSvPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264388331355.0125420155605; Mon, 29 Jul 2024 07:46:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc5-0004f9-Ep; Mon, 29 Jul 2024 10:44: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 1sYRc2-0004Tt-Un for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:34 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbu-0008Qt-1m for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:34 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-59589a9be92so5517642a12.2 for ; Mon, 29 Jul 2024 07:44:25 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23f62sm521017766b.16.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2B5B55FA0F; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264264; x=1722869064; darn=nongnu.org; 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=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=Z2CEoM92tEPrgbCv3G50GCaNNquDrhaqb4Z0df7ZkDIsSxjJ0ETU21NAsdmg+nILnL gVxhZnsv3UI+F/J508GHpeIHpAb989zcwmX1YaWL3CiKt4+TiMvu9USOw9a0OgZMthrY 8mTAspm3gqmGpJ9s9OnUxAa7uw/3TNUZy9URbE7UgA6we/4K/snleCP1FGMqLpQf0iqm wKR2i6BvKfmNB1cIWULU/wV3GMMDuKd8GXgoaBeHSnQHLNR8ufHS1dxlH9Pwl8wNOoVW vCE8yQkTzabAwJr+1DHmHt/2hwi6UlugfNKHVf30pt/oFK6qKgtzIj1PV90gsOtCvqZY pO/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264264; x=1722869064; 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=Pge7513nKBshjtyBdFZgBKyCSQ2SDh37JkBFhtHAoCg=; b=m/jCLjm8TAYJ5Oz3C/6ou/bsvhgtfB1IeY8dNl+j3+ns2TOeiQIgwvBCdH40NpW+wZ KZLbx9iKRIwzpJM41ZCjywVuV329TUeMlMtaPdGMiFDYsagjj0os39caGjTyOwzEs708 zNOZicHEohmHHwkrFloIjZOTjdc+eqcbZ8mIMdMIOGWv3AXeY3GBYf/OPcToUeOG7Rtx LbekSaHZgaW59u667lCVWXWxUfrF/A9ep1X+Nws1z55yzsLlzPq4Yv7YXitqX2yfLVdf +HLQ+Q3oXAFoVYTn0SVkm5sqvryJvckfOCkAKtcmNNLpNaALHcanp+gfRonHcC1TSU9R w2iA== X-Gm-Message-State: AOJu0YyhGZa1W6u58F/tUmkVUY7sVitd5YP1P3Xf4qRkEZ3wzwlkHqtH gy53oktokv48DQP7jzpI00JTuJce974ctvtbPowJyvaRYEsu3jwCbChuUUCWRI0= X-Google-Smtp-Source: AGHT+IEsWFJLPqGVDsePmlOLfsx8ltOW1GIOJELld/RlChVzU5ZaLow5qjhWmwCesZntknV+adzZ2Q== X-Received: by 2002:a17:907:96a0:b0:a72:7da4:267c with SMTP id a640c23a62f3a-a7d3ffa612bmr624237466b.12.1722264264369; Mon, 29 Jul 2024 07:44:24 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access Date: Mon, 29 Jul 2024 15:44:11 +0100 Message-Id: <20240729144414.830369-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264389911116600 From: Peter Maydell In append_stats_line(), we have an expression l2_access ? l2_miss_rate : 0.0 But this is inside an if (l2_access && l2_misses) { ... } block, so Coverity points out that the false part of the ?: is dead code. Remove the unnecessary test. Resolves: Coverity CID 1522458 Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20240725164851.1930964-1-peter.maydell@linaro.org> Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- contrib/plugins/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index c5c8ac75a9..512ef6776b 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -558,7 +558,7 @@ static void append_stats_line(GString *line, " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, l2_misses, - l2_access ? l2_miss_rate : 0.0); + l2_miss_rate); } =20 g_string_append(line, "\n"); --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264346; cv=none; d=zohomail.com; s=zohoarc; b=dGsb1d9ek0nx/DJOyfzveC2V0EHVnfjR2QRPPUMUK4ruj8jz5F1MypdM2F6IUinEmg2o61nMQ4TOrPdo6bdi3OSFCOGPZgdXhxQJWIbBI8RwEi830Z3O97ihyq3RpaUP1BHa9a8WtPf+L+9DPyCJmc3GLi9748kFDvqYXNukVro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264346; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RIOayMEsJA1tkmepteKB9T0FXWTwbDeTnBtcVohO/HQ=; b=cMFPoYG4Q3Z0QdEO7Fu0+KSFe5GfJU7c7LSMbYcnXcCUe7Jmja2OoJ4mboauKl4AikTmSmM4avhd4LBIiwKElZj22xVQ9Onp3OU33DFpy4CMisX1zOxM1vjucHm4kKY5cv7+qciIzrEza6NnpTUA+LiWxsD2lXY+2LcKnHJgLr8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264346424106.3973019465094; Mon, 29 Jul 2024 07:45:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc3-0004W8-GJ; Mon, 29 Jul 2024 10:44: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 1sYRc1-0004OS-NW for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:33 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbt-0008Q3-Cs for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:33 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5a2ffc346ceso5322527a12.1 for ; Mon, 29 Jul 2024 07:44:24 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad91080sm518097066b.160.2024.07.29.07.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:19 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 43DE05FA11; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264264; x=1722869064; darn=nongnu.org; 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=RIOayMEsJA1tkmepteKB9T0FXWTwbDeTnBtcVohO/HQ=; b=vrz7AqpY0TeQ9/WAPxNm5oFSfMpOi4siqTB17ebTmwHEDG/t0vhuTJpW+G7JqxBK+f RmJCEiIF70+kJe70TsWh+RqongjyO3z5NvWRRuh1mLYz4Y3oEWPRewT4JLBXMkTmooHj pZsGUDWq8p5ewK1qy808Nr8uFr7B/huXBpIGCNKU+43o7KFNXa/CQZvNMgWFqS4CQv7G 7k19hi1U3Y3UohipcWFzN5kWGk6XstRciq54GAbsvWDQGOnWPhuaHadHnEajt1hSb/0L V2yKU91SUud4NGBBKPy2Mvlj80HpnoW8gnFzh7iZHIWZfhDPcE13WIt4fFznIghORmM+ pC2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264264; x=1722869064; 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=RIOayMEsJA1tkmepteKB9T0FXWTwbDeTnBtcVohO/HQ=; b=U24osGjbA8cHM9XpdQjgrLaEyLL2pxLYgZ9l9vly2zkUpQBk3S27k9zL7fw5bh4GhY 0jbfVmSFVVHD8/yqiu9Rc0NXN3k7PXs7dgOroJMe+0FlP3ElQ0T675D9mGzJeaCMl8QZ S4fJES0GThWqfgoRs4I9B/CmFnfyXTfibgOYbinsSTOBxl/FocPL3aHVmBz/eJwovead k7v6J+AU5vXi1691E22bJTS1LLZjp4uPC7lPYSNGWB1LvvY8Qwm/CUwMENYxrKeTFya/ 1fq1wev584+SS1fnbeF1V6s8fER+BrF/CrzTeWuTtccXLebYszzCl0HBDQjh3skhX2Co iOaA== X-Gm-Message-State: AOJu0YzRhHIppF4aVb64B2br+Adkp1+4zXV7iHrtEX5UWZhxqprV3kOb oPcsmEZXT7giU/CjDdbhfUwDs1MafVCHrogs8zHy4YA1hE32Vgtpscg8H6EtKq4= X-Google-Smtp-Source: AGHT+IFBqzVWW8HN4yEEamLBDbG/voeZt/brB68Ctd58ksy7qlSURXpWYpi+y2eacnqXtSPvTiYy9A== X-Received: by 2002:a17:907:3d9e:b0:a77:ab40:6d7f with SMTP id a640c23a62f3a-a7d401781femr483657566b.43.1722264263519; Mon, 29 Jul 2024 07:44:23 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 12/14] contrib/plugins: be more vocal building Date: Mon, 29 Jul 2024 15:44:12 +0100 Message-Id: <20240729144414.830369-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264347722116600 With the conversion to meson and removing the old QEMU Makefile baggage we became very silent when building the plugins. Bring in a copy of the quiet-command logic (and some magic COMMAs) so we can at least assure developers we are building them. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2457 Signed-off-by: Alex Benn=C3=A9e --- Maybe we should just move to a meson build as proposed here: https://gitlab.com/qemu-project/qemu/-/issues/1710 --- contrib/plugins/Makefile | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 98a89d5c40..edf256cd9d 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -39,26 +39,41 @@ endif =20 SONAMES :=3D $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) =20 -# The main QEMU uses Glib extensively so it's perfectly fine to use it +# The main QEMU uses Glib extensively so it is perfectly fine to use it # in plugins (which many example do). PLUGIN_CFLAGS :=3D $(shell $(PKG_CONFIG) --cflags glib-2.0) PLUGIN_CFLAGS +=3D -fPIC -Wall PLUGIN_CFLAGS +=3D -I$(TOP_SRC_PATH)/include/qemu =20 +# Helper that honours V=3D1 so we get some output when compiling +quiet-@ =3D $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(stri= p $2)" && )) +quiet-command =3D $(call quiet-@,$2,$3)$1 + +# for including , in command strings +COMMA :=3D , + all: $(SONAMES) =20 %.o: %.c - $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $< + $(call quiet-command, \ + $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<, \ + BUILD, plugin $@) =20 ifeq ($(CONFIG_WIN32),y) lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a - $(CC) -shared -o $@ $^ $(LDLIBS) + $(call quiet-command, \ + $(CC) -shared -o $@ $^ $(LDLIBS), \ + LINK, plugin $@) else ifeq ($(CONFIG_DARWIN),y) lib%$(SO_SUFFIX): %.o - $(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS) + $(call quiet-command, \ + $(CC) -bundle -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup -o $@ $^ $(LDL= IBS), \ + LINK, plugin $@) else lib%$(SO_SUFFIX): %.o - $(CC) -shared -o $@ $^ $(LDLIBS) + $(call quiet-command, \ + $(CC) -shared -o $@ $^ $(LDLIBS), \ + LINK, plugin $@) endif =20 =20 --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264387; cv=none; d=zohomail.com; s=zohoarc; b=iibT9xqk9s+1w3lVUFr0CDj/QuarxAukac1MWMtjqGmrjR3NvcfiC1w2RpkWg7jVKF8cpM2inG6ljtPH/UcuLIJ8R3Q6ewmxvuU4TlXB33AFlok3J0120oOz11q+C9GyPnlEXaOnhD1EuHOPS42SOxYoMIruqUZdali5KQXPj5Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264387; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4I0UyAB3UWkIb2mikOF5Y9Vqa9qt5KlackYDMoOxLtQ=; b=lid9SE9lhQIjcV/7SlOKQlVvxBabZtVewpk8Wnkwdp7+ZNOGGCKQMkgDZy5NN7hxSPWuOTrFWZ44oTn8AhBqvZ6Y3Hp9ECXjf0yeto1IM+6RfvbFXowLDtmeVo7zLrGv7p1mBnjGIKBhj1n8diZirTFZ9rufClDyzJ66zAe98RQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264387288758.3156458368406; Mon, 29 Jul 2024 07:46:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRcE-0005Lc-01; Mon, 29 Jul 2024 10:44: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 1sYRcC-00059h-Cd for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:44 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbx-0008T6-OZ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:44 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ef2d582e31so43256691fa.2 for ; Mon, 29 Jul 2024 07:44:29 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac64eb3980sm5826419a12.60.2024.07.29.07.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:22 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5BB2B5FA13; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264267; x=1722869067; darn=nongnu.org; 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=4I0UyAB3UWkIb2mikOF5Y9Vqa9qt5KlackYDMoOxLtQ=; b=sG1vEoLA2oL9obrMh0u1O9ESES+2c28ICDgmpokytLO7Btls7/4bf7ufsomDqX7FNT rWFwZ15lHEsZ9zEEaIp0hnuw1tX9fso+amNLUAbUr7rq4s0Z6F0OAa9JNJc497BkZE8n 1aGjiP064JxTrCWUkaeKEF/60G0h2/13c4wfApbs5/Ez5ksaTfdh08KD7nmNK2cWCDK8 CLPr0Qt32pcYGWE7sZomFX3+MFOebfETJABkZJTbTDrvivbRrBtHEkDq1yH72h3lnMXP rQ/2TH6qJHo6RNKs/2lwNiRgi4IyrWHHKRn+s/1nVLQ2Md8YycHSBNCZnJPTmWI0REuB rXnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264267; x=1722869067; 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=4I0UyAB3UWkIb2mikOF5Y9Vqa9qt5KlackYDMoOxLtQ=; b=Qv59pi2DU1SEM6HPH6epFoh2Vh1V/5pnn3Fpieb53Z8/eaXbW++P6Eu2q9YORRnLbm PHNZgpefn2kfqtui3r1b2w4rn6YepOBK2eBiAQ/GNzJrzr2hqFNmBvVEuaQ6Ld8BmcUu I0HhdlDSR+iY/SVOOjuJaDYk0hn8gqTrgpkoNmNqy63UW7rZMrVau1wzTITVZtIlJ2Jo yDcos5qY1R03xIfE1NvL41uHXaflTqSXQnJzVwOiaERQ3Sj0cWhsspSlQ07SPeCeMVNX SkoEuJt5k+SK+GUcR3wuj4KPwuCObTFczYiEMr4h3rlMhd9K4Eq/yiRftpRIFNdPnSFq IJGQ== X-Gm-Message-State: AOJu0YzEH98twn2LWbnh9xReLW6AK43j4XO4/Q/yiYSTMSYJp0scG4iX TdQR7cIig58NM0dwAp+av/nw87txi5fCeIo1JdPAbQwntqB59x5294Bniy8E5hY= X-Google-Smtp-Source: AGHT+IFl4LCULlJKEByDcLtWCZgItRAwJArV3m4eNczbzVK0sd35IGpGBF3Tkz0ksybl+CJB4WXE/g== X-Received: by 2002:a05:651c:1541:b0:2ef:2d6e:58fe with SMTP id 38308e7fff4ca-2f12ee55aabmr58999511fa.32.1722264266422; Mon, 29 Jul 2024 07:44:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 13/14] contrib/plugins: add compat for g_memdup2 Date: Mon, 29 Jul 2024 15:44:13 +0100 Message-Id: <20240729144414.830369-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x235.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264387982116600 We were premature if bumping this because some of our builds are still on older glibs. Just copy the compat handler for now and we can remove it later. Signed-off-by: Alex Benn=C3=A9e Fixes: ee293103b0 (plugins: update lockstep to use g_memdup2) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2161 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- contrib/plugins/lockstep.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 6a7e9bbb39..62981d4e09 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -101,6 +101,31 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) plugin_cleanup(id); } =20 +/* + * g_memdup has been deprecated in Glib since 2.68 and + * will complain about it if you try to use it. However until + * glib_req_ver for QEMU is bumped we make a copy of the glib-compat + * handler. + */ +static inline gpointer g_memdup2_qemu(gconstpointer mem, gsize byte_size) +{ +#if GLIB_CHECK_VERSION(2, 68, 0) + return g_memdup2(mem, byte_size); +#else + gpointer new_mem; + + if (mem && byte_size !=3D 0) { + new_mem =3D g_malloc(byte_size); + memcpy(new_mem, mem, byte_size); + } else { + new_mem =3D NULL; + } + + return new_mem; +#endif +} +#define g_memdup2(m, s) g_memdup2_qemu(m, s) + static void report_divergance(ExecState *us, ExecState *them) { DivergeState divrec =3D { log, 0 }; --=20 2.39.2 From nobody Sun Nov 24 15:01:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1722264317; cv=none; d=zohomail.com; s=zohoarc; b=k8QPf6vw1Tx12lGFMJdFgcOMv2KSyq1SNLnSqm3mxM7KyWAeSBTvbOrRpvm0uAf6q7EpRURaOjIDWGx2Ez7YzFovgyNRldeqxi6Q+ajhTG0njnEEchAmtqjYhCv2+ZL8S9S7QZ8KSH4R3aPxgpLDdkFVqw3i8jyRRpBsZzOOz90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722264317; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PtcZqFWHrEGoL41FTohMyKEPDwyICpuVF7RbypBJq3A=; b=KiOB75Epo2xkxEnpwzjpZLDeqZUPz1KAssskFSU49pYIXHAWOCAhCqnWx8Z66UE+k1K0Ks3Rk2+9zNBm5VM0GBYgz5ITTBX7kbbxIbKVknVpBjg8wQz1tTAfrPo5qrdbjRjtp6GxO1YkoRlTH7ufoI0qUg0apcnse1TvMESloes= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1722264317548573.3618435064653; Mon, 29 Jul 2024 07:45:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYRc9-0004xF-Gc; Mon, 29 Jul 2024 10:44: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 1sYRc6-0004jX-CP for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:38 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYRbv-0008Rv-SR for qemu-devel@nongnu.org; Mon, 29 Jul 2024 10:44:38 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-58ef19aa69dso4070789a12.3 for ; Mon, 29 Jul 2024 07:44:27 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac6359392bsm5837519a12.33.2024.07.29.07.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 07:44:21 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 740E55FA14; Mon, 29 Jul 2024 15:44:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722264266; x=1722869066; darn=nongnu.org; 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=PtcZqFWHrEGoL41FTohMyKEPDwyICpuVF7RbypBJq3A=; b=QaqrMGb3A82eoqzpBYuFVqSJk45CFX48XCphzCvrgkunueHPd8enJpsmB7y42XNQlS 4vlVI+Jriv+km8WjMnGRe6QplxQi+IXu+xprRyqP306rCAg5f3ETM2NG1aCcD/ZrDSGz PbS6cPCiWyDfmksMcGbgBHrWRICKoQIOYw7RadoCx2n7VfjVuQMBkRW9eeULv2/nVq3Z ajofHPPRUog/LgeEvlHHj+HjVzgno7S47xVqca7tm5E69tGtYSYLp49KAiKspEUOkb1t N+3ePgiyzgUjhjSRx/p7WUfsxryNNl6KxSi1chrV8LH86PKW6Vw16SpZVjd6Cr9PqLur +Z1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722264266; x=1722869066; 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=PtcZqFWHrEGoL41FTohMyKEPDwyICpuVF7RbypBJq3A=; b=K28xaAZM7F9yFstPNPBEuFipXKaKXWJ9S6fq2iPZk0gOrO/kJVQN9e107XapkvGfwa z95+FzKqWhTTpcxw2gT0AVUtijafFeewPzMqPANmKwToA0bjONIZ6fqjll/2ijsMa7nn nulWoiaMaD+tJW9A1Li3Ly0Kodupf3+MLvyQ2Ixx+qPHiQi+bUmWflZxYBKPxRcy3oiA mSFMKCMBrEAOH19lsn2F4254HLWUYCFG8+JUrFuh3XMa6fuNGAZjuULm9QLO/gOqtKRq +6KWaiKvleV3sWxOicR2Os4lgYTReLZ3/6CxCM3BrljkL8kIzDxu8s5aL123W3eoDvNh guGw== X-Gm-Message-State: AOJu0YwtMxVzEp74x5wCu47voALFMGCP3J7VVqRwXK7wcOs3yG58lyfB rKZXHOKvLEBdhoT76P3eTCFI5O5PogN/kF0on2C9GLS3Pzq483Qhl1bJoGGZHPA= X-Google-Smtp-Source: AGHT+IEfRp6u/PEriMXjt4MOemKUcELeyZUUP1+B68QPt6BYX7+H57vsJn7bbn9HRz217tQp4Q2OCA== X-Received: by 2002:a05:6402:35d6:b0:5a2:2fa5:f146 with SMTP id 4fb4d7f45d1cf-5b021f0dcfbmr5499561a12.28.1722264266053; Mon, 29 Jul 2024 07:44:26 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , Beraldo Leal , Palmer Dabbelt , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Bin Meng , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org, Weiwei Li , Pierrick Bouvier , Peter Maydell , Richard Henderson , Liu Zhiwei , Daniel Henrique Barboza , qemu-s390x@nongnu.org, Cleber Rosa , Ilya Leoshkevich , Mahmoud Mandour , qemu-arm@nongnu.org, Alexandre Iooss , Song Gao , David Hildenbrand , Alistair Francis , Wainer dos Santos Moschetta Subject: [PATCH 14/14] plugin/loader: handle basic help query Date: Mon, 29 Jul 2024 15:44:14 +0100 Message-Id: <20240729144414.830369-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240729144414.830369-1-alex.bennee@linaro.org> References: <20240729144414.830369-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1722264320256116600 As the list of options isn't fixed we do all the parsing by hand. Without any named arguments we automatically fill the "file" option with the value give so check if it is requesting help and dump some basic usage text. Signed-off-by: Alex Benn=C3=A9e --- plugins/loader.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 513a429c57..ebc01da9c6 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/config-file.h" +#include "qemu/help_option.h" #include "qapi/error.h" #include "qemu/lockable.h" #include "qemu/option.h" @@ -98,7 +99,12 @@ static int plugin_add(void *opaque, const char *name, co= nst char *value, bool is_on; char *fullarg; =20 - if (strcmp(name, "file") =3D=3D 0) { + if (is_help_option(value)) { + printf("Plugin options\n"); + printf(" file=3D\n"); + printf(" plugin specific arguments\n"); + exit(0); + } else if (strcmp(name, "file") =3D=3D 0) { if (strcmp(value, "") =3D=3D 0) { error_setg(errp, "requires a non-empty argument"); return 1; --=20 2.39.2