From patchwork Tue Jul 30 16:22:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815330 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375555wrs; Tue, 30 Jul 2024 09:25:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVlPIfyga0KqzZetJwY9vGlt4ny1TdmYIRTSScGHFFexk24C0Jf44NPs2NzGUKBbe2wbV5wOBdMvKeEarPfBp57 X-Google-Smtp-Source: AGHT+IGGVhRxHQnkf/LuYmCURbp4iQUWYNYECvUlIBJNvxzgnNHsAq2XbajNDlRRw5baGF7+/6bO X-Received: by 2002:ac8:5ac8:0:b0:44f:ee55:4dd7 with SMTP id d75a77b69052e-45004fb89b7mr102618091cf.55.1722356742188; Tue, 30 Jul 2024 09:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356742; cv=none; d=google.com; s=arc-20160816; b=fjTe4xYRuVRob9RC5VrK/5cPId3C5Uud4pyjqNbHECLyjbutlDKQMK83ugE9VTdSBL e3JnR1eEl2s7bX0W4yHq5djZcJx6dWhOMbZi+0HSUyoMyBbmKAEsER3QuryRW3ndODlZ 5ME2z4Z+dvw9A8X5O1jKROSaAdEw5wZp6BCNOk4BXzsWjigaGYmyJUQeYlNP5NTMgeCj OWj5Phtna/my4DYUPDrZPHE9Iu3V2JkE5weS2uqX6oj4RS1TBNlR0Bf4wFnD0aYaYrsG pA+Jz5ZDvrZgIrfh63K9wYk7itzDNU5hMJ4PJUcP1dYbwGX/2iuCBuuiCi5ITarYPgmO wGdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/6pMZlm2bfjoRAj1q+Xtf7pWE5pLMJXZTwTQGH/c6jo=; fh=1s122tMGckUAigi/Bmvya6P0Afd394+Zvc0USuA2Srg=; b=0L1ClnZK3bhWqey5XLplEMjZgd59iBZT3ME4s1pefm061qdp8+zPWPYFtFoFLdJsGu Kzk8m+do81lGXl39eK7hEx9/tK9fyTnosgrZeN/yyQZug1+rmYwM8RAvRC+RJfZkOyT7 r1FJQrCmOmFuOe2BNY1FSrAF1KD/rDY2OvlZK899Nkk6YtSiTSNK+EiXXaasUlvrE0Nf B1SbXcJDT4478ImgX7SHN469R3gdt169vuox8iBOa7arKDx33rm/BxAmZDfnt4i8HaDD 05DRMsm/00zw/2bO/EBQ4+cdIkslD+HeCCfLujI2cGwmJfqjuQKp80CqY05kEHN88jDx iDog==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDuQc8Fu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe8138a06si133362611cf.112.2024.07.30.09.25.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDuQc8Fu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcd-0008HT-4S; Tue, 30 Jul 2024 12:22:47 -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 1sYpcc-0008D7-21 for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpca-0003XJ-1o for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:45 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52f025ab3a7so7508962e87.2 for ; Tue, 30 Jul 2024 09:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356561; x=1722961361; 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=/6pMZlm2bfjoRAj1q+Xtf7pWE5pLMJXZTwTQGH/c6jo=; b=YDuQc8Fulx7EH6aE4cXJyl/C9RbEgl6Vz85IVGKf7Nd3QDBlWdEwkcF9OA65GQLWFK TgHOk3WLPgw3L/C2fWPA3nLcfOH9AefnLkUSwvkFnnkXuazeFwRLUKdBCgKNTOE5ZFvI Hmo1G7YC274sDVcEVF/gwCkD0zDUunW0yQgFBlxv3hO7d3mxKVCVAHCWWo3XY6Mu5COf D/kqw0aFL+tttj4coCazBRyg7F/8ahpu0SYGc4GDKPHtnKDAtENo5fvlzd39TFZ7yMCX lboMqd69Mps9KfLicLEV2OcmUYAYlqjEHNeZstQaAGqueAMrYzAV3D+mCIGx/mNgE7yH sGQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356561; x=1722961361; 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=/6pMZlm2bfjoRAj1q+Xtf7pWE5pLMJXZTwTQGH/c6jo=; b=ikQydmMrOYr0Qnk7FiPvqcUhePk3itnOz30/7guQQb/fiorKo7EwMluGVkfSjUOzLs N1Z4GwETJgOK+sMbLXKSyErPcKs1Xomih9WhdzwJ3YBBs4+G0JLbpSpZulkvJ5lLOF4P /vB49gTYuw3UYsYsgN2ZrQ/nxWYHMfMItr84nQKYxbHHVLzBp4kCocoIgRe/b7ahhHcU qmECtyCsRGyp+NN5+8UqC7r5XmoLFV9XBLvyD8O0UInNPjlHVldLMwbQjplzBOPedNLR kQwLA9glTwkTptIDZe+JNc+AjoD0IxWsJC76jeU4KMuXUiwvTez675ptU3ihplO+tDop XBhA== X-Gm-Message-State: AOJu0YzBGrj1OWM4IhMun28Wd7OJqWdfWOt0uJ5H5CI2fG+NvmOEAnmJ aPpyMOwdUYbb8hL5DZDoVf5Dqm/2F0Xya3ECFKOONszmZHHPk2kZl0jnKKdjtvk= X-Received: by 2002:a19:7001:0:b0:52f:42a:a2db with SMTP id 2adb3069b0e04-5309b28e7bdmr6535675e87.28.1722356560480; Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad9d3f4sm659501066b.165.2024.07.30.09.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E34615F8BC; Tue, 30 Jul 2024 17:22:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 01/14] gitlab: record installed packages in /packages.txt in containers Date: Tue, 30 Jul 2024 17:22:24 +0100 Message-Id: <20240730162237.1425515-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé 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é Message-Id: <20240724095505.33544-2-berrange@redhat.com> Acked-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-2-alex.bennee@linaro.org> 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=noninteractive 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 ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/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' --show > /packages.txt RUN /usr/bin/pip3 install tomli diff --git a/tests/docker/dockerfiles/debian-legacy-test-cross.docker b/tests/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=noninteractive eatmydata \ python3-pip \ python3-setuptools \ python3-venv \ - python3-wheel + python3-wheel && \ + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt RUN /usr/bin/pip3 install tomli 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 RUN /usr/bin/pip3 install tomli diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/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 RUN /usr/bin/pip3 install tomli diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/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' --show > /packages.txt ENV CPU_LIST dc232b dc233c de233_fpu dsp3400 ENV TOOLCHAIN_RELEASE 2020.07 From patchwork Tue Jul 30 16:22:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815322 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375226wrs; Tue, 30 Jul 2024 09:24:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUTTKoNVPPCehYe4U096dzlzswNXcXRtPDZjaDXPootm9lGBYLvgpEbB1R2dAgeO09D65b6W0bLjSO2xB+spcYW X-Google-Smtp-Source: AGHT+IG90BqMVQ7UVhLntvY/e70wpOU9//bV70weNbONXTgYACnX9yaNGmtslI0r4SvM/XrdHIdZ X-Received: by 2002:a05:620a:319e:b0:7a1:9a00:9aaf with SMTP id af79cd13be357-7a1e52b52femr1387091285a.55.1722356687475; Tue, 30 Jul 2024 09:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356687; cv=none; d=google.com; s=arc-20160816; b=B8Ve59YY55WZ4qnfSROfK5x6/syDMCPQVPEHPkqMoXGjBi+2rwbHOEQCiGNlXlJbnq wuXY4UfIvgu9Fl2XvMgpqDRMKQ1xpvPqkcFAXbVRebLkBgjqo9eTVCWwbgQqgcLKpx7k VMEecSgKYjsMzR7o1Sau6MViKvU05DHCGh/tfNPbloQ77HeFjJhOiRbA6dhD7yRdeVzl BmyafQEyl9Ici+ENzAzXZ5LirYeO0xFZiT4ruzdHlZrG4ILXHKKEbDN5ehx0t3l9Ck1G ncQ/P6Vv0NBwGmYpB1KM0h5ADbnXrIKzB/vHJK9ekxGBXFXaBYiurPZGA4DpMFP5oLtr d1vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sv1yYe2fDl/D3XYptaj1UVlAvzIz+z/QMmVpNU4wrEY=; fh=1s122tMGckUAigi/Bmvya6P0Afd394+Zvc0USuA2Srg=; b=lAbxV8vrYh0QvWFmT0lSrJxZuMuLEV+yht173oomFhkOUQv7mewtOG+s1Chvp13iyj 4LRjUY/Yu004Z0Q8//sgMs7PU0rNt/gl8as/CHc1toeWYnpLj8ao3x0jZ5QJr+qePUmZ 5susxDInbQ5d7jSXVGXl3cAdttE6eMcCU7PVz/YV/yp4SDx0yOr8IDCFrMKXxOXQ03KQ HdyUgoaDm6zCkUOwA0N+pK9hTNKLeQ6sNxUc6ceIygFcL+pbTLfnGaEUuU2a/VyvhwM5 5CXMphi6m5KDMhrhg4kVD4Rv8H5s5mU6/10vwaCwtxB73uYdK2RmKeiY43o0DMSw/kuc DPzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l683DmYp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d744557asi1321931185a.267.2024.07.30.09.24.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l683DmYp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcb-0008At-Eh; Tue, 30 Jul 2024 12:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYpcZ-00089H-Sc for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:43 -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 1sYpcY-0003Wv-7C for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:43 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a7ac469e4c4so5053166b.0 for ; Tue, 30 Jul 2024 09:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356560; x=1722961360; 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=sv1yYe2fDl/D3XYptaj1UVlAvzIz+z/QMmVpNU4wrEY=; b=l683DmYpz/UtKahkrY34jx83u/+AXdAEnE4py7JvBsUHBFuUglzghr2zLSiImeW+px 6m0xZM8Htc7ynD1STSNnX8jwyeprYPru+ma6cLVyP1HlI4b37pBmsPZWZn9F9gJG/DeE AugUqzxF5OyjN0y8u6TWLlo1/NTuOOLO4cWJzrho65fld2mUXTLlRoxLAJWDOgjHN6w1 ytYqHVwiLlLBHaGprVtpo80hDsk1ySmeSZG6yNDSrp4mOTp0udnTsiYyISY61ZtK6Tl/ hzBtP/MF5LRNh/KgAxecWg2g7b6rX8FmaTgNNJ422+AjRgjBzKQYwxNsED3jzf2e4ePA cDQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356560; x=1722961360; 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=sv1yYe2fDl/D3XYptaj1UVlAvzIz+z/QMmVpNU4wrEY=; b=m4u2REzBBvWj3QW3jz9+Jk6N1wqauy24r+F6h306MFdZH+nTnoCwxm+i4Q/FQDrooy tMQsBKuvSvrCHQasVv3UvM86c0Rrr18N+UIMvn03aP5oheYflGOXMoH615wPrSu1SL4q 85TCsr89euB0ztva80ZhhGG5lYFW5aYFOlP2rUnsKuegB/6hgDEumU4M3wW7DO3p6Zs4 Pnd/jf6MMzL5h3WBev07SUKjFYTcB2EZlb6Kua2jdpzDQIpBnsXMz8h3Sfqd22elWrAX FjVl3YWwCWgAU/HMhaDWYFCNwKHkjAS6jbdXqh0ITN7gNolgynXWH3cxI9Hr1ETNTaXd j27g== X-Gm-Message-State: AOJu0Yzp7uYzcHqHUVOFVOiT9nxVA8BeZoluGQAgdoVWbA8GtGtioyXe 2p3UiYmmNqL+xAwbwe5UsmTp8q+p5uNuyCCrZiS62kn8ZmrUEuVRYbt/H84thOI= X-Received: by 2002:a17:907:3e84:b0:a7d:89ac:9539 with SMTP id a640c23a62f3a-a7d89ac9611mr177777866b.7.1722356559966; Tue, 30 Jul 2024 09:22:39 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad9d41esm657770466b.154.2024.07.30.09.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 068A55F8D1; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 02/14] gitlab: display /packages.txt in build jobs Date: Tue, 30 Jul 2024 17:22:25 +0100 Message-Id: <20240730162237.1425515-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé 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é Message-Id: <20240724095505.33544-3-berrange@redhat.com> Acked-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-3-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.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=$(expr $(nproc) + 1) + - cat /packages.txt script: - export CCACHE_BASEDIR="$(pwd)" - export CCACHE_DIR="$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="$(pwd)" - export CCACHE_DIR="$CCACHE_BASEDIR/ccache" From patchwork Tue Jul 30 16:22:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815329 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375438wrs; Tue, 30 Jul 2024 09:25:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWr/OpW82JlSvgrUHbJB1pf5Pou/ji2Vq9R5+W5JYj/4kZJ2wpIg4t5+yuL68Nx04D+A+eOgyISa6aU8Yrme2Np X-Google-Smtp-Source: AGHT+IEcKXQknzZwhzPbIWX8alsaLT3tUwn3OI9FsNsZjCQcjyO7WhKmMb06yRmyk1121jpG2/B8 X-Received: by 2002:ac8:5895:0:b0:447:f361:e2e4 with SMTP id d75a77b69052e-45004f50a9amr157175231cf.40.1722356720978; Tue, 30 Jul 2024 09:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356720; cv=none; d=google.com; s=arc-20160816; b=LXuFVkxfzcbXHsLV58kH322gee8Mmg/crrFX8Mh0PKo4JsVroUgmByosXgEf+w9vKD 00NVepDLKd/zWyCj2wSxrlx3GeiCPD3kBhdDnrCAGsftSzw1klydY5oDjsxmfcceeL+V W+Od9mnAZvoswn8usUSc1lZ2mk0OZBL/6y3MTfq9sqMv0WXP3H6s85QYVPOYghaEaRWN fAPogU/zETCNy0usIw2ke+aUPV58Hk0JGAl60p742UFD+peaLNv8bviJGS9KuElHsbEh cGvDdUjmdfuy84nsKq6rVb2+DNooUhvWiE66HNCJtgTCGrPZFh0e1gjZQUUogGMr/ExE ZTfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=o53zhyLHN7aZhlmeir/x1yyb+LIZzMpKweMU3c5VOlw=; fh=pjIPepffW9GbiT5F1JOrFL+dgKhLiu0UMDuxhTJ++uo=; b=ojMdd3c0+ANOr8KSaGVSv83WsyjIEtsR9VcFo5w4uLm8hjqLkYoR4AORMHjtdbsY/l rB7mmnQHhkymuSL+NVPjsPbSxGVRLe6z2rMMQzXDSWTM5kvBN6irdlO8ZetzebFxwc1U wPkDQYtFQHiw9x1FhA9MDzNwWzelzldP5R7lubdabiZ/fN6Eo4YepwjxHA/txjAQyJOz Srq9AUwE2vMzrox9nu4iUufBNisRuc3KLr7IE6q97oK5ZLkhkf8aLGkAtIwtpD4IRyca JBnveScWEfslBxYAzNP2MkdNpuAnOYQO7v2J9tcgZrSkj5aMM+jXRU11qcXBCrMNkLbS 1ANg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Bumw/CXl"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe851b48fsi131122341cf.670.2024.07.30.09.25.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Bumw/CXl"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcd-0008Gk-0U; Tue, 30 Jul 2024 12:22:47 -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 1sYpcb-0008BG-Ki for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:45 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcY-0003Wy-GU for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:45 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a7a975fb47eso663999666b.3 for ; Tue, 30 Jul 2024 09:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356561; x=1722961361; 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=o53zhyLHN7aZhlmeir/x1yyb+LIZzMpKweMU3c5VOlw=; b=Bumw/CXlJEbRZPa47vIYE7gVZlX6L2cTC2RBe3FS6AC56TlFzN3Wp8xEwFbUmP7WDa pF5g1OkFEUd0Qfqv4ltRHlwrtOJli6RblWg3idyc8YSj4Dmgbo6o39zCsiP7VoC+liou j+HogPK7q2stvNoOSCOO/mTSM3w79Jom84RZFul8Gs1HfIXdSFK6duClKDdYeablY3rj fdAR70hZRexmxrQNRe44zzzulEZweY8nJUkxmlpX3fY+2sc8gVEcBelmtZ/UnP3ELYVt ewfpvyC1bVi9XqwHwZP/Bl2sfJKVEvDYTbIrlx+M4Sm4z4WR6NfQ4nyf/qwW2T/grdb8 0LmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356561; x=1722961361; 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=o53zhyLHN7aZhlmeir/x1yyb+LIZzMpKweMU3c5VOlw=; b=gPyIjT6cT/Juaitsd2Mv84iflIdtGdxNj7cz5qJaeZYCTK3oOfYlgbz4U1Kc3piEib aXltyYJaG4jKe9jnajm9kztWw6u/rODdGMR4Rau3/UGQ1pK25fK66qzuhn5rhKVf2AHE q4cnHDdtQ1anBTynMM6B+K74LHOYR0JWGC/YIRkj8CrASaUYmusbX1HLzOaVFt+eBYhc 2qWXeDVeurbxh18yPNOJb1nd3Rz95bhO86TkPB4qHimCX4WtxXwW7wPs6qeV50+GHiG5 KTpgR1RZetpyhPERzdFI8o0bRvPZ8vwHlWEXCS08LTam4DZ7JJfmM4OXhIwWSMNeoJQL 6Lyg== X-Gm-Message-State: AOJu0Yz3tjtDgWecyY5TGJgjAxVbOJqnyNmDnw4N8F19aIbBFGdmsium ZZTsqgsTW2D6EsW/xiDEtAntTCeFdGkI0510O34E+hbG9g8Q+EPsVMlH45i2spA= X-Received: by 2002:a17:907:9443:b0:a72:633d:5fd6 with SMTP id a640c23a62f3a-a7d400adb62mr737614266b.32.1722356560275; Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41621sm660753866b.113.2024.07.30.09.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 27DC15F92D; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell , Paolo Bonzini , Eduardo Habkost , Song Gao , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , David Hildenbrand , Ilya Leoshkevich , qemu-arm@nongnu.org (open list:ARM TCG CPUs), qemu-riscv@nongnu.org (open list:RISC-V TCG CPUs), qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PULL 03/14] tests/tcg: Use --noexecstack with assembler files Date: Tue, 30 Jul 2024 17:22:26 +0100 Message-Id: <20240730162237.1425515-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson Add the --noexecstack assembler command-line option to avoid: /usr/bin/ld: warning: boot.o: missing .note.GNU-stack section implies executable 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é Message-Id: <20240724010733.22129-2-richard.henderson@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-4-alex.bennee@linaro.org> 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) %.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 $@ # 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/Makefile.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+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc .PRECIOUS: $(CRT_OBJS) %.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 $@ # 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+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc .PRECIOUS: $(CRT_OBJS) %.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 $@ # 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 += test-arm-iwmmxt # Clang assembler does not support IWMXT, so use the external assembler. test-arm-iwmmxt: CFLAGS += -marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 $(CROSS_CC_HAS_FNIA) test-arm-iwmmxt: test-arm-iwmmxt.S - $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + $(CC) $(CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS) # Float-convert Tests ARM_TESTS += fcvt diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.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+=$(MULTIARCH_RUNS) .PRECIOUS: $(CRT_OBJS) %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@ # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) diff --git a/tests/tcg/loongarch64/Makefile.softmmu-target b/tests/tcg/loongarch64/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+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc .PRECIOUS: $(CRT_OBJS) %.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 $@ # 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 = -T $(LINK_SCRIPT) CFLAGS += -g -Og %.o: %.S - $(CC) $(CFLAGS) $< -c -o $@ + $(CC) $(CFLAGS) $< -Wa,--noexecstack -c -o $@ %: %.o $(LINK_SCRIPT) $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Makefile.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+=-ggdb -O0 LDFLAGS=-nostdlib -static %.o: %.S - $(CC) -march=z13 -m64 -c $< -o $@ + $(CC) -march=z13 -m64 -Wa,--noexecstack -c $< -o $@ %.o: %.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=z13 -m64 -c $< -o $@ diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Makefile.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+=$(MULTIARCH_RUNS) .PRECIOUS: $(CRT_OBJS) %.o: $(CRT_PATH)/%.S - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wa,--noexecstack -c $< -o $@ # Build and link the tests %: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) From patchwork Tue Jul 30 16:22:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815324 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375279wrs; Tue, 30 Jul 2024 09:24:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUCGBnNtDqhsuN9BKyEKXVp+5KSgtzYT79BmH8pCJvz6tadan4EMQ5EYQh/TDkaq+cihSpGCA==@linaro.org X-Google-Smtp-Source: AGHT+IGAMHZD/uQJsXPdS+tcWsOMBwpuVEHBMpugYdw6LouRwTOCgmSbd50jchxJWK9FrUylNG+m X-Received: by 2002:a05:622a:1885:b0:44f:e11c:b0d8 with SMTP id d75a77b69052e-450372a8931mr40205681cf.7.1722356695182; Tue, 30 Jul 2024 09:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356695; cv=none; d=google.com; s=arc-20160816; b=atwjfneAh+OjMHdLimQ7fH2aL8Qrk4SgCyFkaww0xKcqmkB+fkS+9qhaIi4Vl+4fKP tNzp71We1aFM3HPTP4isapfCwmaDKgqJKdW9sUqEXKjn2fpeFULyzZaieTkZUVyolofQ zerGUYB7xVSf+bJv5SKPU9oP2p1JNTt/rSEkHDwUybHfI0rXUFIDRbHsX8/GF9we/Ojd 6EAb4zHx4DvZV+qT4wQMyO1cPaKcZmrLhM3uzs+T9B9GmdW6qXLBw78D7VXMgUZOz9Ep yaHE8QNsD9S9ZTM+F8tgCCjE19DDsVZruA/cJxGmkCIhKB2ugq3K1LShR0CeYiokITlz isrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LeP5hKI1uEP9cOGS+CMSaW0aT4kqda/WdRmJyVhc0Is=; fh=5guOIG6v34++hjKhZ8uQsYYTpNsnrXCtHzDBHfct3dE=; b=IS7HLlYTLVT1JkTkEB/Llb61rxzffhJQHQCeSU+bc+kz0Czd5//50bQtBkXErXecyh zZEYYoqGpR/q+OX9saL0EgY8BKv3aAIAdU9q+XFh1QzALzblf19NW+efkUY2hN3NqDM8 ji4gyxpx5nCGnZNTuJj6Cka9St+bNx7864Xsos0eXR3J+Mrzjz60zgxb0HgcAXwR2JwU vySzoXthdWK2PkwT6kg9IoCyqAKWOVOy+Hf6ug6Jcm4D5scd73kkqfC3o+ViMKptcNjx RpTUWti2L+Dw1S5mntI2L4u09BOQut1GGcJ2gsQk5/Kw2gT/IwMq3Gfmwmm8/JDf0mAU 7ibg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUB8zfiC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe815b93csi133772871cf.205.2024.07.30.09.24.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUB8zfiC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcd-0008Kp-Rq; Tue, 30 Jul 2024 12:22:47 -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 1sYpcc-0008GK-Rj for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpca-0003XL-44 for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2eeb1ba0481so76974521fa.2 for ; Tue, 30 Jul 2024 09:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356561; x=1722961361; 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=LeP5hKI1uEP9cOGS+CMSaW0aT4kqda/WdRmJyVhc0Is=; b=XUB8zfiCtvxldLzGwKDAo9BDWsOr08IlBLYuTCsFlfj3UwLvxjm45Iceab3hrbTdie WzGNdfYgELCEwgD7nKgHV2lSnI4VvLfVw8S2aTRGt0K/3ZO7crC+amLhoSKXXBzrZtMo sqY2fsewVH1WwIdkPP+PCGqM/cOUsocnjR5LgRUM55isPyfFPUc3IN6XYkvlNMpsOUkh jR2bc7agBcHQBsVSmycEBu8dZZirPGJvznwmZNxqc4/TYBBX2HR2gL6QRinBMCt/Mt8D EWIrrIfHcvYEON7gZpVY/R53jE37z8hEKt73x0zG4HgxudoVeUyg6bMQ+hU9Un+VmW3F h09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356561; x=1722961361; 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=LeP5hKI1uEP9cOGS+CMSaW0aT4kqda/WdRmJyVhc0Is=; b=K9vxoAv5leI2StFE57bYHxqAZ9cO1VQbcrxhPPuTiq3RE/xbr5vgGC9Tx5ZMFPRh+0 F/vK57PQxiMeyyryt10k9RxjbnlAFl6ta/23whBAjnjmpdPMYlZ+Z7gcjScSOfIStkqn teBWBCQ8ltJbFjX3sRmiy0ETvCfR7OHPPIOGv8atzBM1i543+hreWFgInXpfVGyZtBQC kS3qDPLqmSYPTlNF9XLIoF1jLkH6QpVDmWoNgdUg233PuuQhDF3rcQhvGwBo6z4fBcxg 90DhJMa+NakNXvMVVoYI+wIyvahi1yrErOkWilDW449/em6yOTrFZZBnnC3RiaETWG8R +Cew== X-Gm-Message-State: AOJu0YxFRZt2JloF36RmrY956/O88SbdVy39b9Gmb34E/FzBDqzivzGr XsLY4J2NeGFTT2WSE4/d9xscB3DzGW5z/lSB6Q/uhWvRRlna8eOL+ErHSyfzD8Y= X-Received: by 2002:a2e:8804:0:b0:2ee:8db7:47b7 with SMTP id 38308e7fff4ca-2f12edd78e8mr71347371fa.26.1722356560649; Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac65783704sm7337736a12.88.2024.07.30.09.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3CBD35F931; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Song Gao Subject: [PULL 04/14] tests/tcg/loongarch64: Use --no-warn-rwx-segments to link system tests Date: Tue, 30 Jul 2024 17:22:27 +0100 Message-Id: <20240730162237.1425515-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x236.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Message-Id: <20240729144414.830369-5-alex.bennee@linaro.org> diff --git a/tests/tcg/loongarch64/Makefile.softmmu-target b/tests/tcg/loongarch64/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=$(LOONGARCH64_SYSTEM_SRC)/kernel.ld LDFLAGS=-Wl,-T$(LINK_SCRIPT) TESTS+=$(LOONGARCH64_TESTS) $(MULTIARCH_TESTS) CFLAGS+=-nostdlib -g -O1 -march=loongarch64 -mabi=lp64d $(MINILIB_INC) -LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc +LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc -Wl,--no-warn-rwx-segments # building head blobs .PRECIOUS: $(CRT_OBJS) From patchwork Tue Jul 30 16:22:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815319 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375047wrs; Tue, 30 Jul 2024 09:24:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV98wPleU4I3+HwFSp4IBnkaVWToRz52upWc5NSrNR9b2v75bp5tKJBlkUHZoMWcmWmDV2ZwKRzwMwtR7vrULm4 X-Google-Smtp-Source: AGHT+IF6ubVV71TNxJkrIx8WSBNk3izIrLAEMoKYwk04CC2WNukDCi5V5vSrV9Hhby+bbRumbUdZ X-Received: by 2002:a05:620a:2987:b0:79d:7e5a:d018 with SMTP id af79cd13be357-7a1e522febamr1174750185a.9.1722356663237; Tue, 30 Jul 2024 09:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356663; cv=none; d=google.com; s=arc-20160816; b=vREXHUU4oXGJrXE6RhCUSbXqIfsYglJd/K9J4oSkk6XX6gJ40NmamUD3/g290QJe63 mjVq9Xfc1YeQubj+aAeArcG/k9nMDXHiifWwy2MyJXJzXyoe0buQeJmQIyHYdvYt1x7x LofOCF1wfbo0iy4hw2uBBfp/iGPCm/7dL4O8BxXihmg+o/BZ/Rgr+uB1qgvjbdq97htn 7ECXTeJtnzCSoK4iiJgQIdJuXBKh+6PPBARDDKvnHwXsF/6GFJFdhLd/CB51Y0JhOw8S GQ2FkT4Dkb2/i9mh7ZJnHBkSBRiv6Jiy8wpCLRAhMzjpkCeVFiUYBdXeqmqXH0WwwCZm V/BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=keY6VpPVumnjGkrnimQUeQrjJ9wrFpao2IDVhIYi/0I=; fh=OMMbDy/vaHhJu0vH6+b4Kpb+BOXgoDYkxnV/deXBpmU=; b=tRgQh+599zBkgMiVi22GJzXKh9rYT1o9gJwZcdHXfvQOdflcYG69di5wecYzRfKGqJ JCDvZFTJd4Xo/1UZmHeQKXVFd15rdeJkCq9PJJdv4DujWFwk+eV9gC5IF3NbDK4sagMO B3b6B8nEVZy4IO2iqY5vBrA7V0um5okDOmQSUYvmkjJer9VAKR/h7XDPfu9cNp/omdYa ez3MklDHLl8fQA8vHhNA0axPpMJEsoY24R20r0rLHIE4C5zo2f3gwA/dAG7u9dFFA1Ka YqQK860/xJFyUaoH0p3iP0b4O6BBYRr2zPgUrC1jWrvdM3ND9qYf2/SabGXnCNixRvg8 fldA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FphgzqXr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d744643bsi1314593385a.369.2024.07.30.09.24.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FphgzqXr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpce-0008NP-F5; Tue, 30 Jul 2024 12:22:48 -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 1sYpcc-0008Gj-Uo for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpca-0003XR-LU for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5a2ffc34722so52163a12.0 for ; Tue, 30 Jul 2024 09:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356563; x=1722961363; 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=keY6VpPVumnjGkrnimQUeQrjJ9wrFpao2IDVhIYi/0I=; b=FphgzqXrRP54NFsWF9APP55aWbD/5pwaqEErffH/smztR6oGQVuOOkp2O3xqy+1gzA apseVmMv60WkN+hbq7FVaJSWcslroJ3tfuwjJr037uBHamIO2MYuqlnBzCqW6324pREF a+jdPBqcrbcNxO5nEFxChoN33jf+fz+g1kQaDi6Xn+LOdT2b0jLVz7wmWnPWpGtfvrae ntj+SSXr3PLbZxDCBYHTw39LryHcO3rFLIvzqzeZnCJQS9dDbUPpXuVyXYn/4zMHV+1y gm0S/R9BYJlWIveVKUFASfglNJdhKiMARZlDRbx+CZxgmczesnv+Q8e6N/66y5xgtrop 8gzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356563; x=1722961363; 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=keY6VpPVumnjGkrnimQUeQrjJ9wrFpao2IDVhIYi/0I=; b=WedtOMQHpxkF6uV+THZECynUQZTLpE+g4VLi4BfaNBxhqJLynwduJek7ycnu8H/8jU +7HltVim0y2rT8gE9awRTpw2GQGI5ykiRF0gBr0+xLwDBLyaNntxhzH0cZywcSoHeIwx sH+BgzFMo9GLPUal/0dEFLq5VIKa1myt+r4qg+FHaiYXsj1rWrOYuPJMSp4jANL5UwXG zY5jNJndVvqkAjy7FoeBypLIfxCFN94wyphldYXTxOT4RVA3au76WOY+MI9bv81JNj4k qKmZRERxkg6uSpjSaqt5WKNwy9gU/y3XqD1ovVNrt7Vrvr0Wcd/xdjFx+NqPAdsoO4lK bRcw== X-Gm-Message-State: AOJu0Yw71WEiHwKRdAQOc+tpM1fNaFiCCmlEcuz9vUfpu9ia3JptBS/h q3G1QCj4lqDOv84klNpkHXwQja+e1wFKAQvSFu+u7SfegMiLy3HnwpN9wZyLwZ+9QDRbtgmSD3E O X-Received: by 2002:a50:931d:0:b0:5b4:cbba:902a with SMTP id 4fb4d7f45d1cf-5b4cbc9e0aamr2080087a12.4.1722356562894; Tue, 30 Jul 2024 09:22:42 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5af507c6e9bsm6119847a12.54.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 523095F93A; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Subject: [PULL 05/14] tests/tcg: update README Date: Tue, 30 Jul 2024 17:22:28 +0100 Message-Id: <20240730162237.1425515-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x531.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-6-alex.bennee@linaro.org> 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 -==== -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" From patchwork Tue Jul 30 16:22:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815325 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375327wrs; Tue, 30 Jul 2024 09:25:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUs6yh1iGrz3XOpQ50nx+iJEJpFLQN4rlWaqHmrE7P2/WuMr4IGZdtrdLz61IbVtYfdyl2DkRmma+gQT2EBFiT8 X-Google-Smtp-Source: AGHT+IGzzdIQ5rbEnB4bJ6ipPsM+LvsQEln3KhIRzSYSJJVMjVk4pFXj0nPKWzkq6TCmHUgc9BE6 X-Received: by 2002:a05:6358:2909:b0:1aa:c4ea:8e55 with SMTP id e5c5f4694b2df-1adc0678a33mr1543856355d.13.1722356703217; Tue, 30 Jul 2024 09:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356703; cv=none; d=google.com; s=arc-20160816; b=tNfqtwaEvWAkv7LrR+7tPl8iSC/MkOaGEwOCAHJWvA8JMILEoSgZRtReQ1zeFL2MAa QP0kk09CEJLOSd6azBmvSViEvGbZGTwPlj3K7H9BIERr3pr8meHTGjTGXVl1RVeEFPah CyMAChDdmCr7Qbw+FJxQ2dhx6anhNFUS6/Hn7UDAyqPG8fFhO4jeQBV8QaCR04A5BPnF pOP9+/gO7jBk3yMS69tPFMb+oleQ0gZ5wf+b9sXdHgQTXV+ni6f548HbEdgYPk99L5iZ gE3uMFlzoDY7h6SN0GysW/wmN3/Ku5XtPmZC18Z4NP5HEbsF1fZyQsaGIHTFluSeMEVu 8sDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GN1HaihudaqLLrp8IlR/d+UPmyEvWng1714T4YdfQiw=; fh=RNVWmd7TwlX/wyQcdhmnon4JQcsRaZwH7hItUZb0D88=; b=xYuD1YOOlPQT4WBkLi6UtCinJee4sLqlucd9Ax5TJpLxvhCl2PETRJ83YRvL67OVnT b23UZ/jSuFdiDSDaHbqu5cB6/+4DxOT0jys880jGpFHbINA57rFvkfzJepM871G5F8o4 8vH5rFsCFK1gfqHIJJ5udiW9M/O97uB1xkEpuCLh44jBy0cCZYj8IAtCIq89oiRhU+v7 oPXDwEP7rpcyaU+rJLH/boP9BXBi8kCOx1mnyC+dmjNFoAeVBjE2qM35EjNODx88y9eE RckvBSDF23BJ00SlZt86wYZIsGGxHy5D+QEQUq6pLzfZw0ycKN19i98KbMj1WW1Icvwp e5KA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a5PCfiwK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3fac78ccsi132808836d6.415.2024.07.30.09.25.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a5PCfiwK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcf-0008Ps-2r; Tue, 30 Jul 2024 12:22:49 -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 1sYpcd-0008H4-0Z for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:47 -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 1sYpcb-0003Xg-5Y for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:46 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7ab76558a9so2406366b.1 for ; Tue, 30 Jul 2024 09:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356563; x=1722961363; 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=GN1HaihudaqLLrp8IlR/d+UPmyEvWng1714T4YdfQiw=; b=a5PCfiwKoOmxH0ejGoXYV0/Rf6AIelag6X6c7gm6HIV1emMUAHokRmFpm9PHF+dKk3 CLLc2T89j+9cfcdTU3xnC23totFQNQyi2FJVOfXwiaBcyoiOVhNb+/LLDUDO0UIWuCRZ 2qTzUWWPolKkdwqx5wnmdynzml1J29p/f5RDc1nrhL1XX+Jjkb785WJqMKNz3RuEJ8Kh TdIeao12/tEG/GP+H2hLWUpBNq2+bljNlcBmaxSeX3IGnFYhGnNB8K2wP9+n9O7rxw/w 0Ibf+qc3Z2We0nYxatfwp3qAyk0BeEZgFOpOujw6VKZGXCBPmXxDvM3xN3JhxUFOd1JS hQpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356563; x=1722961363; 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=GN1HaihudaqLLrp8IlR/d+UPmyEvWng1714T4YdfQiw=; b=MmGWxaOuKsd10S17KS7r9MjMi5/rNv8SfO3FS/OKFQH376G8pWLce7P7TrBGjS5HD0 XKGEqKGhYLOPw9/u/TJBLGl6bLEEgtRh0jUEFIhI/dxsffZ3S7KvuJdm3dOPRAz4vKlF Mk46uFDF++z8T6Tm6tS/FWJKqIPA2P92U/UGU82pVVQoMsetnyder/ClZP/YVZ8d4CrC 6RWuXi60tQEbpOprGANhoTTT+vdR/jeA8T1CHlLaDXESZf22HerZFphOyrXil1qm/y94 WWFvLrFBaCB7hQwyMO+Sych6OY62jarmbpLOgxyft/M6FvtmF7DmyOetFZZXjTVIAXm4 iRbQ== X-Gm-Message-State: AOJu0YwnUJawn/SKFAJePgrsiN9NOdZj7l3sy8zLm4oTJ0TvnJz1D/G0 AAbTmBBGxPk+Wv+eeFZycFZpK8VlMpQo6lTuNn1wKnoHkt6RmOnQC+PoOGaCfrPFdieKSncOWGn n X-Received: by 2002:a17:906:c10f:b0:a77:ca9d:1d46 with SMTP id a640c23a62f3a-a7d85abb7e7mr296828066b.33.1722356563324; Tue, 30 Jul 2024 09:22:43 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ac6377e06fsm7493819a12.28.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 671A05F94C; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 06/14] docs/devel: update the testing introduction Date: Tue, 30 Jul 2024 17:22:29 +0100 Message-Id: <20240730162237.1425515-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move the mention of "check-help" up to the intro text and also mention the meson test integration. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-7-alex.bennee@linaro.org> 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 =============== -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. Testing with "make check" ------------------------- -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. The usual way to run these tests is: From patchwork Tue Jul 30 16:22:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815327 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375376wrs; Tue, 30 Jul 2024 09:25:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVSSyztVVeE1jFurm4hw/lc8ZLnIdOGztyKC84VITeMRvSydRuYgIpCCAzWbL2Rv9TmDD/NSq8tmEdoRv5X1K5K X-Google-Smtp-Source: AGHT+IH9f/HyZXRMlkCmPzRF3LFux38rf3owWF/sSMKis06VxTuDfAaiM3HyDpb3i7mQKYpSNj+R X-Received: by 2002:a05:6214:2681:b0:6b5:8f79:7bc with SMTP id 6a1803df08f44-6bb5599f00amr136001546d6.1.1722356710159; Tue, 30 Jul 2024 09:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356710; cv=none; d=google.com; s=arc-20160816; b=0rmYnpFcp9NU8+qXNvvwLM6A5y9CgpXz98mIW/uiYAbfyabpzQsgqlpxMEfOEfU+p3 AkPCbK39u6IWmcDkHYGRgXZZ8inA9OsdQpLFOWkoxWiP1QqqcyX2Hsx5nHzQ1GODO70T X222tDn5ro41ebbUNwjt7/DDwZ1nkHA0oENGjzsC/xEJqaTJZ5+w1aGjAxkeV37mqfG2 WmH6fJD7+R5wH/M4LImDi3NDIXzzNiNsRpbePrrEhe1M5KVUDveczeQiMEMFlCzs7f59 6gnUlqCfwCiqW0n1v7em1jcuTkOD6vCPA8U9d4PuJYSyOThOZBAflgFEvARVJ3oFux+s xcCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D5h3hA9rJCoPrXhXtX9PMhPKr74TW2tQR0MpOfcAcjo=; fh=RNVWmd7TwlX/wyQcdhmnon4JQcsRaZwH7hItUZb0D88=; b=ddGeROnB7EL1Mh77TsV6d4beeuDQYMmEPgd/hGVw2uMm4MyLyFNgFW9Hzge2v7nGC+ BlDvXIM3zhss2tjjP0soNUwFf0lBsPlz7+WGebbRB/xAmdHWxBRNTsJtDAGPRSfcN349 Dj+O+V6jzYXIUZ6cDQu7xkQ4s5fl2sdKdpNUrpCluOrVme4P/v4xE79jHUECkKazCvV3 9rpJwX+a76u5DJHpoCMydVR7RtJfbwMcinXKxAzJlyxLkRrc7jsZxzHT0BrXbuejS1sW Zv5kPufoRLzAKSQn3AkuWPGJGhff02Iq1MmRpY0CcRH9TmeuGRmtsw8vbMZU+XHTFo0s ySXg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FcjYqtih; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3f8cb83bsi132257696d6.101.2024.07.30.09.25.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FcjYqtih; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcf-0008Sc-OH; Tue, 30 Jul 2024 12:22:49 -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 1sYpcd-0008K9-Ks for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:47 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcb-0003Xm-Vh for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:47 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52f04c29588so8630818e87.3 for ; Tue, 30 Jul 2024 09:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356564; x=1722961364; 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=D5h3hA9rJCoPrXhXtX9PMhPKr74TW2tQR0MpOfcAcjo=; b=FcjYqtiha3YmnN3ZoHHlFU1tVyWvoHfx8Ng7aAyfd6rk/EDJa4sSSmtyYDKUbXNBCy syC54lqTbKEDvmnbZv6bpVOFJLXt2RMnBoUhetB89hBndwWRkqnyArbCviLMibHdvu6m eT91K4znIjNFi80WGfzlhZo7/ciZuD5q0bMKOkhyvLaE13yKPy384l5Wp9GVTgzGnoCQ k6iKwAh2UrZAZP3LpXNPk+klU1CV/XYtd1hZzeMQRjsbEZ881HD02ioJPo8U+LIl27jp xO7XuqtMFUmOr9/kYWnHq7JaxAFNSN6ZcfHkBxLnzFVr6R51hPk9v6mFA+g5njYGZ5yn rjTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356564; x=1722961364; 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=D5h3hA9rJCoPrXhXtX9PMhPKr74TW2tQR0MpOfcAcjo=; b=pdo+zSbslSIEvEJtHXnZiw8EJTz8frv5+tUdfwrFdxjh+ZNA7GVnL+A85uj5IFCKgc avDawBlYPQWyAaLe1OuM4cbF723K1kY3a7+ipdqnFv0D25qoJNn9CBk5yKUd5gxuWiX6 gAHFYD7TvXe8CoTgn4FYD0z/K0R4RakYeBQcKNF+rFs9mqct/Q+oAbjZDwXFZ+a1IXzR t0TsPwMJAcELd+U0Jwl/RG//sf+J6UfJbGA3S2Ocsy44xNDncAEDHFOpRd49hGkO50B2 UHJW6qHb+9uo+ysxE7altZtN+Z+AEKce4mvuCZEISRpfqc8GwFKcQq1LFlIWuhgUSxqH PVkA== X-Gm-Message-State: AOJu0YxImOyrWXl3YoneXFrXrg9TaLBaJSntLCFUzmcrVZQb2pxpF9po +E9AySKANzkiraVoO7s+RrpmOC0qM5Saab+Pw1J5Kh1BN8y0HX7GDsVG5SmJRJY= X-Received: by 2002:ac2:4f09:0:b0:530:ab86:3 with SMTP id 2adb3069b0e04-530ab8602a2mr1700605e87.1.1722356563626; Tue, 30 Jul 2024 09:22:43 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad90e34sm662539466b.164.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7B3325F9CC; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 07/14] docs/devel: document how to run individual TCG tests Date: Tue, 30 Jul 2024 17:22:30 +0100 Message-Id: <20240730162237.1425515-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-8-alex.bennee@linaro.org> 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=1`` to the invocation will show the details of how to invoke QEMU for the test which is useful for debugging tests. +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 ~~~~~~~~~~~~~~~~~~~~~ From patchwork Tue Jul 30 16:22:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815316 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp374766wrs; Tue, 30 Jul 2024 09:23:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUfzLc5KnUJ5Rmvx6FZ3rJk2oW+2TXVYZ1nzlc3VnQ/Lch7yzSHnURx1uhcU/GXjRp9uta7Abld7gWbtjAeA8vK X-Google-Smtp-Source: AGHT+IF7PcRyU0gC3Rg3+nQkTxVwOuDyR2zxlQRPGkZApzvPK1sLJBwylUgp8WCoIy8E3VmMSoGz X-Received: by 2002:a05:6122:3193:b0:4ef:53ad:97bd with SMTP id 71dfb90a1353d-4f6e68b3031mr11196314e0c.3.1722356613924; Tue, 30 Jul 2024 09:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356613; cv=none; d=google.com; s=arc-20160816; b=GoB8EaI2F844SMundI8NV2mnFt7FKIHe8bztxBPnAIhrsa2QS5xa5TOogUZp9UyGWY PiYODzKehlWQpU/FmGwR7nKc8295XLkYBEu8FmkEr3ebYjxb6lJX63H3d74kAxdYWa9P MXyQfYTdrRhVPw2ygWCNreI/i5sHnicmDxP1/zJqAdcToWgAqmqohI5YQ8mOBqwbZz1U 8blCv6eY5Z17VcDZBzKo18QnHzVCi05Jrxn/dormRk54ePeV9/Xbu+A9tk4pHBd1zi3A hg6G6x4MXFYjKv/MBcqMamEZFkVrxZ1RDfvjZL/wgRdnSZEsyiC2/Sassn7uQut2U5OI TTRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=De4SMrBSDt0IKfpACiMysHGGtZ7LaSlvWkE+afXomyQ=; fh=ET0Qp9C1S0qGD/Wsl8aHta0diVUD+vTQJ6UMTqyYUSA=; b=sYaKBIglJ/paHi0YiYtcM/zHBTMmAfQbEr/5A4jBjbdXJhBblAA9rDLDgXABoi8toR IAymPKgKfOZ5fZ6lbgdkb9yVlIDvYRH1NgCZMgjoSu8LAxDSOyG0rZd+YvF3sOvjAThW AvkkC3OORq0QGlSTXuCJxrLizC3GxXZZozbpu1sINbsjnKi8p4/3bTc9IQWLYKwn4vAd o+JW8NeVNmrsf+jwKH8NomcgDbidTZZeV9BjJdvwb0kkkLtxr/9u/w/IkWKk6zklXTOD 5wOvJMRfuk81feBBVlE3MWWfiR1Ze19QpnQPBp1uCLP7snyUmDSdt7WhO3tV8X7l3jYA UO8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oeVnyjS+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe851b2b3si130396861cf.676.2024.07.30.09.23.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oeVnyjS+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcg-00005f-Rm; Tue, 30 Jul 2024 12:22:50 -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 1sYpce-0008OJ-KT for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:48 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcd-0003YP-1e for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:48 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a7a9e25008aso619453966b.0 for ; Tue, 30 Jul 2024 09:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356565; x=1722961365; 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=De4SMrBSDt0IKfpACiMysHGGtZ7LaSlvWkE+afXomyQ=; b=oeVnyjS+0H70oXQpfVztCnbIbiZ2QUYf+bmsdJemW89wnRIvN4dRVuOzGvD27YQGq7 BT1BNaoaeIYxbuCeS44iPGGPewAJCl76fusWIpsPKVrIYNb4qdPRKyAOY61/ZJzEY9O+ +ml/NyaCpgKk1F40FTu4IeBF1um8cnvoqowTCqQFuG5b27BenrdMWJ+vpY1ML/CnJIhA SXNliTfcbSKrBk5uznENytuC7QTDlrgRiTrffHavZtPBtVR/bhc4Gudc0yBuefAqB0U7 xBE5z8zRhOceHU8gnt+gbX3C9b5+NFk5eatGY6QQj7ZAatiUM1CQaB2uLSRHyEYINg8o QfhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356565; x=1722961365; 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=De4SMrBSDt0IKfpACiMysHGGtZ7LaSlvWkE+afXomyQ=; b=u7PLAhnsc/HPeTe20B7OT55hAMMnWGy/l9WL2XKVhajb6FsXC/c/HzIzUatmPI9gmu NN8H98dV+3bf4L75dbweoEDFZBVfZnA0vzcbXzGXlittckikIc7g4yz1NstHn7Rd8DOJ Kb/sSwxO6Ymdr5TYumwlPJcUGzgTx4xYWiycEAXzfrpqD0RgaErkA1kAx7Scfly0GYd4 7vfNwi2a1qsxyUVj4SihAzyd28qLeNqZVRZC2AejSQdsgSl9QAbBtrmpmW/jk7BmCCGH dJRseKHHdmn1LmKzxKXNR7bDGsK8YiOX+vTVfGIpkjP58JcWPDPebUEJ550iDmKBAHge EZ9g== X-Gm-Message-State: AOJu0YyJjSxvU8KDWe1Hv6vZVEGpaJ0wxRTQ7eYIR2Fp5r1sANznloyc vwcJcZIjQhl9xiqWv+DYTl2ndcKg2g2kl2T6aueW19LL/RCcWKdaYlSCux7gFcM= X-Received: by 2002:a17:907:d17:b0:a7a:c256:3cb with SMTP id a640c23a62f3a-a7d400e1442mr768461666b.39.1722356565189; Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab5c8fdsm663824766b.89.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:40 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 909945F9F3; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 08/14] tests/avocado: remove tcg_plugins virt_mem_icount test Date: Tue, 30 Jul 2024 17:22:31 +0100 Message-Id: <20240730162237.1425515-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Fixes: 4f8d886085 Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-9-alex.bennee@linaro.org> 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 = int(m.group("count")) self.log.info(f"Counted: {count} instructions") - - def test_aarch64_virt_mem_icount(self): - """ - :avocado: tags=accel:tcg - :avocado: tags=arch:aarch64 - :avocado: tags=machine:virt - :avocado: tags=cpu:cortex-a53 - """ - kernel_path = self._grab_aarch64_kernel() - kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + - 'console=ttyAMA0') - console_pattern = 'Kernel panic - not syncing: VFS:' - - plugin_log = tempfile.NamedTemporaryFile(mode="r+t", prefix="plugin", - suffix=".log") - - self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libmem.so,inline=true,callback=true", plugin_log.name, - console_pattern, - args=('-icount', 'shift=1')) - - with plugin_log as lf, \ - mmap.mmap(lf.fileno(), 0, access=mmap.ACCESS_READ) as s: - m = re.findall(br"mem accesses: (?P\d+)", s) - if m is None or len(m) != 2: - self.fail("no memory access counts found") - else: - inline = int(m[0]) - callback = int(m[1]) - if inline != callback: - self.fail("mismatched access counts") - else: - self.log.info(f"Counted {inline} memory accesses") From patchwork Tue Jul 30 16:22:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815320 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375056wrs; Tue, 30 Jul 2024 09:24:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXu0dAjdZri6XtRdaS64hrW+SWekc2aeD6K+VOlIeuwYdcTLM1QE4Qe8QM4O74rFiCyMj2d/pEEZXt1ht4bLsS9 X-Google-Smtp-Source: AGHT+IGBvEGxhzop1NhqcTyfO36EVw9dSnWPqgTcwVvEfkT9P7C9CvQvuZEOZrKIQqoVz4bkPQjA X-Received: by 2002:a05:6214:29ce:b0:6b7:a2c2:6121 with SMTP id 6a1803df08f44-6bb55a4a93amr146256436d6.30.1722356664821; Tue, 30 Jul 2024 09:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356664; cv=none; d=google.com; s=arc-20160816; b=TAN9507rmz8iOuYWuuZQQub/Q8cuTf4dIszEopHsx8waCccvXD963dbbR7KC+jCIVm 92sHmleg/g1Esf35iwo3VwFEV/yNtToGb913JLfuXu6cB+h7/MRIcpri+LexegTY3KdL JgkygZ7IKHiMZOy5Qra/3qRhoba/914HjlsLU1WgYxIsNkcAu9Qp1p5opEhPIzVT4WWl fzf6j2+lFcGhMHPN409H5nl+0s70Pm9E51Qdl3Nr4q++EgWIbSMQ3sw/mUkHNZJvUdXq EOpZ/B3GwtyXlpnXD4tJYy4c9ZhPEK1LkWDqXcocEz1blVP5aRJFuKWoYZrYXxPB3rDn UFYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5fyYDcDv5KTze2j09O6ktgDBKd/K+i4jbbZxm6SZYgw=; fh=yCGIEotPw5IZZY3kqWlFYzGDwn+Z91b1MKsufbfXZB4=; b=gA04bVsYJBCkiFd2gHM77D2jBl3zBZqES3deXaBXmcB7xrIYBAVFpzk0pn1hbglJMi NJqGKrJnDJ92jKG3u395Mhju8LZB9KiOxWEMR54bwhQbKLhucPCTzWLq7v6jpR57JoQp hQC2QKFmgV8ZPdwySwT9LKMmrRggTnH+ybL55bWB+433mfzPqFnyNJ7AT7bEhanytFuY 5ygK2JrC3aK0lFCANEKbsWXJfeIN63PXygUL2qXBKLpXmy/5dYamv2L0yywvp186ht9Z 7vznCk/9bLGh8dgkmGL6JH6Bld8DghgYqMtoOOYdPOAJLb6niyTAzmWpEwuIqD19NjK9 4vZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pt+uDukV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3faabb97si127330886d6.354.2024.07.30.09.24.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pt+uDukV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpck-0000Os-Tp; Tue, 30 Jul 2024 12:22:54 -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 1sYpcj-0000Gp-7D for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:53 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcg-0003ZI-Qb for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:52 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a7abf92f57bso624400466b.2 for ; Tue, 30 Jul 2024 09:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356569; x=1722961369; 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=5fyYDcDv5KTze2j09O6ktgDBKd/K+i4jbbZxm6SZYgw=; b=Pt+uDukV6XzCkr4vg4hpZabtXJryBTUPsi7HPzhbappBGLSq3rjYUOaeSB1tA7z7ia HXNlYXXoXaheWKfbU4ICtlGByMJ/09z4+0nZsqq0ZAi0S9zhgr2an6HYyaYFI21u2JNo t37Y0ajHAxvfzwM4DLM6ODM3kbkwEQ9aYG24BsWcnWCsqlw8J9YPWJr5WhwvpJGgohnl TTs+bSTuC+7fVq3HM58j1QZyTLeHTwNnqcZ+x0sZSUPaVDqXRkqhsQbC/TXvTt3cmYKs 7dUEkH1aL6HdIk/ODIlHFKD9IiuutxDoYyO/jN1xaM5fb9C8Nf9omGmsu1E1Fx52BZ5O Gs7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356569; x=1722961369; 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=5fyYDcDv5KTze2j09O6ktgDBKd/K+i4jbbZxm6SZYgw=; b=SLj36Rs5RnGpWDAntausOCb6U37C1f5fRmt2Ml3D0qIoFhvT4FCC6Ld+QLob0YJ3WQ xFaX/9V7OV0ffwO93ygvKGt3zBhxdHy9skqXcSy+m5cO7xJjGHp7h0vmjqYti9/CFCj1 5ZgB2tbp7gev/hCkBCSafiY2mQelSvxeckS88GX1urjpYomLtOyBT7K5M1WihSVNVeUw fY3yl163DZFj2+HYtp0SkNvyRRIST0YDGbS8DD7oPeiDcOPwM7LiD0UdRxIMSgnuin3A BWxH6mPv2PlVfBbFi6xirK5Xa1QcNGE/yiwEY+2RxYVoGa0H3PoUBAwGPr66lvjx6u+C ZGTw== X-Gm-Message-State: AOJu0YyQg0FNUmXUJWmI1msgpcCud3LxcVZcQCl8nY5ZO1JN7et6L5nX 1ccepMmqNtcU/S4eN9a+Cb7njryqLazy4u4k2MLBc249ta6jUhJhItNvd41u0aI= X-Received: by 2002:a17:906:d555:b0:a7d:3ab9:6a5d with SMTP id a640c23a62f3a-a7d40175219mr693454666b.69.1722356568939; Tue, 30 Jul 2024 09:22:48 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad903f1sm663624766b.152.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B05D45FA06; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 09/14] tests/tcg: move test plugins into tcg subdir Date: Tue, 30 Jul 2024 17:22:32 +0100 Message-Id: <20240730162237.1425515-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-10-alex.bennee@linaro.org> 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/ 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=".log") 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) with plugin_log as lf, \ @@ -107,7 +107,7 @@ def test_aarch64_virt_insn_icount(self): suffix=".log") 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=('-icount', 'shift=1')) 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') if 'CONFIG_TCG' in config_all_accel subdir('fp') - subdir('plugin') + subdir('tcg/plugins') endif 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=$(patsubst %,run-%, $(TESTS)) # If plugins exist also include those in the tests ifeq ($(CONFIG_PLUGIN),y) -PLUGIN_SRC=$(SRC_PATH)/tests/plugin -PLUGIN_LIB=../../plugin +PLUGIN_SRC=$(SRC_PATH)/tests/tcg/plugins +PLUGIN_LIB=../plugins VPATH+=$(PLUGIN_LIB) PLUGINS=$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c))) 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 = [] if get_option('plugins') foreach i : ['bb', 'empty', 'inline', 'insn', 'mem', 'syscall'] if host_os == 'windows' - t += shared_module(i, files(i + '.c') + '../../contrib/plugins/win32_linker.c', - include_directories: '../../include/qemu', + t += 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) else t += shared_module(i, files(i + '.c'), - include_directories: '../../include/qemu', + include_directories: '../../../include/qemu', dependencies: glib) endif endforeach From patchwork Tue Jul 30 16:22:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815317 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp374769wrs; Tue, 30 Jul 2024 09:23:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUObkuSbXJ8tmly01zian1D0HOg6MR3lJuL9p0fUbRsLbYFboC5/XarufN/UEUSoKgTdW0VcIYFuhk6QWn/8Ikw X-Google-Smtp-Source: AGHT+IFgCwp162XB8WEXJcFAzHRr4oenTdNN5IK4zbrHuJfUz6MCWkrdOJu3ijYG3KbA4PixFKW1 X-Received: by 2002:a05:6358:4a5:b0:1aa:c98b:aa0e with SMTP id e5c5f4694b2df-1adc06ed336mr1804050455d.26.1722356614565; Tue, 30 Jul 2024 09:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356614; cv=none; d=google.com; s=arc-20160816; b=WVezc3gYZnbMKFoV9Bedwf3ynX8P4O4ldO3Q/jCXscUXw1VGUKJmF3AubPXo/k6UQu GOZcCLGxdyX+kspMp78cpg1ZtsQ8Z+wXFpdVBdjx8lYkNrBgkIL/ue4E3FAGcCN76yHV uRRrbnlGMt3OH8CIyZhtyOUzQUrOaP7m45iUxka7N+UmCBS6QkFwMSruhmFouF3YiOm+ XPfCF6qXEpGNeaOSDrMHZ0htMYu0aHBMxgEQa4+3RoyvzAtL5kRmT3yqhzt4e4iD2tNw FWa+az8+Ef9ZnwyBbrCVRG0YUkZvkqN++wU4XP1VUJ4s0pgnkBvSQ6q3kpHeXEzo9K5N OdOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pT3wxysinP1/vqZhzz3VG4XyPoJuCBoPuep2wbRBO8w=; fh=xXKHdlBCTdJMHNn35rt5QTFz4Fd6uiBLoguMqzTwiis=; b=0USF5kZx0/FhUFsE/kCQS/Zc9KaIMPz1HNebqbEe7dgV1RvKgUSX9Ay3uwUsKKsmk8 2hQP/ZYxrJPhRBWnlivVtDXQRtOL2bK4JNpqUX+C03Yhi2LL1GpTBXg53HtHIdFnClds gj4eCkYq15oATq0U8lW8nAZgP4pLySyYnlco/K8AuB5Zs8Zyko6I6+f+1BsTXUmkTQcz lIxcByMDYUBJcNAU2ZerKU3INKUUdutVz2Z9qkvumIC+tDSP/4LCNlXfw9sk85/tt9hT 5Dw1V4yWwYADYzbYfMCY4ckiNDw0nDfAgP/S1j784ENVjSjd6oKbQ5XXMY920X4dlE1F NooQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W+ouXKcv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6bb3fa86829si129171846d6.251.2024.07.30.09.23.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:23:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W+ouXKcv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpco-0000fM-TF; Tue, 30 Jul 2024 12:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYpcn-0000YZ-1I for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:57 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpci-0003Zk-Sj for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:56 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52f04c29588so8631011e87.3 for ; Tue, 30 Jul 2024 09:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356571; x=1722961371; 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=pT3wxysinP1/vqZhzz3VG4XyPoJuCBoPuep2wbRBO8w=; b=W+ouXKcvLChFzxtAVpv6ujlJCxLf3CUlvMwy/UYUXKzM9zxzelnCC2tEo8IDMavEW8 530P5HUAoOh1PhXcvGVs+UGxmIQNzMOeuoAkQZOlPx9/3UeWWh45LpNrE+FuQmwGcDA4 Hortf/RCGLu4tTj28HEV3dK6+THAQ6OIlWbbytpyJgjY24MzituPsaJnlVZLzdaSng5p 9EQhQwPduNeo8gKON9US7TgP9fltY1Im+ALTUKQoQdhEtCeQ//7YN4OTrjEZU6tus1m8 QWvW+4eUyrTihdJuGcEZBz9t5gsm9wBQTST6I6SJ1sfE/vGXd5/0GzySi7fTYemFR6xC 0QZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356571; x=1722961371; 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=pT3wxysinP1/vqZhzz3VG4XyPoJuCBoPuep2wbRBO8w=; b=NhvHXU5/g6xMuXA8fDAEN5Nxb/bYOGuK9ZHSdBhn9kXE9PfWHW4B+hP84X3jWo7EO7 AhSS6z6DgrjvO7cjyOy0PZP51fy6cfck49Ua0rp0vODiJMba2KTnl6/mD0GSiRnbSadl m0t93075Yhg9qrobb2ByQ4YJhuvUhXlLJ4ZzyLl2yVcDKaw5YC4oi02BLyWCK+FqwVRz UO7NsugW50r/e4SnfXtFRsdygkoZFZVFyzHK81iLOgfPdOkthR+DAqVAPFsQayQUuwkz hk/LE97H2geLK+Ndu8isoWMwtjB+KfUVi5mRlXoO8Sz9I2Y/o3q7fv2vYgM0XE63SsyV dI2A== X-Gm-Message-State: AOJu0Yz74+/ZJdlfSZ4NgLbW9ipQNGOjKJWOFHQJrWi7iZmQRKkN+GrA 5rEimprWH6V8eaxMR9WgjhUi5Acdid4FHAlkcyZopPdxrQ85ug6/mc45kqnG814= X-Received: by 2002:a19:5f42:0:b0:52f:cdb0:11c0 with SMTP id 2adb3069b0e04-5309b279e5cmr6089892e87.21.1722356570521; Tue, 30 Jul 2024 09:22:50 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad90130sm673004366b.144.2024.07.30.09.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CB2185FA08; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier , Paolo Bonzini Subject: [PULL 10/14] docs: split TCG plugin usage from devel section Date: Tue, 30 Jul 2024 17:22:33 +0100 Message-Id: <20240730162237.1425515-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Acked-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-11-alex.bennee@linaro.org> 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 -A number of features are only available when running under -emulation including :ref:`Record/Replay` and :ref:`TCG Plugins`. - .. _Semihosting: 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=on,count=hint \ + -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="file=contrib/plugins/libhowvec.so,inline=on,count=hint" $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=15dd99a1991e0b3826fede3deffc1feba42278e6 + 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=true|false + - Use faster inline addition of a single counter. Not per-cpu and not + thread safe. + * - idle=true|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=true|false + - Use faster inline addition of a single counter. + * - sizes=true|false + - Give a summary of the instruction sizes for the execution + * - match= + - 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=bl \ + -d plugin ./tests/tcg/aarch64-linux-user/sha512-vector + ... + 0x40069c, 'bl #0x4002b0', 10 hits, 1093 match hits, Δ+1257 since last match, 98 avg insns/match + 0x4006ac, 'bl #0x403690', 10 hits, 1094 match hits, Δ+47 since last match, 98 avg insns/match + 0x4037fc, 'bl #0x4002b0', 18 hits, 1095 match hits, Δ+22 since last match, 98 avg insns/match + 0x400720, 'bl #0x403690', 10 hits, 1096 match hits, Δ+58 since last match, 98 avg insns/match + 0x4037fc, 'bl #0x4002b0', 19 hits, 1097 match hits, Δ+22 since last match, 98 avg insns/match + 0x400730, 'bl #0x403690', 10 hits, 1098 match hits, Δ+33 since last match, 98 avg insns/match + 0x4037ac, 'bl #0x4002b0', 12 hits, 1099 match hits, Δ+20 since last 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=true \ + -d plugin ./tests/tcg/aarch64-linux-user/sha1 + SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6 + 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=true|false + - Use faster inline addition of a single counter + * - callback=true|false + - Use callbacks on each memory instrumentation. + * - hwaddr=true|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=15dd99a1991e0b3826fede3deffc1feba42278e6 + 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=15dd99a1991e0b3826fede3deffc1feba42278e6 + 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=reads|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 writes) + * - io=on + - Track IO addresses. Only relevant to full system emulation. (Default: off) + * - pagesize=N + - The page size used. (Default: N = 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=/dev/sda2 systemd.unit=benchmark.service" \ + -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=sreg -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=0xd5384100/ System Reg) + Instr: mrs x1, tpidr_el2 (1789339 hits) (op=0xd53cd041/ System Reg) + Instr: mrs x2, tpidr_el2 (1513494 hits) (op=0xd53cd042/ System Reg) + Instr: mrs x0, tpidr_el2 (1490823 hits) (op=0xd53cd040/ System Reg) + Instr: mrs x1, sp_el0 (933793 hits) (op=0xd5384101/ System Reg) + Instr: mrs x2, sp_el0 (699516 hits) (op=0xd5384102/ System Reg) + Instr: mrs x4, tpidr_el2 (528437 hits) (op=0xd53cd044/ System Reg) + Instr: mrs x30, ttbr1_el1 (480776 hits) (op=0xd538203e/ System Reg) + Instr: msr ttbr1_el1, x30 (480713 hits) (op=0xd518203e/ System Reg) + Instr: msr vbar_el1, x30 (480671 hits) (op=0xd518c01e/ System 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=lockstep-sparc.sock \ + -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) + Δ insn_count @ 0x000000ffd07d9c (809900609) vs 0x000000ffd06678 (809900612) + 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 options: + +.. list-table:: Hardware Profile arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - track=[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 be 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, 0x20003ee4, 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 disassembly. + +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=st1w,afilter=0x40001808 -d plugin + +This plugin can also dump registers when they change value. Specify the name of the +registers with multiple ``reg`` options. You can also use glob style matching if you wish:: + + $ qemu-system-arm $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libexeclog.so,reg=\*_el2,reg=sp -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=msr,ifilter=blr,reg=x30,reg=\*_el1,rdisas=on + +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 working +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 misses, 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=N + - Print top N icache and dcache thrashing instructions along with + their address, number of misses, and its disassembly. (default: 32) + * - icachesize=N + iblksize=B + iassoc=A + - Instruction cache configuration arguments. They specify the + cache size, block size, and associativity of the instruction + cache, respectively. (default: N = 16384, B = 64, A = 8) + * - dcachesize=N + - Data cache size (default: 16834) + * - dblksize=B + - Data cache block size (default: 64) + * - dassoc=A + - Data cache associativity (default: 8) + * - evict=POLICY + - 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 = ``lru``) + * - cores=N + - Sets the number of cores for which we maintain separate icache + and dcache. (default: for linux-user, N = 1, for full system + emulation: N = cores available to guest) + * - l2=on + - Simulates a unified L2 cache (stores blocks for both + instructions and data) using the default L2 configuration (cache + size = 2MB, associativity = 16-way, block size = 64B). + * - l2cachesize=N + - L2 cache size (default: 2097152 (2MB)), implies ``l2=on`` + * - l2blksize=B + - L2 cache block size (default: 64), implies ``l2=on`` + * - l2assoc=A + - L2 cache associativity (default: 16), implies ``l2=on`` + +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 stop it +and understand where its execution flow went. + +Two types of triggers can be configured: a count of instructions to stop at, +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 address +0xd4 with return code 0 or at address 0xd8 with return code 42:: + + $ qemu-system-aarch64 $(QEMU_ARGS) \ + -plugin ./contrib/plugins/libstoptrigger.so,icount=20:41,addr=0xd4,addr=0xd8: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 ================ -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=on,count=hint \ - -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="file=contrib/plugins/libhowvec.so,inline=on,count=hint" $QEMU Writing plugins --------------- @@ -191,479 +159,6 @@ which means callbacks may still occur after the uninstall operation is requested. The plugin isn't completely uninstalled until the safe work has executed while all vCPUs are quiescent. -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\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=15dd99a1991e0b3826fede3deffc1feba42278e6 - bb's: 2277338, insns: 158483046 - -Behaviour can be tweaked with the following arguments: - - * inline=true|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * idle=true|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=true|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * sizes=true|false - - Give a summary of the instruction sizes for the execution - - * match= - - 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=bl \ - -d plugin ./tests/tcg/aarch64-linux-user/sha512-vector - ... - 0x40069c, 'bl #0x4002b0', 10 hits, 1093 match hits, Δ+1257 since last match, 98 avg insns/match - 0x4006ac, 'bl #0x403690', 10 hits, 1094 match hits, Δ+47 since last match, 98 avg insns/match - 0x4037fc, 'bl #0x4002b0', 18 hits, 1095 match hits, Δ+22 since last match, 98 avg insns/match - 0x400720, 'bl #0x403690', 10 hits, 1096 match hits, Δ+58 since last match, 98 avg insns/match - 0x4037fc, 'bl #0x4002b0', 19 hits, 1097 match hits, Δ+22 since last match, 98 avg insns/match - 0x400730, 'bl #0x403690', 10 hits, 1098 match hits, Δ+33 since last match, 98 avg insns/match - 0x4037ac, 'bl #0x4002b0', 12 hits, 1099 match hits, Δ+20 since last match, 98 avg insns/match - ... - -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=true \ - -d plugin ./tests/tcg/aarch64-linux-user/sha1 - SHA1=15dd99a1991e0b3826fede3deffc1feba42278e6 - inline mem accesses: 79525013 - -Behaviour can be tweaked with the following arguments: - - * inline=true|false - - Use faster inline addition of a single counter. Not per-cpu and not - thread safe. - - * callback=true|false - - Use callbacks on each memory instrumentation. - - * hwaddr=true|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=15dd99a1991e0b3826fede3deffc1feba42278e6 - 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=15dd99a1991e0b3826fede3deffc1feba42278e6 - 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=reads|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 writes) - - * io=on - - Track IO addresses. Only relevant to full system emulation. (Default: off) - - * pagesize=N - - The page size used. (Default: N = 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=/dev/sda2 systemd.unit=benchmark.service" \ - -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=sreg -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=0xd5384100/ System Reg) - Instr: mrs x1, tpidr_el2 (1789339 hits) (op=0xd53cd041/ System Reg) - Instr: mrs x2, tpidr_el2 (1513494 hits) (op=0xd53cd042/ System Reg) - Instr: mrs x0, tpidr_el2 (1490823 hits) (op=0xd53cd040/ System Reg) - Instr: mrs x1, sp_el0 (933793 hits) (op=0xd5384101/ System Reg) - Instr: mrs x2, sp_el0 (699516 hits) (op=0xd5384102/ System Reg) - Instr: mrs x4, tpidr_el2 (528437 hits) (op=0xd53cd044/ System Reg) - Instr: mrs x30, ttbr1_el1 (480776 hits) (op=0xd538203e/ System Reg) - Instr: msr ttbr1_el1, x30 (480713 hits) (op=0xd518203e/ System Reg) - Instr: msr vbar_el1, x30 (480671 hits) (op=0xd518c01e/ System 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=lockstep-sparc.sock \ - -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) - Δ insn_count @ 0x000000ffd07d9c (809900609) vs 0x000000ffd06678 (809900612) - 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 options: - - * track=read or track=write - - 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 be 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, 0x20003ee4, 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 disassembly. - -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=st1w,afilter=0x40001808 -d plugin - -This plugin can also dump registers when they change value. Specify the name of the -registers with multiple ``reg`` options. You can also use glob style matching if you wish:: - - $ qemu-system-arm $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libexeclog.so,reg=\*_el2,reg=sp -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=msr,ifilter=blr,reg=x30,reg=\*_el1,rdisas=on - -- 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 working -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 misses, 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=N - - Print top N icache and dcache thrashing instructions along with their - address, number of misses, and its disassembly. (default: 32) - - * icachesize=N - * iblksize=B - * iassoc=A - - Instruction cache configuration arguments. They specify the cache size, block - size, and associativity of the instruction cache, respectively. - (default: N = 16384, B = 64, A = 8) - - * dcachesize=N - * dblksize=B - * dassoc=A - - Data cache configuration arguments. They specify the cache size, block size, - and associativity of the data cache, respectively. - (default: N = 16384, B = 64, A = 8) - - * evict=POLICY - - 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 = :code:`lru`) - - * cores=N - - Sets the number of cores for which we maintain separate icache and dcache. - (default: for linux-user, N = 1, for full system emulation: N = cores - available to guest) - - * l2=on - - Simulates a unified L2 cache (stores blocks for both instructions and data) - using the default L2 configuration (cache size = 2MB, associativity = 16-way, - block size = 64B). - - * l2cachesize=N - * l2blksize=B - * l2assoc=A - - L2 cache configuration arguments. They specify the cache size, block size, and - associativity of the L2 cache, respectively. Setting any of the L2 - configuration arguments implies ``l2=on``. - (default: N = 2097152 (2MB), B = 64, A = 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 stop it -and understand where its execution flow went. - -Two types of triggers can be configured: a count of instructions to stop at, -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 address -0xd4 with return code 0 or at address 0xd8 with return code 42:: - - $ qemu-system-aarch64 $(QEMU_ARGS) \ - -plugin ./contrib/plugins/libstoptrigger.so,icount=20:41,addr=0xd4,addr=0xd8:42 -d plugin - -The plugin will log the reason of exit, for example:: - - 0xd4 reached, exiting - Plugin API ========== From patchwork Tue Jul 30 16:22:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815318 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375032wrs; Tue, 30 Jul 2024 09:24:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTbw1UqbvKsyvwvKDyNb0y6ICl4uJbRFhIkzdxaHLGcgRGaS1ZMq5z9xQy2C5+lGZy1iqEPJNNCBbM2BFaRwuA X-Google-Smtp-Source: AGHT+IGmJJgI3if4sc+AvWKGo9j8kXZBr5HKabXi/Bylsx73yw0kRNdoAuzS7FFvINIiX7rNnNpQ X-Received: by 2002:a05:620a:4614:b0:79f:1783:4ba5 with SMTP id af79cd13be357-7a1e5231221mr1464911085a.12.1722356661576; Tue, 30 Jul 2024 09:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356661; cv=none; d=google.com; s=arc-20160816; b=N6Bi8QWXFle91LL7dSkA/Fu4IoxAxyyK66JxoZAlnzd+lkc4lninJ3+Fu0TWbzDk94 R/rhWEghmx+ceP7yP1h2y7ae49Ar8LD07PIolM0sftE2rda2UdBVgOQ0OrpKCFxMXn2F TDVjaoW94cMC1T3dz5P3Dc9yXiRd9EHpkUw0xuTY18ODIJG2wXMvjKbvlV5qI6Mptcg0 zuoBagcTLXgYpCEIr0HDMYpwNhSbNpiri/8NU2luTQuSr7Mq93hpNMmS2OoVvQSlVqVa 0XYJzfpYcE3nxevVJD4fqo0MELp79zR4YjCBIMASYxP18bFENz42uoVUSaq/p1Qhwhwc lxIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; fh=atvuuLFF0st4bsO/NnjL8Tabv59BG0BFeCUPTT9pJ/4=; b=OpjsbwLNiOod4jTDnq6CKBhQYhz7ZpLeidW1/kkg3XsgKqU4GZhwJ9D+x8dbCecg0Y rPHJ7lYOvuJZN3Q7HsaWcyS9RQXcjb+3FXi55NmC3MguGVrLZrNqDCVAQfWzZWE0fg/o rDMkTy/VRAGOjeIX9KtdWOjIc5/6WPTuGlHbuTtu7tymPSolcCdEwUR//xa12OV/Inwt dKYk//mYNoDv6WPgzicS5Dqgqkp+kweKEvnOJCF4M56VzJJDF5nZUknEWYAD4PY7vZ59 uR4hkjZO0p1RMoY2QwuadjeLRYlN94p29anhvrCzii2CCI6Gdv5NvQmquLvRERUCvX4/ fKrQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NWMXmfdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1dff578bcsi1022270585a.265.2024.07.30.09.24.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NWMXmfdj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpcj-0000HV-CU; Tue, 30 Jul 2024 12:22:53 -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 1sYpch-00009W-LB for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcg-0003Z9-5w for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52efc60a6e6so7645535e87.1 for ; Tue, 30 Jul 2024 09:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356568; x=1722961368; 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=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; b=NWMXmfdjrxQOlAcs/nJvuzluGuwDzkB4Mw+7nb6K6qOFxXVuLqAuFdoCNfHz2OJqQH iybK/h9y2978wsKjc4qortPWYBRuYh+RcaoOP53mYhnjYIXPTGRltzBMGGUQLNcudqdx /j309EhMo5eNgknba3Q6GPVU+9LPD/S6ZGFaAUouiJLpUPzezKxvJpYXaO5P1O6LPCAR +srFLsOO0PFXUb7Whg54SpdZe6FzIxUQNW0BufOuhYXmOtAXckWdd9q6Pf3vJhW+9gkX izbg2JeO7U7kdJQCm1QxuBbgND4rQ9B7R3BGuLVmTD+SefdkrU0TfnpNicf1apmFQb/r /YyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356568; x=1722961368; 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=xzDMp496rGrP+ZJVpvdPMnx/krw5GVt88UpcZ2FrH9M=; b=pyJd3YB8D/pRITnFG48kuATFJG7+hleaP1ulSuD+fIE+sn+KAQ81H//Z3JyhQ95x4J uQliRZMZwOkptbkmm04cZ5ZosMqxAD39TrG4iT7Tfs06mHdsGtQfII7thy33qXRvHkLr tiYKt0E/tMQuNPZ8nZxW7crqwvBSk+a1IBkrHBOIMztaW4OVHPDkxC+R9XOU5V2KvF0o dGRNZ8fJJpaetGAtGBuQ0IDWt7hl39CgCk1RltJvepPhukHE2OJpa5XMMXorcg3IcA0f ITZ55bR0vt6pmgXRL8JHqLl8quqFkYuZGYRqgGqRJNCoqVmGGSGnIChnjxIFdoNxjpum +ftg== X-Gm-Message-State: AOJu0Yxi2GJfnoaBOjGBAKyRbTT5IalZGm3JDhw7hd80AZuUP5Kq440H wgeBANFS9/ZI7B/zlLBnkce8KEZYcueEUnI/3bE+iENA6yNkGbzQZrmzWlSsWfY= X-Received: by 2002:ac2:5051:0:b0:52c:df8c:72cc with SMTP id 2adb3069b0e04-5309b2bb607mr6887766e87.43.1722356567823; Tue, 30 Jul 2024 09:22:47 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab23132sm663923866b.27.2024.07.30.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E170C5FA0C; Tue, 30 Jul 2024 17:22:38 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access Date: Tue, 30 Jul 2024 17:22:34 +0100 Message-Id: <20240730162237.1425515-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x135.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Message-Id: <20240725164851.1930964-1-peter.maydell@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-12-alex.bennee@linaro.org> 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); } g_string_append(line, "\n"); From patchwork Tue Jul 30 16:22:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815328 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375431wrs; Tue, 30 Jul 2024 09:25:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWbrrrJpEooonRVPpqeMtTeJWRpxqemcJBVjCP/kSNB5ly9NELUKdbzKBSL3Hc6E1soZiv5DJ+1j1UT3qb5tGSG X-Google-Smtp-Source: AGHT+IGox/rULyZKwpS8zPNzo06ZrBKSoI0yth0L8S/pkEQoiatVufxbceEdUiPdwwyBITAE2Tmg X-Received: by 2002:a05:622a:2987:b0:442:1bdc:2a6 with SMTP id d75a77b69052e-450375d488bmr34684541cf.30.1722356719773; Tue, 30 Jul 2024 09:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356719; cv=none; d=google.com; s=arc-20160816; b=lSn4wlr8+k1W9a69IRk4eYEjxJEyBCaRF97tDyrIcHUlo5nL72+dSXmHpEUKjjyZpo 0BKtrm+h70syo4QmYFdILhi21c2ebbkcW8FtjN7SZcK1LoLxqbpsSXkt3CB+l6Nh4+WJ gBUv9RbNQVoEaJO0rVaAZ8lL3CZTokvtsYx7gl1S6b1LDGUmMhQWKJ1GoO9f0HbJV//j /hwq9ht84Y41i5n+igwfGGwJzKKZXaOwXkqLkBBvI9MbnC8ROnc3aSKRvjWT3+ltUFwf 3DUg9JfjkeyVP/AJW36fXZHENjiwJvsL38KJuf8Y5eOD2yxknrJQkGF29QVVAOTvo8dN 91iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LRXaIONybMmBdGeWuB9Y8awgTfEnHzKiFMl1WGBWlGA=; fh=FAL2D6uTyIa7tGzjyRrQN+DzefW95j5rgBe4AZL1gi8=; b=uUI/Yq0jolpdnpC+Vt/H2f5v0uZht4DRVHtaiOtEuQtJjGPiwY7XKnS2WckYxNdPZQ ajTD8uYmo1pFj2Dio6Nhw7dTPyvrxqG7q0oqhUN62ub965P88iEK2GlgTr840eSAlff3 2Q11Q65vVwPelGLfhV09r8gOSB8vnuFAbRlJJDIduDw6AEL80W8LPZ0IZUQsW9qk2Q7o gzYwh3JotPNuara0Zn8FaMwTqQsYP938sSV/4Ivq4gqTr5jzACqdaQfWCg9tvRIkUvPD k8+aTbkiXcPKcBNsGvGmq20A835sPMWixI9PVDC3zNXfMVFT+JG0RPmjuUIFSH5mqT15 1kaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xuW2kCW/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe8425826si125907831cf.627.2024.07.30.09.25.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xuW2kCW/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpch-000092-IZ; Tue, 30 Jul 2024 12:22:51 -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 1sYpcf-0008TF-R2 for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:49 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpce-0003Yl-3C for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:49 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2f029e9c9cfso76608631fa.2 for ; Tue, 30 Jul 2024 09:22:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356566; x=1722961366; 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=LRXaIONybMmBdGeWuB9Y8awgTfEnHzKiFMl1WGBWlGA=; b=xuW2kCW/jI52nHiLJvt+6z06PHOyeuxOVM5cNIj33G3LdfEpb5kxBsawTQhyEmIYWB 50qVa742At3ElK9oNk2Ms8Kip3XE3BovgY2gSwrgr4GGKRwxgu3ap8/8Vf+QBS0nfgr3 43SIcxuKOnYDWa8KI3dCWC1VKLGCwgw8fUcQpcmLgqOd3iGqq4//W+k+RbMj0rw4GobB fYEB9KmgvKRL9uGzA1mxHLS08gxPE+uHA/dbaxeqG6OWUA7ydXZjNVvWxYwF7f7rvU1W W9PdtNWXVIhrMfho6j6Rq1kUR6YwnHDJRppMGjgPZcdFsYCjv9ETrbrKKEu2fb+Ty1mJ 2+UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356566; x=1722961366; 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=LRXaIONybMmBdGeWuB9Y8awgTfEnHzKiFMl1WGBWlGA=; b=dUAa6olayr9YZxVW+4wgx/HyjNtyP2rcFts0m5BY2dCDEfDScSaplAmXd0ooIKjjsC ZCxaK42NCcFVWB2ktX+KLWi3lQTZ/lOo2YHr5Jt2tUpWr7QBr3RZ6fM2WJL03Sd3BASG OOH+riFQtRfkcAKpgTAAI0u9CUM/yA1O2+A53fVSAYtNOi5pmoHtWXHw1j8QV6dPqojm /1DUxxLikJfad2Ck9gGA6+r1uv97fHiW1l+LKBmebQMEt/rUcxxpw8+by6JO1nv+E+ZY EzsojLd81iK5sgEzjkJZGOR4jcrhTHXN0MQfl2pjfT2um6LRWv5cw/Yw2MRQJ4C9BD/4 kU0Q== X-Gm-Message-State: AOJu0YzENlDSwHHVk0M5zDuajAmBawxgpdsBNDZWrzS6pIg/fJ+9+AmO MZCgLgNquz6tZLxvnyKV9bmtE/CXUxDMFNOHsYwkjjfKgzPeM3yGqht2cS7apes= X-Received: by 2002:a2e:9a87:0:b0:2ef:2f9e:dd19 with SMTP id 38308e7fff4ca-2f12edfeefbmr95149631fa.2.1722356565999; Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad41027sm660084466b.122.2024.07.30.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 043CA5FA0E; Tue, 30 Jul 2024 17:22:39 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 12/14] contrib/plugins: be more vocal building Date: Tue, 30 Jul 2024 17:22:35 +0100 Message-Id: <20240730162237.1425515-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x236.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Message-Id: <20240729144414.830369-13-alex.bennee@linaro.org> 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 SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) -# 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 := $(shell $(PKG_CONFIG) --cflags glib-2.0) PLUGIN_CFLAGS += -fPIC -Wall PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu +# Helper that honours V=1 so we get some output when compiling +quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && )) +quiet-command = $(call quiet-@,$2,$3)$1 + +# for including , in command strings +COMMA := , + all: $(SONAMES) %.o: %.c - $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $< + $(call quiet-command, \ + $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<, \ + BUILD, plugin $@) 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 $@ $^ $(LDLIBS), \ + LINK, plugin $@) else lib%$(SO_SUFFIX): %.o - $(CC) -shared -o $@ $^ $(LDLIBS) + $(call quiet-command, \ + $(CC) -shared -o $@ $^ $(LDLIBS), \ + LINK, plugin $@) endif From patchwork Tue Jul 30 16:22:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815326 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375366wrs; Tue, 30 Jul 2024 09:25:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpFKM+L7SQiql5WYWmTGiHj2XpAktgRSBqPY67hMBXNjJbTc7KzXP3SCRcUj58dfb64SnTP7iglAkF7sn5DZR0 X-Google-Smtp-Source: AGHT+IG7ND58bszH7Zj6HZOYo7tKOqF19gHT/vgb7fsRkg9bSVIbZxAjx42909sjoecwPwoQ3Zjp X-Received: by 2002:a05:622a:54e:b0:441:315:1c90 with SMTP id d75a77b69052e-45004d6b566mr96810561cf.12.1722356708687; Tue, 30 Jul 2024 09:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356708; cv=none; d=google.com; s=arc-20160816; b=IG7ki8oe0oANFc6PYB32XdI12wsSfrzR10vPXI3siRhY6fnUa6i8RXmxVB/87Z/hO2 +oZkRp5KL67c+oPQ/Rc+QAWafiDMBHlp/NjV3chLfteU9Vitme0roE+dphFi3Hljuq+A P8fTaQmQncUpyyWEki0goYvR35WB+0ncgizJv5knvT6awiKao1KO9QjSAhqwroJ1GJXh 2S4Cy+VxL8+2EyNLs5v6rsUVR/bB4G6ljJHlqaf9YD+kuJLUiVmRJGz5nJLqHJ85XWDM gJMDSiEg4atIlKPw3QkV78B0x4SauF6DLtQ79O4H8b+P93hNHVAx3rb/GUPqHJCqHL8q ixIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AUsqRXTeW3XYv9I38g7wul3S13NoPU/K/kBqTz9dI9c=; fh=wMx2pEWokZQt3/WejUyv0DjwzJbvjdRuhKfwHrLFRYw=; b=K2hrKJmNDVaLq1o9jVwF+KeJSMeoGdH32lkLzHmvMCm2ZSMheSM67V/E5FG9lPMFum kvEwxTjNY5BIgNWIiLLYHWGeEDF2FVUvI0caZtdx+eDw/OCbXy+Z2fKPsBcVv+1yD/zp YEo33R4jAlwnGtMj0Ev65B8bvuAgwyll9d4pdTKRXdUg37Yef3UJPN9OUwdl1f8bvmTU O0FUwhQvR5aFCgePNhP/EO6uEPLIYngOLuoovFTkz1dkle4dfvuYDH1JjnuYKtbSfRJR WBYvprZAzlnOMHk/gOajD9kG27y5QUUHnEVFGg0RaLeSnLWCCPGJiZfFsIyhkeSaFgjZ cs3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vWppsQGg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe8423e19si130988011cf.624.2024.07.30.09.25.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vWppsQGg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpch-00008Z-E1; Tue, 30 Jul 2024 12:22:51 -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 1sYpcg-0008VR-Cd for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:50 -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 1sYpce-0003Yw-MP for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:50 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a7ac469e4c4so5072566b.0 for ; Tue, 30 Jul 2024 09:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356567; x=1722961367; 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=AUsqRXTeW3XYv9I38g7wul3S13NoPU/K/kBqTz9dI9c=; b=vWppsQGgXHW3oQ6/lKX6BZudG7Y8hA2XpcOhpaxA27HEr8j+eoW2wIPG/OAK8AhsoE YCSTD+00v3Al3rsgqWgvxDC9wn6pqP/mr3X/50XiJkjKzmJlTb12ocIg/jTcCbS/Thrl 5evHY2xXb3VatZ659UCM0lOnv3j3zNG80TpC1vzzTMlki4Fke6oH2JPEAh/GBHNuo5sL lTDPe3AlTX28imCtIHWdzFYWS/Egh6mEyaiMCDJryGl5atiUY99P2PehlOku4RDTUJRX xdc6bh9oMvIOGAPHurBybm+HlZWtdg53PS2KXqOrsFz9QFblvVnTTcECh7BQ9e19DWBe TowQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356567; x=1722961367; 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=AUsqRXTeW3XYv9I38g7wul3S13NoPU/K/kBqTz9dI9c=; b=rjz0XvuTVJF0WV5S/L01isTGCLCPVBQH5x0yZo2Vq5DOJn0LdxFL81HRbThd6f4acC 4OurimzSOI4691/Ww7XsuxrnhNYlCiGnVMiB+GSXdpgLuJ8tlN/foGpN681XA/Qv7kyl i54Kam3QZLu9ypkGWDYuN1jNS9EuhJRYGlr54AYTJwR9Zf5DWXaKKGZYNyCkQQnlYXMV 4iJx9c3hLJ2ePHboewKsnMHUNG48O7vKy+/QiicS6tOHWBMsSgMonGOLvXbIJpbfTnRN K2gG3z9xkDioDiVjRirfYa3e9Deq/cWw/3ZlTwvM2bBjsdnVOL842vYFX8D9Arh0q8ke cHZQ== X-Gm-Message-State: AOJu0YygrqgePLGOAm9FMzDwrHPbtA7uiea4Ho4dbXqPQcZReqSdTEG+ bgEZLH7ToHksUZqpdYTXvTQLWPAZySM0c0dh3lHHj3SGQBS4mvcm5nP+uubjgrY= X-Received: by 2002:a17:907:3fa5:b0:a7a:bae8:f2b5 with SMTP id a640c23a62f3a-a7d85a9b845mr309430166b.36.1722356566935; Tue, 30 Jul 2024 09:22:46 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acad411bcsm655186466b.109.2024.07.30.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1AB8A5FA0F; Tue, 30 Jul 2024 17:22:39 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 13/14] contrib/plugins: add compat for g_memdup2 Date: Tue, 30 Jul 2024 17:22:36 +0100 Message-Id: <20240730162237.1425515-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Fixes: ee293103b0 (plugins: update lockstep to use g_memdup2) Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2161 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240729144414.830369-14-alex.bennee@linaro.org> 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); } +/* + * 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 != 0) { + new_mem = g_malloc(byte_size); + memcpy(new_mem, mem, byte_size); + } else { + new_mem = 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 = { log, 0 }; From patchwork Tue Jul 30 16:22:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 815321 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp375108wrs; Tue, 30 Jul 2024 09:24:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWScsEAjr9nDBmhX06BpNBscthMW6nQaXfoCtTbHjc5+SVtoot7XtlCDg5O7JjVnuLDzXTai1UdGbaRmfDOooaB X-Google-Smtp-Source: AGHT+IEV7wQcYwK9bqE9MQR99DI3Wj0zoIXaq+l1Ql9jXM6IktxY211UmMaQbS1/IqasmdS6HKFx X-Received: by 2002:a05:622a:190c:b0:44f:e076:b533 with SMTP id d75a77b69052e-4503727bff3mr47034451cf.5.1722356671390; Tue, 30 Jul 2024 09:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722356671; cv=none; d=google.com; s=arc-20160816; b=aWt3v3dM9+CmlcTXoX1W+//AxsLRQ3LK7czSSXLpxkyZztKml4y8IUmDJzo63FWDI8 iTsl1I4TyWq/VGlZanle3DPWNF12ph1VAl7o0pFjLY7N8ZFZxITe4IOlTGU6Ys0T/tl/ JPcF2FeSv7iPWQG2nepZdIyZo6VzEsTOIihmn6MACl1mTfeDCo5HBjapx1cYMiNE5tTS KhQV3kQa1f4R0uPS5su38OcPWz3jC2vsSyCJ2R7DBwJLfjXXB9NoYR1aMniCDbDV+3p/ dx9yjvv6hb8GwucIvBeDb991UzWFaajVr+HgVcgQwfNDMxyBsdeo0cKk6JtrY4EG93KM SEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1FnPcjctlWpwnIFsnPkrtWmDcvPIDAiyzZ72o/WD8fs=; fh=FAL2D6uTyIa7tGzjyRrQN+DzefW95j5rgBe4AZL1gi8=; b=HBJ5IZzglDW8Gv5go9oJVBVkft+MENmcA0v5yFPD2tkm7y35NJFaeKJ1JkDZjvVps0 8ZHgo1o7NtUJDzOKDPn2+BozCeXQf2MHyDh9LM1WGVZ6icJ1Hz+A5GREetnMr3vC2PSy DDGz6aPT7UgjxfLgircSZglD7aIhnRP31W8PGsMN10Y/rs96NvZfJWJu/PlbbeeP+3zv X48rEwmjjjQ1oh7iarLfkcaqD9mh/NkNjWe9zYHfn43q3Cr41kJfojAh9Eqaiiv6uYQQ KeGAArmIKKqDPQZ5mWwkzvwqXje4rb3IO1m53xwyMvDxI7tOjclZIhQ+YCITIKhoosl+ 0KVA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W76MdMTS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44fe8136c61si129713281cf.141.2024.07.30.09.24.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 09:24:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W76MdMTS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYpck-0000LE-1n; Tue, 30 Jul 2024 12:22:54 -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 1sYpch-0000AA-Qd for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYpcg-0003ZC-CI for qemu-devel@nongnu.org; Tue, 30 Jul 2024 12:22:51 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5a156557026so6753240a12.2 for ; Tue, 30 Jul 2024 09:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722356569; x=1722961369; 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=1FnPcjctlWpwnIFsnPkrtWmDcvPIDAiyzZ72o/WD8fs=; b=W76MdMTSXRdneTXg1r7k6NtNSY9DUWHznBcqWk6UHJq8fAOyRUBiJT4gK1Y27mMldS EUiVYHflfCbahxRkgeZIsTffbWTXYpIw/+VlhfexQV6AWDxfn0M/3B3iOYKkqMW2niSy lzDSJnJnPrWbJ8NKGYlOdKq9mpxdAa37CTmdtm3Hy4zgTeYKWK1Tr04OqIhauMJ/iulu ghFGU0MZRZeuKN6nEyPqGpsMityQIQrZKFEShggWQ5jzz5p1Sx1AoIbu8QUlyTsA6IRo XThb8ZW0lX2BD75hSHUhZ//SACYCjcpliNuf55nk3Miro6jT6x/reab4hy7NcnRP6qwv ORsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722356569; x=1722961369; 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=1FnPcjctlWpwnIFsnPkrtWmDcvPIDAiyzZ72o/WD8fs=; b=SNjd7ajCzYuQttLkKtnXHNorKBMhTTUeP6rH4c+wWVXaz+iC3YIU2l85+hrE7KD02y QwT0/0WfSnFLeoBCx4ZdyDqjoBCiHpi+Nn8aUXMANBZtC2NFSvBVDmaUm6Q2xBQuHUE/ xEQyzk6Mpy8vA26doG7ylyjxQtRZkMCd7a7yErpOZwqxAD69KFiwaUYzfy4s4WJ4RloN ZjDuV1nAwk9MLLgI4FmaMtKq2tlGjrJJGeYpohjGh2FuRc5mbXg0HHcjzIRxxae0Arut zJByaSrWTpYVTSuFPR0AIa2XYMyDzp0w0edtV+fu5SHXYS3FiHsMc6Wtf1mQYwEiWPIZ xQ/g== X-Gm-Message-State: AOJu0YxV+t8eprhkQUs25rF55ft/96rGmqq4jSp9JwBlO4yrE33wLAYi sZer1jxmuf2o47P8SeJFPH4ERMpBBq35IfsIyfrZt0U8yJ+Ic8i+BlKFzGSJde0= X-Received: by 2002:a17:907:3da8:b0:a7a:a892:8e05 with SMTP id a640c23a62f3a-a7d3ff9e775mr994858566b.33.1722356568591; Tue, 30 Jul 2024 09:22:48 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab4de06sm660840666b.71.2024.07.30.09.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 09:22:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2FE925FA11; Tue, 30 Jul 2024 17:22:39 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 14/14] plugin/loader: handle basic help query Date: Tue, 30 Jul 2024 17:22:37 +0100 Message-Id: <20240730162237.1425515-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240730162237.1425515-1-alex.bennee@linaro.org> References: <20240730162237.1425515-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Message-Id: <20240729144414.830369-15-alex.bennee@linaro.org> 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, const char *value, bool is_on; char *fullarg; - if (strcmp(name, "file") == 0) { + if (is_help_option(value)) { + printf("Plugin options\n"); + printf(" file=\n"); + printf(" plugin specific arguments\n"); + exit(0); + } else if (strcmp(name, "file") == 0) { if (strcmp(value, "") == 0) { error_setg(errp, "requires a non-empty argument"); return 1;