From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650345; cv=none; d=zohomail.com; s=zohoarc; b=VYBoEnY+4llcEhfRvx/3s3sNc3fj4+DG4jjXAI7Lup6eBFrNS65pKTMI4i7rSP/z95vWZYsHjT+EwFB9CuwTe/PuyWxp63QO0ZOho5mjDcW1T+qjHsvBPiCp9SbVpV52tzy3HOdY7crlyKCvahSqzJnw+TcBg7DEphoF3HwVx6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650345; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mb63Yt1v4Ty5OkvWSIBVZAbYBXgyy5QqQMvYk6KNSps=; b=VUeLpp7wYLAqg73RzNf6XMUqBXNjnq51IkaLlO/olPhiw8ZNOgrYnA9ftXmSJCpyACl//9l9F/gQHhbNBKG7fVW/OxjmNJTFvY3Eu24zEEoBTSoAWrz2z+Gq3tZRe8kXrfYa5XukCG6PBOekCoLt7wPPe9QDKmYpc7+R/B2Mx0o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650345216223.59945333780058; Wed, 28 Jan 2026 17:32:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtB-0008Tv-HX; Wed, 28 Jan 2026 20:32:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGsw-0008OP-EP for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:50 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsu-000371-Md for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:49 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2a7a23f5915so2510895ad.2 for ; Wed, 28 Jan 2026 17:31:48 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650307; x=1770255107; 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=Mb63Yt1v4Ty5OkvWSIBVZAbYBXgyy5QqQMvYk6KNSps=; b=oN7D1Ir4JW1Xf+SwlP+2vHgyKmkCbEVgENk7adgc7knq0wzhBAXdDy+UBxnszGKfDB e2uKWDGGqKnAOFWLyAfoQDF5wR1Q7fyom+0TEQgVDUtG6AzedabtKyhatkokNw2w7hGg 54FHrR86896mjNYZ+DBvBa9xI5K8cH4K0pySn21JmFE5SL1LPQNEQclrC3MCs3XbiPvb RILwcHpm7ATj3vpVB2VncUnRyAWek50f+Um+QEWmEqwzQ2+PtQNMvvxMfgSWw3WYNvnU Z+5wIOGnR/Ad6miScY6FT9WvdeaAHUfBfa1892+u1yHd6J7JGoJ9odle3otr0Wl7klVL fLtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650307; x=1770255107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Mb63Yt1v4Ty5OkvWSIBVZAbYBXgyy5QqQMvYk6KNSps=; b=Hx0NWQlPJJnN2UaNNKN+kjXdPTHuyNNFabWHzwmVmbc5lAbkWXOVkC3NyerARtG1Zl HfkWHrrgs5BNmFB7jiS6o9nbhKtL8x+kKxJpBqy4cA3xDRXP/aU3/kMw3kZVkCTWqUpe zskS1rCvqSe6oKbMlqI5XV2ERiwLXOeWgOvhgpFsskzvLNb7VmmCI9DiH5z8G2NpdH0a LlJusv8OfKarQVeyhNx6fdkFN/+bAUQNU+bB8Kqon3A05xzuANPyOKu/6CVW0e7zIcWy hfeo9y4kHRhufmjPU6uZXWVZqzr5a5VOpeU7SeM8/iyaqmF4eLnbrQXD0RfAh8RTAswb ckgA== X-Gm-Message-State: AOJu0Yzb0nJWikpyXEJfhYRrSxDUFKg5wJ1Y1WexYHlQtxbLJs65cVgq 5L2fLulLU2Hd9ccfBdSRzWkp2Y1wTqqGzUpxi4gqFAYxR6WaIy4nGN7rVzitSrf99yy+O2p8UKR JRsq+ X-Gm-Gg: AZuq6aLa8Ga1JfHqgq//q74LkkxCFNvQxbxuP01PXDNxN5bMelVDxk2ht0FCqJzsaAx qqTbfT+OgX6kZUsNBIGmudzOOEDkxuIfZ6hfKo3lXRI95Ja59aop328nc3WQTXHJYYZIwR7JEww 0XTrH5czKqeFMra9eUHx5NPEa/raxpT3N0fZHUljpbrBsqJ8IQe6KgkhBnkjyWVfaAq0LYQl25Z IQuSbyc1PIL+ok2gbA9WIgZb//bGOcB+A4g4HwXR5EFIOYrGwrWEvHX/S+DbQNZDauxBxsoApy8 Qc2lJAuyBZgg/UYWiQ28iQeTy9MB9d0pEodjpaCac3tXzNa6DFURyJxo6WCTzwzQH93wdQBVPXl LDTx8N1RofwC2ydm0xgiMn4h0mrifjL+6yE5SGfcKs5cfXNbFW/3VQgnEf9vO/QR34jtKzvdikB 1V68sIbet7oNMWUdbnxqKD6/EPjrj9p+R+qlxc4xxFFnPCnjX+Ruozhpr4y4D/pgO7 X-Received: by 2002:a17:903:1b08:b0:2a7:5171:921e with SMTP id d9443c01a7336-2a870ddbb1emr65997775ad.45.1769650306828; Wed, 28 Jan 2026 17:31:46 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Manos Pitsidianakis , Pierrick Bouvier Subject: [PULL 01/20] contrib/plugins/hotblocks: Correctly free sorted counts list Date: Wed, 28 Jan 2026 17:31:15 -0800 Message-ID: <20260129013134.3956938-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x634.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650348493154100 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury g_list_free should be passed the head of the list. Signed-off-by: Alex Bradbury Reviewed-by: Manos Pitsidianakis Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 98404b68852..d3dd23ed9fa 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -73,15 +73,16 @@ static void exec_count_free(gpointer key, gpointer valu= e, gpointer user_data) static void plugin_exit(qemu_plugin_id_t id, void *p) { g_autoptr(GString) report =3D g_string_new("collected "); - GList *counts, *it; + GList *counts, *sorted_counts, *it; int i; =20 g_string_append_printf(report, "%d entries in the hash table\n", g_hash_table_size(hotblocks)); counts =3D g_hash_table_get_values(hotblocks); - it =3D g_list_sort_with_data(counts, cmp_exec_count, NULL); + sorted_counts =3D g_list_sort_with_data(counts, cmp_exec_count, NULL); =20 - if (it) { + if (sorted_counts) { + it =3D sorted_counts; g_string_append_printf(report, "pc, tcount, icount, ecount\n"); =20 for (i =3D 0; i < limit && it->next; i++, it =3D it->next) { @@ -94,7 +95,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) qemu_plugin_scoreboard_u64(rec->exec_count))); } =20 - g_list_free(it); + g_list_free(sorted_counts); } =20 qemu_plugin_outs(report->str); --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650344; cv=none; d=zohomail.com; s=zohoarc; b=oEXXw2vAjVl4CnN0coXtwQsFbx7+0pUb3Y60v2sEk8EULztJhUZ1srq0sAfUSNaW7wLzBSYVGqSDoFPzx5sXjv8ILMfu6FQIB466Ayd/CDiEqMcL3ZjXK6ZX1rpdacuZRfHiHsLVe2+LQXVEZrRiqi9MvBwTvGIBReo6Nw82euI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650344; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jiteZZFsxsucsTi2GA57zdKipHQ9ataVKeACzlSeVWI=; b=CPJS+nHAThl1g9yeA5r0Hw/eJiahDD6Zud6ncu4h3NK7In9aekGKFAtow3BRubCGiReu5y5s8APwyY8I5D1ufWprozTWFol9f7IcsJWcjddJLRMRMsFh4sx2weoEIxW+npRhvdYSD7YuGAh+uCi0V925E9zRhMY/Yq/V5xRsSSE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650344296546.5896274569917; Wed, 28 Jan 2026 17:32:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGt2-0008R2-Qj; Wed, 28 Jan 2026 20:31:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGsw-0008PK-Rv for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:50 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsv-00037H-BK for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:50 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-8230c33f477so229552b3a.2 for ; Wed, 28 Jan 2026 17:31:48 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650308; x=1770255108; 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=jiteZZFsxsucsTi2GA57zdKipHQ9ataVKeACzlSeVWI=; b=zT1c8DyMPz9YMgsNLqzZuwYfcR4sMFxYhSZjGHahpwYxIZr4Wtz6b1/XorqvYpClNY EWvRHtG4m93nG3pPOmKOX68f5quyHDw567k5Q57lyV1w1bj2Od4oxqgCdqB6JEC2FGOB f8u5nuqZ2c2e/h4MPs7AALn80SSt6qDJpi4zUU/pgY6NfNyoPfyWyAmaVTSXZXothSCn xHHqTRr/CbO9XLDggW54GAIB/pBACUDc5+aVEua02s+br1JZwpbBAvdBEyJsQX066UX6 cY2DLhb0uS9L2wAuYnVgzHqqmeRe3sYXOwHJy8IPkI+NRH9Z7htsA/knWQTvrZXK10Y+ I5kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650308; x=1770255108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jiteZZFsxsucsTi2GA57zdKipHQ9ataVKeACzlSeVWI=; b=hdHvT8hQ94QO47A9M8yseEbJ7HC6NLBbueNbuwjGJsodN2CRywPVbj1G9fLsXx/ykK i96empbrp3fydNLwASMq7NKI17sWuUOWeSH+cbl/HXy4XerAXjwlxUkYdOTfqkACIJv/ Pv3Ge+wf8c6LGoEHLuwI3qO65ppMQfGhWSu5B3qNWdQFKNs6zJKxp4SQQFK1bThGAJMd SbizZ2KYrA31Q3mfWG0mapIYNmoTJ7j7qkGnhdRvUABywdkFBvFY6hYlFspW0E1gZwQw 8++GxrWoMx9X7LvBUVN3HRxrrgev60hiUMyOaoH83iV7DXmOifE+bJIDuWnVwi+BMtp1 bL5A== X-Gm-Message-State: AOJu0YwfbZuM0WUwDaUSA8RbuCQT11atsxHuYhGIqEAQmP4TfFOL682v TyjDJ9QIcDKN9TtcP+n0drpFQcJGbtuGV1sWATAR+/hsGwoirc6BzQ31pnmQ5JFvCqBqVZ4X/OZ 6vs6X X-Gm-Gg: AZuq6aK48gekj3cTJFgn6tXXJcnZnVMBQs7t8vXfEf+Euin35bJk0GIjZ2+rKAFyW+6 uXB6R/b55HdqVq6JKifpKeDs/U0LgADmwfekN0iKUa1CROepBy1jod1uRHUSGIKmpUaLUXHLLuS +wKqieJAtjTXR1zN3eK5wb3Kh7FdpMjBJziaNuP72C9eautzArlVjNQePOhyV3KPDdZFvSEvjek UOBtRQh5GjQ5S4QztIj6X6QKCIg53bTkrz44tEG7Ar0ZmrX1DxSylbN2jz0sDrq0f1ZvxDIb5Qf I4W9Aj5mkBaKw0UtrwU1OdKR353yqFvfr5eb0IdFThJDqD0rxTGA/B5mAXVwqUoGVtCnT/Z4Nv1 9XR/+zB9nrhgP1XFdWJ0brvbXt+HvVnB2kasFZZqI2q+nf/rT4Ai+vGnIf1FqRi0bvz9T/szYMz QwZMgAihOVO6tW+Fx6NSUSTYMnwbTnS+a8hYoTz2x0tQ6cPKaLGpTd9ihn9m2dR3Wp7BcKQ4KZl 8I= X-Received: by 2002:a05:6a21:648d:b0:38d:efca:1be3 with SMTP id adf61e73a8af0-38ec640a0f0mr6961764637.37.1769650307651; Wed, 28 Jan 2026 17:31:47 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 02/20] contrib/plugins/hotblocks: Fix off by one error in iteration of sorted blocks Date: Wed, 28 Jan 2026 17:31:16 -0800 Message-ID: <20260129013134.3956938-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x432.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650348487154100 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury The logic to iterate over the hottest blocks will never reach the last item in the list, as it checks `it->next !=3D NULL` before entering the loop. It's hard to trigger this off-by-one error with the default limit=3D20, but it is a bug and is problematic if that default is changed to something larger. Signed-off-by: Alex Bradbury Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index d3dd23ed9fa..cf4d6b8c363 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -82,10 +82,9 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) sorted_counts =3D g_list_sort_with_data(counts, cmp_exec_count, NULL); =20 if (sorted_counts) { - it =3D sorted_counts; g_string_append_printf(report, "pc, tcount, icount, ecount\n"); =20 - for (i =3D 0; i < limit && it->next; i++, it =3D it->next) { + for (i =3D 0, it =3D sorted_counts; i < limit && it; i++, it =3D i= t->next) { ExecCount *rec =3D (ExecCount *) it->data; g_string_append_printf( report, "0x%016"PRIx64", %d, %ld, %"PRId64"\n", --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650910; cv=none; d=zohomail.com; s=zohoarc; b=TjzwonmgmQArmn2ISg5Hh+BwvFkH4mOJDsyh2/+dgR5SevYbqQIw+XCWiN6P8U2CTEO5+FoP1EepUc8jBwH0I4e6GoF6z7WDiYpYvIeCfAtJ0GrNzJCj7Wsf0R6JiZmle/pvBGvfuj2jJH2v5+AmQv8esaYhy3AcwKM0DX3Ff8c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650910; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=H10OT/JmZdt1sJqFGtD71gnCPbtsRM0YrzZVFDAS0VI=; b=OvzwhoXQl2Srb7XJJ7J6QALfIGZCdNtNmoovUhNkJr5EAPdA/EJTzlBx90+eMgnCGNm606ToxJiy50YbWAZOkgoJT6P8Ruh1ixaaMU4n0joX9fmNOccOKT20ObCxvYKIeI/TBTnLhtB7QSizm7oSSxr7qBXZx4nztpk+wkOAXpM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650910606209.87893539571098; Wed, 28 Jan 2026 17:41:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtG-00006t-9v; Wed, 28 Jan 2026 20:32:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGsx-0008Pt-ET for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:52 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsv-00037O-SY for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:51 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2a09d981507so3056385ad.1 for ; Wed, 28 Jan 2026 17:31:49 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650308; x=1770255108; 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=H10OT/JmZdt1sJqFGtD71gnCPbtsRM0YrzZVFDAS0VI=; b=kVvqHRNKugNq8zqUoFWGe26W9qmlAe511W/5C3tgGW2qDRw6amEqnEmOEmyAIgndBg rmU+RQxaTLQiCA5xy57Tsr04K8uxcd8vv8PGo988CZVhRfa53POTdVlfEWgXq/vEXAfC 5eRQSLJ8tZ2OqaLEdgC4lf0FhDzjIfCCxtWcfZ5iaCVl/MyVhf6KHiUIwjFCkEXlf+wt sLfH53evQWkFf1hzuU94wWO78g58KPxH82fM8EjuBgaZHGVSJtsgU5yMIVaz+qzm/ln9 aLQmONMyNJMNmPvLhmAflS4PtkidpfkYcerV+uf0c2VPduqI/kSlonlosfOB6rnRPY6c Kqmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650308; x=1770255108; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=H10OT/JmZdt1sJqFGtD71gnCPbtsRM0YrzZVFDAS0VI=; b=UHyNRN+GwVX07tm76cUXcGAXGVuEpKYnCySJgz5sGOF0hWbHfzI35KG/cohwp00MS9 WM8lUrMDgyf9Q0fdY0MuX2rGkfozurZTqs59MXJy06mD7Cz+0iMZYXhYAJkWTOlUGiam +JCDXpLzEurbHDT782X4wOsmeiE7I/5eJ4dmmAmaSibCqxV5wKnxFc09+2QdKZX0dA4F ytrMvyZjDhqGhtP14T0OzqhMFpN4PN10GECTmBGcaZu63yxiswCzlcPcVoS39pUDEHVF Ebwkm2ooXYgzeVxx9I8PJvlWcDH6GfjaJXthaN2/t0HVTV/7OXpDOyHXj5Nd61c0K+Ex oeWA== X-Gm-Message-State: AOJu0Yyec0MsQFDZpFQnortCyxe6iaBmPXraMbVz+Ffq/mjAoudSVlcQ mblv6hVDk86JtCMqHF1SEMYuN/7tVRqVJYt7mpvvX4l8LfWD0mjX+kk4caEP5WcR0WaIWZvIUzY hKb7x X-Gm-Gg: AZuq6aJkB0L3emdQm45MwnMG466VExOz7PyaAbIKHcsJ/T8dmNCNhjl6LbHF6v8HBDw lLAF7PoAyvXJ9Y7SAuE5jsi77hrDyMIvlFnQVMWyyRkyQvraNv9oW5yEdAVEdaF5JdPvqAVh669 N1HpswyZkDLpTLGARFscA1fjblvWbAohTBsaYmVLgr+dLpx1AkgZk0u34tt3dnvX+tS5xYJijk9 RgMu7VKcwxdDKKzR8uetUqSznpQcCvSMOdYSazJlxTSS3RCK8ms9U+4EmW3vL/iEwjHEP1mwMEG ZObUu7LEBDkKnXz0bvLTaEzXlpZiw3rC7JvQi2pxSVaats7euCp8tO1FBifBeQesdzSnKXWN4Uz IHHceIEtoN8osHxIwirQn6pjUgsdWLeVcUI2FHYY4jPa4PmJ4b5ls7Ed5KtyQzK0Tn4yQ56x+Sl u00LtzBfIKWHKGYAE2+9FxpDC71OTcPBQjvRjV0rJkyuQSFjerly93ASOsuTfF1+nQ X-Received: by 2002:a17:902:f686:b0:2a7:cb46:7069 with SMTP id d9443c01a7336-2a8bd51b6cfmr11545135ad.25.1769650308325; Wed, 28 Jan 2026 17:31:48 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Manos Pitsidianakis , Pierrick Bouvier Subject: [PULL 03/20] contrib/plugins/hotblocks: Print uint64_t with PRIu64 rather than PRId64 Date: Wed, 28 Jan 2026 17:31:17 -0800 Message-ID: <20260129013134.3956938-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650912291154100 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury qemu_plugin_u64_sum returns a uint64_t, so PRIu64 is the correct format specifier. Signed-off-by: Alex Bradbury Reviewed-by: Manos Pitsidianakis Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index cf4d6b8c363..40d8dae1cd3 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -87,7 +87,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) for (i =3D 0, it =3D sorted_counts; i < limit && it; i++, it =3D i= t->next) { ExecCount *rec =3D (ExecCount *) it->data; g_string_append_printf( - report, "0x%016"PRIx64", %d, %ld, %"PRId64"\n", + report, "0x%016"PRIx64", %d, %ld, %"PRIu64"\n", rec->start_addr, rec->trans_count, rec->insns, qemu_plugin_u64_sum( --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650917; cv=none; d=zohomail.com; s=zohoarc; b=cY+pLHMYDFQvYqZnB9UDBzE9CvBHxri2pCUjakD9ELPRlMmdnfcuJQ+CLggXGNOWI/qnONf1KIXIl8tyewXXNP77PgFNR0oQCwpucsyrkUXS9aWifo8yd6rlRGEWVrhpov8TMC1UcylgngT6urtQLL7AdCdUshetgyzGjrZHcc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650917; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Sp/+2zkNN70VNo1bVArEQB9Y8epLsWsx9UzXKYDY3SE=; b=Z+UIX4Bv4i6cMf3nkWbjgTXkqJ43YSQVwApxJoINTp0WbBfz5AS1WR4OmEES1+o5QCWru5PnKSf1zF3BwMjxw+PkQfiBTaMw5Uh1rKscG0VP7TiI0Fs4nN8dDs5DLdh7Guq09N7MHLiLZSQ/amZLKwdQQZNavUhAuxJkKqrKVBQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650917312616.1852275072705; Wed, 28 Jan 2026 17:41:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtG-00008D-PG; Wed, 28 Jan 2026 20:32:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGsy-0008Q6-JO for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:53 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsw-00037j-TH for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:52 -0500 Received: by mail-pl1-x643.google.com with SMTP id d9443c01a7336-2a07f8dd9cdso2518955ad.1 for ; Wed, 28 Jan 2026 17:31:50 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650309; x=1770255109; 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=Sp/+2zkNN70VNo1bVArEQB9Y8epLsWsx9UzXKYDY3SE=; b=dGh+HTjcnyufXthst83+duj/H4TcOYfIA7WaBY+dUO/k9jcBOFkx12ce48Ow8jg81s Y/VTrgNG00dL1FZ3C01vzYD4+Ah1gZx39FEIxpZOZ07tcnHqJ600Ixmralhh+t51u5zM ont+lPWvK+zVGzrW8nhVLn3nlcnwGIAEkU6FSQdMLxYS3nTXLrnRx4t3tljvyfXexsjg ezBfoyQZyDm75/uHe5q/xxQVaSmMe55MkjMimMXg60g3ep+54K/Aj/uOK52QQwDmPoFS j7TTqDq3GUsYg+bUZbfmP9mDu2OEToUoou35mYu859Lj9GcQpgPMTeIZ854X9oMmKKdu q6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650309; x=1770255109; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Sp/+2zkNN70VNo1bVArEQB9Y8epLsWsx9UzXKYDY3SE=; b=KnrVuP4daGVbRwHK0TpV/EHKY/QLKsLEaHW69rYd17+f1/TmwLLoQIxAMPyQ+5KJK8 kSluDMmdi/4YN5doivXpcRotmDANOO3vaxnfOgu5a1FU20HLJQ5PbT8uAJgQ3zep5s0/ Z7LE3h/G8rOARX/fWl4EUUKKwIiXWRDUhK+MXyO02JANogL8JNeVOvKqvySRMzF0ZTXG LM5y+V2g7kD58vCbkwgXyOVN+St02+9P6cnMuvyoHyB+pjvXRaxJng7IlS+UeiPdruck OtYbhsdQie0J2gTycpPPkwp2tuAz6D/Eq9J4Z6NWwq2oFqNeA51falpFyfOPM2+upQwj dWNQ== X-Gm-Message-State: AOJu0YyO53gIbacEoP1N5A747oDmVG3xrieeWQGTRHHV/B8RvDvydM6b g2YF1HjRP2SXjCPM0NJQRaepvhip+pRhV7fIombkHfRZL0pdAvt9W+y1LdRk+uXhNqWFRWmVm/u S5cjg4fw= X-Gm-Gg: AZuq6aJkruOmLAgn03bIcvsFyCFPhqm7nePfrcgTnBtOIlvY/bepQ0HX70Yl+NTbxJ3 aJW+h4teeWg1ZVTRTxuUOs/BcPfF0dLWRjbDQg2rma9yB7CrS2SOCcMWOjJtfzgMnCa7KPSNucP HPVRh5dlXq7FK3zQqIK/ubTsZBWMMUZdxC+C/Zvi+L7YdqwHd91W0qqNR+0uaWvn2oL9K7QGQg8 exhcgW3GPFlIh9EFQ3lkEjMExFuPCKMfBWsPfSngR/ntnCkVO4gz7v6XJ7MbMHmkOx0/6OXmy5D 9buCqp5LJFEIVryWjL0OUgjsXySoIKPtKIKkNd9FZDJXuflfyPFIs2xno+vyudQn+1I7HemFk6F TzYvolBoHmd6lsRxTHj7Hu9OKdpYOtuOBTwz3ypSvzgn49cOoKgf6aj0YuFL/6GuI5W85+C/Jvk AOtj+idTzMEH+LQ5kfSuIniBuUYKYqVma0Y/q+8HJjZTPX7VSZLQaUp/6tpZ8Iy2ZE X-Received: by 2002:a17:903:4b08:b0:2a7:6114:4865 with SMTP id d9443c01a7336-2a870dfbf3emr66263235ad.61.1769650309035; Wed, 28 Jan 2026 17:31:49 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 04/20] docs/about/emulation: Add documentation for hotblocks plugin arguments Date: Wed, 28 Jan 2026 17:31:18 -0800 Message-ID: <20260129013134.3956938-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x643.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650918431158500 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury Currently just 'inline'. Signed-off-by: Alex Bradbury Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- docs/about/emulation.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index 4a7d1f41780..543efc4d7dc 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -463,6 +463,16 @@ Example:: 0x000000004002b0, 1, 4, 66087 ... =20 +Behaviour can be tweaked with the following arguments: + +.. list-table:: Hot Blocks plugin arguments + :widths: 20 80 + :header-rows: 1 + + * - Option + - Description + * - inline=3Dtrue|false + - Use faster inline addition of a single counter. =20 Hot Pages ......... --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650900; cv=none; d=zohomail.com; s=zohoarc; b=OB571SgHrSyEuqHud3F1pXhTGNOm8Zj8oTltGG8riKtR0ezWmSpr9Iv8Ps+xwxpYLrWZ6O1PygsaCwd1/24EuxRUvYQh2KKjxgyU3LJ2vy/pK7w24ranM+9gyjhGd3OyeyP1zHTxP0KWr/IHWDTC4GrutK3i863H0Y/mXFPPR6Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650900; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EF08xIaER/Brt/G4K9v56Pf963Rxs8WHbqL4EuG9O1M=; b=UzpJCRSHzxasT7mP0zKmag45VLmm912F2+9ZLcAYTJN7VnHnYBUNu+o39P7fNvmwmcpLnK1Llk8LRevL2Ne1QNd9o2MwdenQYjkP0QoqBGka6zhWVgiH/WiTyTl1Tetp+g3WnXSU45WJXSuqxfCH6N3ri/rn2WNhe/ghJbK7Unk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17696509008231013.4926433209242; Wed, 28 Jan 2026 17:41:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtG-00006w-Ab; Wed, 28 Jan 2026 20:32:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt1-0008QL-2p for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:55 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsx-00037r-Bn for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:53 -0500 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-34c2f335681so194377a91.1 for ; Wed, 28 Jan 2026 17:31:50 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650310; x=1770255110; 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=EF08xIaER/Brt/G4K9v56Pf963Rxs8WHbqL4EuG9O1M=; b=ywp5642k/898WahiTAOKsvjPLRpGSVcPvOx+Fl5NbZl62OjZEOe0vTF3WQgoZ9H4ot ljqvSz8ZlMyuGFxwG6gvDVCb2QdKrUosNA8+RoLmbyjGSZFo51PPvdIVpm1f8OwG6Zha gARtAzUjRiTHZd+7kiz1mP9uZzoPMWozUoE68YL2+rN4C90sVXT2pHzRiqIHt4sBWkPZ WLVx5O4Pd6sRudYPyXbq3XnhsybUCBXKn+k+VpbAQTX4L2uP7sSuzQzcshdXFWK5wmA0 fVcKHE8QVH2NIQa7+Y8kHZ9XjAxFw2AtLtEEVSwCTx8Zrk8/5awU4ddkilvrqsk0tZuj ZNdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650310; x=1770255110; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EF08xIaER/Brt/G4K9v56Pf963Rxs8WHbqL4EuG9O1M=; b=gm8lawfVs2k9Gpw2w4AojASiqJeNH23fnmXY+T/UrlRyprfWrrJ8P4WtCW1TO2+cNh ALMBzSUylP5OkNqaBbUuoJYfWEGwp96hXS132ZduAYJ03m0ms2JYxiz8V4K2iIlWM23J eZY+aFVScIn+vngkstb8iSBCSwnez2JQkmoprJdOWGdX61RL0e+n99Cmz1AM91I3ppKp al8HBcLLYTL0kV4YZFqypvD+xJK8jVLqJ/12rh81ExvFYQ8XGd6XIPpr0YGD1QDHAbol yZSrBt0uU+Ai7MWIh0pieRxPTZCx0VoltCB5ldA85/FJ/kqYeUHc+DCsuokQiURNp/R2 CFwQ== X-Gm-Message-State: AOJu0YyJFUO2wL+05APmBkFa1N2tPSbSuTwzlAOA/7mPNrxA0IFDo2Hj F47tGrsmZLR+Ak3dKrWoF2PZBTqYF1GayDorOeJpZER83lv2lMILAyWJ8cAo/wUc10FtnteRMu0 eDJuv X-Gm-Gg: AZuq6aIS8uMhfexcHRFBsp8+iTiFmrOx4+xK1VXeRWYg7sa6cdDCBQB2csGyyq/VyiO DJpoI4YAF1STzGyqEMdmY9sKujWj716ukhtTW/wf1fXZS9PLOQdKfXD4NZbeZFPKJtg9qHn71b5 LuFZ18+0hs4Jc3jwrj6JFJBNhPJnhXdu7qavPsPo0J6Uxxq1GisRhALn7kn+43Oy241cEYniDeF p2p8QTgOpZt0Q9U+HJ4fJVmsiEKqpTVm6SqZnr56lLsyTfQgYMrNSlOiER1buXoHvUTNPUQCBp1 OOcK7lhbHJXtaHf+y76vbs1yJrMLr7u82CBqwZxPOwSBoEmsclGfFuKVjmXIRlQLmIrpHBXRi34 +nDi9lmLfw1xV57cpjTVmDW40HFpdl21M1hcQpw7+Oy30eGFoYNM7IV0OY+hOgoW0nju3Di0sbA 7iea5MJAJ6f/fjiazYZtxWUwrbNluVQkGuGTkZx9NXpQ3pozIes0zLQhoQZIujlqCR X-Received: by 2002:a17:90a:d603:b0:34e:5516:6655 with SMTP id 98e67ed59e1d1-353fecde1c9mr6173985a91.9.1769650309931; Wed, 28 Jan 2026 17:31:49 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 05/20] contrib/plugins/hotblocks: Allow limit to be set as a command line argument Date: Wed, 28 Jan 2026 17:31:19 -0800 Message-ID: <20260129013134.3956938-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1036.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650902530158500 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury Also add documentation for this argument. This allows the default of 20 to be overridden, and is helpful for using the hotblocks plugin for analysis scripts that require collecting data on a larger number of blocks (e.g. setting limit=3D0 to dump information on all blocks). Signed-off-by: Alex Bradbury Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- docs/about/emulation.rst | 2 ++ contrib/plugins/hotblocks.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index 543efc4d7dc..e8793b0f9ce 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -473,6 +473,8 @@ Behaviour can be tweaked with the following arguments: - Description * - inline=3Dtrue|false - Use faster inline addition of a single counter. + * - limit=3DN + - The number of blocks to be printed. (Default: N =3D 20, use 0 for no= limit). =20 Hot Pages ......... diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 40d8dae1cd3..8ecf0339974 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -84,7 +84,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) if (sorted_counts) { g_string_append_printf(report, "pc, tcount, icount, ecount\n"); =20 - for (i =3D 0, it =3D sorted_counts; i < limit && it; i++, it =3D i= t->next) { + for (i =3D 0, it =3D sorted_counts; (limit =3D=3D 0 || i < limit) = && it; + i++, it =3D it->next) { ExecCount *rec =3D (ExecCount *) it->data; g_string_append_printf( report, "0x%016"PRIx64", %d, %ld, %"PRIu64"\n", @@ -170,6 +171,13 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qem= u_info_t *info, fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); return -1; } + } else if (g_strcmp0(tokens[0], "limit") =3D=3D 0) { + char *endptr =3D NULL; + limit =3D g_ascii_strtoull(tokens[1], &endptr, 10); + if (endptr =3D=3D tokens[1] || *endptr !=3D '\0') { + fprintf(stderr, "unsigned integer parsing failed: %s\n", o= pt); + return -1; + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650418; cv=none; d=zohomail.com; s=zohoarc; b=C/uz/n7fAnDFF+OFseGNEoxZzJzA2rr2W/JOvWUNu5r84O+K5ZETrDJ/rRsyrTIRluH9NNpKhMIum24GPNAvYwPHdFjLaf/N+q7h78/UCP0WFSVDOEcrDm9gI4DaGckz0FJi8dRgZENOOnkrFAtGOZoHHaEca1rbuarfndigj6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650418; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=giR0lEAONEiMMiYkdCiOQARrib58HlslRi8PTS8rJEc=; b=nhsepYgqaJEQHLOZBNidNTOLzDTG+ux/GjZ7QWURIENwjfwb1k2dsVpVhpcmLF+ER1Jdpr2xocIAPo2FHz+38YNKSI/FrY8cz96S9i9Qucil7D2B8V7QhJ0buOcbvS7gt32CSxPBf0sPclmZ2Lt9oq7EbHOUauVA5ilB6dTR8Yg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650418401460.09748387832497; Wed, 28 Jan 2026 17:33:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtA-0008Se-Fu; Wed, 28 Jan 2026 20:32:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt1-0008QM-33 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:55 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsy-000388-Cl for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:54 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-c634c20be90so155763a12.1 for ; Wed, 28 Jan 2026 17:31:51 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650311; x=1770255111; 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=giR0lEAONEiMMiYkdCiOQARrib58HlslRi8PTS8rJEc=; b=XuzqdhpvodNNH7Q3yn6uG+sqEvHxz2qx23U8wA8Dd9bEhiIjZu0sGCLEYLtehDmWZg t0qdARkvtoxqz76ZLcTZ48Knak2ff1G1oQG+88ewso3DDFPkCc/Tzb8XgmLX9jv/1q8K UfxsY8IrOtz6FpSfrHzVd6nkFVWBeJfpdI8QlS3//sCtsZYg8wX7gfPbQeUGD3t6FZk+ xTpqc7PRx7g60A3H+1tB/Mka7g7PNHvb9eiN8IKIjcC4PXaKWi5eveHAbUrfSYAdRmhs OqzmqwV1qeGYzIpm1hqhicQfPYb9zbXaocX1D443MisjFvd1/GEC6M9w5QGl6rY6RStU kGaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650311; x=1770255111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=giR0lEAONEiMMiYkdCiOQARrib58HlslRi8PTS8rJEc=; b=cgzp/d7Gr8V/xh3fSF+ipTLz/5z/iOV47WHpB4VenMJIbMHn6Z2pN5RKxEFJBiEW38 Viag5xRXquCqM2tQXgbsNLl7t6Hb8QL+IyM+i8uCwKuiGqraAyhRggmM9wkIrYIMJOfg yAiv40Eg/W1c6YRHrNNYvBuswtX8H0+AR7cxaB7dGkxfTx21zClXClXY63bKt7BVhIsK shA/wgjo//tQoJBvN0j3umtpCvj6/3mrh9k0nRHQ3/yGBwteMhT+69iUrUv5XFkrNv1z gjhezAzkQtgeAPgIrKJuX2fN9IohG2Ca4gqj8KE302Bm4GYJjjtDczeYD7b0y6p53tx1 +vTg== X-Gm-Message-State: AOJu0Yy7gNI14omQ3n2JZ6iNhPw31yc573IwSbZ4AaepeNsSKj9JeBa7 oq7uU0s/AQagPViD/1vphF6uClCiLvWrDpUg2PUaQ4wpSDjNEUTzdDnpo7bA34wfU3GMsncLJgF k/AK1 X-Gm-Gg: AZuq6aLxa0cv9JvaUEbVd/H3aO/GHjyPgFs0r4ImcxDcQYgffcI0T5N95+/RlvYRcmP ieVCHXaX7tEgKp9rYz8pWEqEPXGVFXtiuUagfZXvgNoXBXLzqFyIBDVLDye8eXsXsmo4GG8V8De QxnSnf+LOn8iYQECcLSQHNk3qCjdGKzeLACcSHadZauD+pHV3R3lPMtZoH7DyMhyAE01KxKktRU waoVxOc/56vOTC+vnII3xZ5kdU1ir1E6ksAuwfWhSIA1kzMHEWLohNEJ7NKZ5PZxTi9eLOi3fPu huwDgkMzPtX8n60lpY15AAmvJmCifOew+s1smpePehoqovYdQfpWjHPCmuE1Qzg5yppv/9FK+XK Bh2MRFQBfP1bbRpQRS6dvm7cs0Fwf2FNDZV94MyiAd2GeprkTyHTyNRwHYQDgKZgtdsOjEI4BVV OtvUmfnVxyUEBGicq4L2tUZU4KlFS+PhgAk4o5rzKPEgQ0Sw7rcQjqgvF839H5dNYx X-Received: by 2002:a17:90b:528c:b0:340:ec6f:5ac5 with SMTP id 98e67ed59e1d1-353fecc689emr5606690a91.2.1769650310654; Wed, 28 Jan 2026 17:31:50 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Ziyang Zhang , Mingyuan Xia , Pierrick Bouvier Subject: [PULL 06/20] linux-user: add plugin API to filter syscalls Date: Wed, 28 Jan 2026 17:31:20 -0800 Message-ID: <20260129013134.3956938-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650420920154100 Content-Type: text/plain; charset="utf-8" From: Ziyang Zhang This commit adds a syscall filter API to the TCG plugin API set. Plugins can register a filter callback to QEMU to decide whether to intercept a syscall, process it and bypass the QEMU syscall handler. Signed-off-by: Ziyang Zhang Co-authored-by: Mingyuan Xia Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- include/qemu/plugin-event.h | 1 + include/qemu/plugin.h | 33 +++++++++++++++++++++++--------- include/qemu/qemu-plugin.h | 32 +++++++++++++++++++++++++++++++ include/user/syscall-trace.h | 17 +++++++++++++++++ linux-user/syscall.c | 7 +++++-- plugins/api.c | 7 +++++++ plugins/core.c | 37 ++++++++++++++++++++++++++++++++++++ 7 files changed, 123 insertions(+), 11 deletions(-) diff --git a/include/qemu/plugin-event.h b/include/qemu/plugin-event.h index 1100dae2123..7f3c5927f1f 100644 --- a/include/qemu/plugin-event.h +++ b/include/qemu/plugin-event.h @@ -23,6 +23,7 @@ enum qemu_plugin_event { QEMU_PLUGIN_EV_VCPU_INTERRUPT, QEMU_PLUGIN_EV_VCPU_EXCEPTION, QEMU_PLUGIN_EV_VCPU_HOSTCALL, + QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER, QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ }; =20 diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index cea0a68858b..91df1e78d2c 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -55,15 +55,16 @@ void qemu_plugin_opt_parse(const char *optstr, QemuPlug= inList *head); int qemu_plugin_load_list(QemuPluginList *head, Error **errp); =20 union qemu_plugin_cb_sig { - qemu_plugin_simple_cb_t simple; - qemu_plugin_udata_cb_t udata; - qemu_plugin_vcpu_simple_cb_t vcpu_simple; - qemu_plugin_vcpu_udata_cb_t vcpu_udata; - qemu_plugin_vcpu_discon_cb_t vcpu_discon; - qemu_plugin_vcpu_tb_trans_cb_t vcpu_tb_trans; - qemu_plugin_vcpu_mem_cb_t vcpu_mem; - qemu_plugin_vcpu_syscall_cb_t vcpu_syscall; - qemu_plugin_vcpu_syscall_ret_cb_t vcpu_syscall_ret; + qemu_plugin_simple_cb_t simple; + qemu_plugin_udata_cb_t udata; + qemu_plugin_vcpu_simple_cb_t vcpu_simple; + qemu_plugin_vcpu_udata_cb_t vcpu_udata; + qemu_plugin_vcpu_discon_cb_t vcpu_discon; + qemu_plugin_vcpu_tb_trans_cb_t vcpu_tb_trans; + qemu_plugin_vcpu_mem_cb_t vcpu_mem; + qemu_plugin_vcpu_syscall_cb_t vcpu_syscall; + qemu_plugin_vcpu_syscall_ret_cb_t vcpu_syscall_ret; + qemu_plugin_vcpu_syscall_filter_cb_t vcpu_syscall_filter; void *generic; }; =20 @@ -169,6 +170,11 @@ qemu_plugin_vcpu_syscall(CPUState *cpu, int64_t num, u= int64_t a1, uint64_t a2, uint64_t a3, uint64_t a4, uint64_t a= 5, uint64_t a6, uint64_t a7, uint64_t a8); void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64_t num, int64_t ret); +bool +qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1, + uint64_t a2, uint64_t a3, uint64_t a4, + uint64_t a5, uint64_t a6, uint64_t a7, + uint64_t a8, uint64_t *ret); =20 void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr, uint64_t value_low, @@ -280,6 +286,15 @@ static inline void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64_t num, int64_t ret) { } =20 +static inline bool +qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1, + uint64_t a2, uint64_t a3, uint64_t a4, + uint64_t a5, uint64_t a6, uint64_t a7, + uint64_t a8, uint64_t *ret) +{ + return false; +} + static inline void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr, uint64_t value_low, uint64_t value_high, diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 60de4fdd3fa..84976fd67dd 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -798,6 +798,33 @@ typedef void uint64_t a3, uint64_t a4, uint64_t a5, uint64_t a6, uint64_t a7, uint64_t a8); =20 +/** + * typedef qemu_plugin_vcpu_syscall_filter_cb_t - vCPU syscall filter call= back + * function type + * @id: plugin id + * @vcpu_index: the executing vCPU + * @num: the syscall number + * @a1: the 1st syscall argument + * @a2: the 2nd syscall argument + * @a3: the 3rd syscall argument + * @a4: the 4th syscall argument + * @a5: the 5th syscall argument + * @a6: the 6th syscall argument + * @a7: the 7th syscall argument + * @a8: the 8th syscall argument + * @sysret: reference of the syscall return value, must set this if filter= ed + * + * Returns true if you want to filter this syscall (i.e. stop it being + * handled further), otherwise returns false. + */ +typedef bool +(*qemu_plugin_vcpu_syscall_filter_cb_t)(qemu_plugin_id_t id, + unsigned int vcpu_index, + int64_t num, uint64_t a1, uint64_t= a2, + uint64_t a3, uint64_t a4, uint64_t= a5, + uint64_t a6, uint64_t a7, uint64_t= a8, + uint64_t *sysret); + QEMU_PLUGIN_API void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_cb_t cb= ); @@ -811,6 +838,11 @@ void qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_ret_cb_t= cb); =20 +QEMU_PLUGIN_API +void +qemu_plugin_register_vcpu_syscall_filter_cb(qemu_plugin_id_t id, + qemu_plugin_vcpu_syscall_filte= r_cb_t cb); + =20 /** * qemu_plugin_insn_disas() - return disassembly string for instruction diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index 9bd7ca19c84..4ee6c4e5134 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -39,5 +39,22 @@ static inline void record_syscall_return(CPUState *cpu, = int num, abi_long ret) gdb_syscall_return(cpu, num); } =20 +static bool send_through_syscall_filters(CPUState *cpu, int num, + abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, + abi_long arg5, abi_long arg6, + abi_long arg7, abi_long arg8, + abi_long *sysret) +{ + uint64_t sysret64 =3D 0; + bool filtered =3D qemu_plugin_vcpu_syscall_filter(cpu, num, arg1, arg2, + arg3, arg4, arg5, arg6, + arg7, arg8, &sysret64); + if (filtered) { + *sysret =3D sysret64; + } + return filtered; +} + =20 #endif /* SYSCALL_TRACE_H */ diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3944004568f..c904febd9bb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -14368,8 +14368,11 @@ abi_long do_syscall(CPUArchState *cpu_env, int num= , abi_long arg1, print_syscall(cpu_env, num, arg1, arg2, arg3, arg4, arg5, arg6); } =20 - ret =3D do_syscall1(cpu_env, num, arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8); + if (!send_through_syscall_filters(cpu, num, arg1, arg2, arg3, arg4, ar= g5, + arg6, arg7, arg8, &ret)) { + ret =3D do_syscall1(cpu_env, num, arg1, arg2, arg3, arg4, + arg5, arg6, arg7, arg8); + } =20 if (unlikely(qemu_loglevel_mask(LOG_STRACE))) { print_syscall_ret(cpu_env, num, ret, arg1, arg2, diff --git a/plugins/api.c b/plugins/api.c index eac04cc1f6b..478d0c88890 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -208,6 +208,13 @@ qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_i= d_t id, plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, cb); } =20 +void +qemu_plugin_register_vcpu_syscall_filter_cb(qemu_plugin_id_t id, + qemu_plugin_vcpu_syscall_filte= r_cb_t cb) +{ + plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER, cb); +} + /* * Plugin Queries * diff --git a/plugins/core.c b/plugins/core.c index b4b783008f7..85fabf9ec81 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -564,6 +564,43 @@ void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64= _t num, int64_t ret) } } =20 +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do= not + * have type information + */ +QEMU_DISABLE_CFI +bool +qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t num, uint64_t a1, + uint64_t a2, uint64_t a3, uint64_t a4, + uint64_t a5, uint64_t a6, uint64_t a7, + uint64_t a8, uint64_t *sysret) +{ + struct qemu_plugin_cb *cb, *next; + enum qemu_plugin_event ev =3D QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER; + bool filtered =3D false; + + if (!test_bit(ev, cpu->plugin_state->event_mask)) { + return false; + } + + qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS); + + QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { + qemu_plugin_vcpu_syscall_filter_cb_t func =3D cb->f.vcpu_syscall_f= ilter; + + if (func(cb->ctx->id, cpu->cpu_index, num, a1, a2, a3, a4, + a5, a6, a7, a8, sysret)) { + filtered =3D true; + break; + } + } + + qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); + + return filtered; +} + void qemu_plugin_vcpu_idle_cb(CPUState *cpu) { /* idle and resume cb may be called before init, ignore in this case */ --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650894; cv=none; d=zohomail.com; s=zohoarc; b=Mg7JDXumM81nF2/1oZ6TED7wjMqr/YTSdsiwNqsD9Qk2ldfzY/KBYBHE1xhutWZPJWDmqYkd9Yqyowg6eSKTII3Jv0gtYt+ENwd0339OW7IzCCkO8nU02GBGyJXnah6bqlniR7xPA7neTat8U+ZktbarRffeVpyyf8v/22Hk08s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650894; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CS8cAUD1XBowpTM1qiiVbzgN4octq0VLJzHo/F3/zzM=; b=CpeGdWEEmAPUU3CQyQV+7L31cn0zA609T6xrlddGXIXELd4ywkOvUpm1yJRhDJATRtRkMdAiED3F4rIamUGoROnlI/ouTwhPtyin2VsXlXl21LRyzt+YW64YhIB7OdbKK3Shxsg4Miru+0Sd51f3SoN+nfo0JUAjFaIgLqfd3io= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650894561809.3635161875897; Wed, 28 Jan 2026 17:41:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtI-0000AB-2v; Wed, 28 Jan 2026 20:32:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt3-0008Rc-LZ for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:58 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGsz-00038J-0N for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:57 -0500 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-34c363eb612so248218a91.0 for ; Wed, 28 Jan 2026 17:31:52 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650312; x=1770255112; 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=CS8cAUD1XBowpTM1qiiVbzgN4octq0VLJzHo/F3/zzM=; b=XSHzJzwl3ubukcOQyVoG8+0e3Q4b/f2b5pDOHmmopMll3UO3kXozek5xZimVgxiLeB r397qtr2IiAs1fFLJJKZopGGndd4iGG4vpOY0z+4UtWIgFdw2PMMFLP9HOCxnASIGI0c r12XY8Hws+M6b4d25H9VfzJb/4pP+RXplX69IbVLMwMlQyct8Mt227phjkFl9I+3Gndp 5sljf3x0ATejlJci7eMD/M11CzxItARe/PIlpYdt4cYFBKP8KJsGgRQYIs0Pi7PjWKs3 dlzZCRKBbDmjNaD8b2DkQj79fp7f1KSsKHrBqrxQ4J7wc/2V6Gn0Hfvog+Gjl+q/urgl +z4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650312; x=1770255112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CS8cAUD1XBowpTM1qiiVbzgN4octq0VLJzHo/F3/zzM=; b=HrF6uDVB/XJvJdPf0zDqJeAlocPbu2nxdQT/xqlnpj2F9OfGzp4kBhBf70BHTsbhvE pNJLBdpzNMcA4CFIlRNx56YV6dI+dtwQVAbzkGaZYb2RY1v1UK6DXZCqr8tYs5LrSwsT ACndyqcw3j1w6nUFp6wFoTWbH2KzTCmRtazRncehlpc656OajYOQqI/2zlIlYbXTBInm oVvw5fzxh3sCbsC8RHcS2iOqsgdmtyjxupoKsMPGZueEYq5MdY0nduUI+RnaTuciuowR 1OPYmh6BaZSh3ObT3pLNSlmr35n6/NqrhAiZSdxlVYkkAxCdMvFYzNO5C2gVvbCDHNKB evpw== X-Gm-Message-State: AOJu0YxbO/nArwx9KJI9RiZ7CpOHTVqrQDolQnyQf1R9XRnK0WRDwp6v +DCIXrsTB08Aruj2sTJTlaUpp/yXfIZygdhUPYYZFPg/mXesWkYtRhqLsl4fqVDq/l/wmB3vA0x SK8qI X-Gm-Gg: AZuq6aIXXQ0mrUSEPLX+xSBpPNafvOATjyrxVB1v9e6bNj8gDqQn+uYynV0KgRyE47j wJxCn85Krs3PSd5a8VBtmPw70z7jDVCmZMT6P0qW05uVmU92+fgdfvepYP2ok91LHxQfx6XXUSj CMGlqj56FW5qubuM9tF4HQCqXX/KUT4ngFe9yCsYUOpxClt4+e5ll8fnDK1kG5UNOJM2Q6pVwfM 0yPyrai51XBv5v3VeKoDLXEcYwvgeRuWyN8RRyHPfikd0XVELIPyQVoz1IU9xq4UAAAhlwrEL8e /1nk5iE2Bk2qRpxAKojOo5yTzTrhCavNBM5EwqSgN5s6oAQzHQt3lyrJgqe6vn0PydYyOxtn1XB JUk4cIJ3MMBCZSuc56ccovz3Nbe6uhutYBdhRZEPdiNKhUesuR4o9dabMNOu8wOGhz7nyrJSv4l NvtvUXTVaUiaDOp6KG8qoaeRVNMUBWCfRqONH8QQPFb8trZXEUhqpSymEGFZVzbiMM X-Received: by 2002:a17:90b:1e51:b0:340:54a1:d6fe with SMTP id 98e67ed59e1d1-353fecd6218mr6443282a91.15.1769650311504; Wed, 28 Jan 2026 17:31:51 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Ziyang Zhang , Mingyuan Xia , Pierrick Bouvier Subject: [PULL 07/20] tcg tests: add a test to verify the syscall filter plugin API Date: Wed, 28 Jan 2026 17:31:21 -0800 Message-ID: <20260129013134.3956938-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1036.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650896923158500 Content-Type: text/plain; charset="utf-8" From: Ziyang Zhang Register a syscall filter callback in tests/tcg/plugins/sycall.c, returns a specific value for a magic system call number, and check it in tests/tcg/multiarch/test-plugin-syscall-filter.c. Signed-off-by: Ziyang Zhang Co-authored-by: Mingyuan Xia Reviewed-by: Pierrick Bouvier [Pierrick - Changed syscall number to 4096 to make it work with mips32] [Pierrick - Skip test when compiling without plugins enabled] Signed-off-by: Pierrick Bouvier --- .../multiarch/test-plugin-syscall-filter.c | 39 +++++++++++++++++++ tests/tcg/plugins/syscall.c | 19 +++++++++ tests/tcg/multiarch/Makefile.target | 7 +++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/multiarch/test-plugin-syscall-filter.c diff --git a/tests/tcg/multiarch/test-plugin-syscall-filter.c b/tests/tcg/m= ultiarch/test-plugin-syscall-filter.c new file mode 100644 index 00000000000..951e338a7c9 --- /dev/null +++ b/tests/tcg/multiarch/test-plugin-syscall-filter.c @@ -0,0 +1,39 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This test attempts to execute a magic syscall. The syscall test plugin + * should intercept this and return an expected value. + */ + +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ +#ifdef SKIP + return EXIT_SUCCESS; +#endif + /* + * We cannot use a very large magic syscall number, because on some IS= As, + * QEMU will treat it as an illegal instruction and trigger a critical + * exception. For instance, on arm32, the syscall number cannot exceed + * ARM_NR_BASE (0xf0000), as can be seen in + * "linux-user/arm/cpu_loop.c:cpu_loop". + * As well, some arch expect a minimum, like 4000 for mips 32 bits. + * + * Therefore, we pick 4096 because, as of now, no ISA in Linux uses th= is + * number. This is just a test case; replace this number as needed in = the + * future. + * + * The corresponding syscall filter is implemented in + * "tests/tcg/plugins/syscall.c". + */ + long ret =3D syscall(4096, 0x66CCFF); + if (ret !=3D 0xFFCC66) { + fprintf(stderr, "Error: unexpected syscall return value %ld\n", re= t); + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 42801f5c863..5658f830879 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -170,6 +170,24 @@ static void vcpu_syscall_ret(qemu_plugin_id_t id, unsi= gned int vcpu_idx, } } =20 +static bool vcpu_syscall_filter(qemu_plugin_id_t id, unsigned int vcpu_ind= ex, + int64_t num, uint64_t a1, uint64_t a2, + uint64_t a3, uint64_t a4, uint64_t a5, + uint64_t a6, uint64_t a7, uint64_t a8, + uint64_t *sysret) +{ + /* Special syscall to test the filter functionality. */ + if (num =3D=3D 4096 && a1 =3D=3D 0x66CCFF) { + *sysret =3D 0xFFCC66; + + if (!statistics) { + qemu_plugin_outs("magic syscall filtered, set magic return\n"); + } + return true; + } + return false; +} + static void print_entry(gpointer val, gpointer user_data) { SyscallStats *entry =3D (SyscallStats *) val; @@ -255,6 +273,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall); qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret); + qemu_plugin_register_vcpu_syscall_filter_cb(id, vcpu_syscall_filter); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Make= file.target index f5b4d2b8138..07d0b27bdd3 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -202,8 +202,13 @@ run-plugin-test-plugin-mem-access-with-libmem.so: \ CHECK_PLUGIN_OUTPUT_COMMAND=3D \ $(SRC_PATH)/tests/tcg/multiarch/check-plugin-output.sh \ $(QEMU) $< +run-plugin-test-plugin-syscall-filter-with-libsyscall.so: =20 -EXTRA_RUNS_WITH_PLUGIN +=3D run-plugin-test-plugin-mem-access-with-libmem.= so +EXTRA_RUNS_WITH_PLUGIN +=3D run-plugin-test-plugin-mem-access-with-libmem.= so \ + run-plugin-test-plugin-syscall-filter-with-libsyscall.so +else +# test-plugin-syscall-filter needs syscall plugin to succeed +test-plugin-syscall-filter: CFLAGS+=3D-DSKIP endif =20 # Update TESTS --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650387; cv=none; d=zohomail.com; s=zohoarc; b=J9Brp80FwqNVhXUcczBZSY59xobh85HUNTyD9eXCwHsuhouw+qM+NPmJh2DP/nLJQ3XIIEMgBGUHzp+7bbS8R+mv7Y/5eXrYsbaeOsG76kazShc/QwlUlt+9FEnrcNTN7VjO7VVZVHw8laGlFi505ruJkx1o9uUCWXIRtwz3hr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650387; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3x33sGUogc98J6/q8zrZmHmk+T7es1uYQnijvAf3eXY=; b=QIj2lzo7ADHSPLBJ7Gw9LQfO6w+5P/DBWBVcQSp5F0TxOSqr40BIspeycgYyvKggQyoMjgRbzBAvwizpKM6I6yDYeOjmRGIcmpqNcTXa+UldcK5evepcmy++qobhtsgBzKCGIIKzozi8wRA3S2oRu1Gt94/ZI3X9sFCAiPTQqQA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650387577894.9891100200277; Wed, 28 Jan 2026 17:33:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtJ-0000CB-CU; Wed, 28 Jan 2026 20:32:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt4-0008S1-R4 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt0-00038R-Rp for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:57 -0500 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-35334ea1f98so163938a91.1 for ; Wed, 28 Jan 2026 17:31:53 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650312; x=1770255112; 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=3x33sGUogc98J6/q8zrZmHmk+T7es1uYQnijvAf3eXY=; b=U7BxIe2aH53aADn0Zi0vChZUowXEFaNRXjTKXEHdiomQWIMEhYnopOOgXWao+axDxj TbO2du5b+roA0qSB5D7jaheb7ZS+srNzjxE8lcRRuWStBbT72T6DT5vBbRli3nVA2lRy GAdmjnMkNRL+6jC2j7CKhcwlRKnptkiN0WK838D+wbBNt/wNTVoMbP09Yi1hLjgMVlbZ IDqmqcHglrqxotPtSrukiEwGSxZM5t6ktY6IyQAaVPpa9PpXLHpvoSZ7ansu3sUDSM7T KcolkGcywcwldo6bQjNSf6uAsuUWM9acbmUyy35/poSqOFKis3pJtW7Jc+BZx6BTnI7C vB1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650312; x=1770255112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3x33sGUogc98J6/q8zrZmHmk+T7es1uYQnijvAf3eXY=; b=UMaNkLKwUwRO3S4xkwurdoprUDYRJbe8BsnU3yNg7EefhcbT5V0sRaFGTC5qJrzk2A ZL9Rp2TmIOf+gk3+kB9IZ4xDlPZ9ogWMeW/2NniJBJUlGmrn94HhyHizd1U3bS4OiL7J V45DvkUayy1qdROTYpKq7VULaNwkcG22LLe1fpKMCZCDq9HJLvZytKR1mpaISU9+x6QW hKUjsYbzeVawj58fiQK95XNil11H7/O1er2V5ZpAlWd8lYpR9uVmT8WK+qPac0FC+DZ0 L8r3+PhErK6clEL4f0MQxh/s6Y7BV+K1BZ+alJQ9c9rDTD/wV2tkxL8cFbcvn4Cd6dSg aFNQ== X-Gm-Message-State: AOJu0Yy1rfyXmVr0rbfZ1onq5JWWF959OMoMwwpCAgTQuiVVpEXPrymI t3796OBpGicN+KWXjBkv7yFVHayiwM+43pMZuIJTsBbC9DxnjrLGe9qXODDVpR58tOYeSH5Bw8/ qHgva X-Gm-Gg: AZuq6aLZHcQp9/y08QU9rCNYNQHefO20fdC3gGTU4n/rRwKxb7yVpUen3n+P330iLQp cM+PkHKuMibZozlTQ2287vp3jHOip5sFQ06Xi6kj1njTAfVvHZsD5XNtOVZFLrCL+gDL3yEvlve tVjBuEDWK7P6znl5mzq45rNdUm2R/uWldjG2m4NUoCVb3g5NzH9s8fZCAEXalTPLoc4aACOv4Ow DlVDKqPW+A4bOo/+Ogdx5xeeJSvri2jYgTmqg8gbGAdlTLHdnNNOQDv+XfOU5tWJH7xXHbcqaXF ADXKG8VH0UYnGgzIejCAp3Ll1+fWc6xqn5I/YQpMfUG3NW0D3Ru4qkvq+uEbQbrT6Q2owkwLofB U2405d9MQ5U0wwJ9FMiuF3DAaf6CrIfEHE014VZJCtn9Cr8qdkl6MN3jlXT/xikNT/v7nN1o6FU lBmqWjZ+DKhaPQHUHM3nUNxXuqiUPgp3uH2dSv91KYyrH8r0mEBkRAQr9aAfFpOZxP X-Received: by 2002:a17:90b:37ce:b0:34c:2db6:57a7 with SMTP id 98e67ed59e1d1-353feccb22bmr6137348a91.8.1769650312250; Wed, 28 Jan 2026 17:31:52 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Florian Hofhammer , Pierrick Bouvier Subject: [PULL 08/20] plugins: return bool from register r/w API Date: Wed, 28 Jan 2026 17:31:22 -0800 Message-ID: <20260129013134.3956938-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1029.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650389446158500 Content-Type: text/plain; charset="utf-8" From: Florian Hofhammer The qemu_plugin_{read,write} register API previously was inconsistent with regard to its docstring (where a return value of both -1 and 0 would indicate an error) and to the memory read/write APIs, which already return a boolean value to indicate success or failure. Returning the number of bytes read or written is superfluous, as the GByteArray* passed to the API functions already encodes the length. See the linked thread for more details. This patch moves from returning an int (number of bytes read/written) to returning a bool from the register read/write API, bumps the plugin API version, and adjusts plugins and tests accordingly. Link: https://lore.kernel.org/qemu-devel/60089475-3891-4448-bfe0-8dd698cd24= 35@epfl.ch/ Signed-off-by: Florian Hofhammer Reviewed-by: Pierrick Bouvier Signed-off-by: Pierrick Bouvier --- include/qemu/qemu-plugin.h | 19 +++++++++++-------- contrib/plugins/execlog.c | 14 ++++++++------ contrib/plugins/uftrace.c | 8 ++++---- plugins/api.c | 29 +++++++++++++++-------------- tests/tcg/plugins/insn.c | 4 ++-- 5 files changed, 40 insertions(+), 34 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 84976fd67dd..eb6179ab1ab 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -72,11 +72,14 @@ typedef uint64_t qemu_plugin_id_t; * - added qemu_plugin_write_memory_hwaddr * - added qemu_plugin_write_register * - added qemu_plugin_translate_vaddr + * + * version 6: + * - changed return value of qemu_plugin_{read,write}_register from int to= bool */ =20 extern QEMU_PLUGIN_EXPORT int qemu_plugin_version; =20 -#define QEMU_PLUGIN_VERSION 5 +#define QEMU_PLUGIN_VERSION 6 =20 /** * struct qemu_info_t - system information for plugins @@ -1004,12 +1007,12 @@ GArray *qemu_plugin_get_registers(void); * qemu_plugin_register_vcpu_init_cb(), except for callbacks registered wi= th * qemu_plugin_register_atexit_cb() and qemu_plugin_register_flush_cb(). * - * Returns the size of the read register. The content of @buf is in target= byte - * order. On failure returns -1. + * Returns true on success, false on failure. The content of @buf is in ta= rget + * byte order. */ QEMU_PLUGIN_API -int qemu_plugin_read_register(struct qemu_plugin_register *handle, - GByteArray *buf); +bool qemu_plugin_read_register(struct qemu_plugin_register *handle, + GByteArray *buf); =20 /** * qemu_plugin_write_register() - write register for current vCPU @@ -1029,11 +1032,11 @@ int qemu_plugin_read_register(struct qemu_plugin_re= gister *handle, * Attempting to write a register with @buf smaller than the register size * will result in a crash or other undesired behavior. * - * Returns the number of bytes written. On failure returns 0. + * Returns true on sucess, false on failure. */ QEMU_PLUGIN_API -int qemu_plugin_write_register(struct qemu_plugin_register *handle, - GByteArray *buf); +bool qemu_plugin_write_register(struct qemu_plugin_register *handle, + GByteArray *buf); =20 /** * qemu_plugin_read_memory_vaddr() - read from memory using a virtual addr= ess diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 811f3203199..d00d9c4ff39 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -91,11 +91,13 @@ static void insn_check_regs(CPU *cpu) { for (int n =3D 0; n < cpu->registers->len; n++) { Register *reg =3D cpu->registers->pdata[n]; - int sz; + bool success =3D false; + int sz =3D 0; =20 g_byte_array_set_size(reg->new, 0); - sz =3D qemu_plugin_read_register(reg->handle, reg->new); - g_assert(sz > 0); + success =3D qemu_plugin_read_register(reg->handle, reg->new); + g_assert(success); + sz =3D reg->new->len; g_assert(sz =3D=3D reg->last->len); =20 if (memcmp(reg->last->data, reg->new->data, sz)) { @@ -303,7 +305,7 @@ static Register *init_vcpu_register(qemu_plugin_reg_des= criptor *desc) { Register *reg =3D g_new0(Register, 1); g_autofree gchar *lower =3D g_utf8_strdown(desc->name, -1); - int r; + bool success =3D false; =20 reg->handle =3D desc->handle; reg->name =3D g_intern_string(lower); @@ -311,8 +313,8 @@ static Register *init_vcpu_register(qemu_plugin_reg_des= criptor *desc) reg->new =3D g_byte_array_new(); =20 /* read the initial value */ - r =3D qemu_plugin_read_register(reg->handle, reg->last); - g_assert(r > 0); + success =3D qemu_plugin_read_register(reg->handle, reg->last); + g_assert(success); return reg; } =20 diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index b7d6124d2f5..a7e21b5b87a 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -403,8 +403,8 @@ static uint64_t cpu_read_register64(Cpu *cpu, struct qe= mu_plugin_register *reg) { GByteArray *buf =3D cpu->buf; g_byte_array_set_size(buf, 0); - size_t sz =3D qemu_plugin_read_register(reg, buf); - g_assert(sz =3D=3D 8); + bool success =3D qemu_plugin_read_register(reg, buf); + g_assert(success); g_assert(buf->len =3D=3D 8); return *((uint64_t *) buf->data); } @@ -413,8 +413,8 @@ static uint32_t cpu_read_register32(Cpu *cpu, struct qe= mu_plugin_register *reg) { GByteArray *buf =3D cpu->buf; g_byte_array_set_size(buf, 0); - size_t sz =3D qemu_plugin_read_register(reg, buf); - g_assert(sz =3D=3D 4); + bool success =3D qemu_plugin_read_register(reg, buf); + g_assert(success); g_assert(buf->len =3D=3D 4); return *((uint32_t *) buf->data); } diff --git a/plugins/api.c b/plugins/api.c index 478d0c88890..04ca7da7f18 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -441,27 +441,28 @@ GArray *qemu_plugin_get_registers(void) return create_register_handles(regs); } =20 -int qemu_plugin_read_register(struct qemu_plugin_register *reg, GByteArray= *buf) -{ - g_assert(current_cpu); - - if (qemu_plugin_get_cb_flags() =3D=3D QEMU_PLUGIN_CB_NO_REGS) { - return -1; - } - - return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT(reg) - 1); -} - -int qemu_plugin_write_register(struct qemu_plugin_register *reg, +bool qemu_plugin_read_register(struct qemu_plugin_register *reg, GByteArray *buf) { g_assert(current_cpu); =20 + if (qemu_plugin_get_cb_flags() =3D=3D QEMU_PLUGIN_CB_NO_REGS) { + return false; + } + + return (gdb_read_register(current_cpu, buf, GPOINTER_TO_INT(reg) - 1) = > 0); +} + +bool qemu_plugin_write_register(struct qemu_plugin_register *reg, + GByteArray *buf) +{ + g_assert(current_cpu); + if (buf->len =3D=3D 0 || qemu_plugin_get_cb_flags() !=3D QEMU_PLUGIN_C= B_RW_REGS) { - return -1; + return false; } =20 - return gdb_write_register(current_cpu, buf->data, GPOINTER_TO_INT(reg)= - 1); + return (gdb_write_register(current_cpu, buf->data, GPOINTER_TO_INT(reg= ) - 1) > 0); } =20 bool qemu_plugin_read_memory_vaddr(uint64_t addr, GByteArray *data, size_t= len) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index 0c723cb9ed8..e6c5207cd69 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -93,8 +93,8 @@ static void vcpu_init(qemu_plugin_id_t id, unsigned int v= cpu_index) for (int i =3D 0; i < reg_list->len; i++) { qemu_plugin_reg_descriptor *rd =3D &g_array_index( reg_list, qemu_plugin_reg_descriptor, i); - int count =3D qemu_plugin_read_register(rd->handle, reg_value); - g_assert(count > 0); + bool success =3D qemu_plugin_read_register(rd->handle, reg_val= ue); + g_assert(success); } } } --=20 2.47.3 From nobody Mon Feb 9 20:47:10 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650855; cv=none; d=zohomail.com; s=zohoarc; b=OdJGPDm/eihbJE1SwYTeUkgRoLLkNyqqlsD8RWeI/86t+omyeOHDk1mqgdsF9YzODkIX/Eco8fd/zulbiXlxUG1bfEoagDzbrA0MMONBl3wDKKFUGQVrKmfVbSzNzUlI25cZ2v9jTg/KnTMK1pJzgcGZhNFOQxFMXVOO5qe1jPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650855; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=rrBMb4pzsR09kFtei/WUANIUl/9qDP19I1CZ/cFKqvE=; b=Mw30So4sDhBqBgjN84C4MJb83x+aKnRTIWgDn3ibqjJKLYHJZTcgWKJGVM36TOGX0FEAngu4NsGHIPGKMjhCoxNIpoPudhIQtGyv7voXwrjIJCCqXn33G7/UhR50izIkJawig74/ePHXSSaEF3bEuYG+ebfZDrQTrEF7gMQXzgo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650855716688.6211089257998; Wed, 28 Jan 2026 17:40:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtG-00008Z-VF; Wed, 28 Jan 2026 20:32:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt3-0008Rb-LF for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:58 -0500 Received: from mail-pg1-x52e.google.com ([2607:f8b0: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 1vlGt0-00038V-S0 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:56 -0500 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-c6541e35fc0so220281a12.3 for ; Wed, 28 Jan 2026 17:31:54 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650313; x=1770255113; 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=rrBMb4pzsR09kFtei/WUANIUl/9qDP19I1CZ/cFKqvE=; b=ZeszBksTqWrWtBFrfnyCmsxukM0ei6lE5S+70X6i8e36emgTeMvV+nAEIlvjKDiWlf yFzUwvagMYqW5rD98TqE4eTvKjVBtDJoz/eSRAumYHr4FBRZLozEql+NqqOlx05Rtd6N tqBul3znYkHAUu4CX89hUb62raSsNa9Buw7RYp+dR3/5c7kjUA+sYnLiSuTWYrUdkW0X I3W4N0ynWaRSd8dUjdffBc9wscMKOvD8PlkvrQJ+UIMOBenQjNuEHvBbbYOwe1ksNCBW t41EDb/2ekltahTiwKsIn7YzSyzh/eeCuHm6T8V+va5UQv493//0jex1YE2eGNUB9fGU +2BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650313; x=1770255113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rrBMb4pzsR09kFtei/WUANIUl/9qDP19I1CZ/cFKqvE=; b=GYcy8PKtFX9Li3lHCsF+nEcnAUSr4zZqw2uAXjiEfwtzT8+Uv305Uta1QJZ6J7+lVE Blp+qHEK6fE3W/MC2xPMrGz3jwbaBs3AMMguwsD5GZyibYoLhkkQspKrT1XgcEr0YaTC RWnIDGPWdrrRAEgYRLn46FNTTBPjaHaHRv9vNAADj9C/V/peFgfV3Ltn829y2Zh3bdGq eVSR6iFWZryaNq5z6hC4WNajcZqpM3KUyE7vrkAI8tAKTKgDMPDTPbjW58g+WC4aVXPg B9h/chehq6QWlPaDAaldxcOoqfpiWgiPLt86+8b7kTTyvTihlNdDeFfc18bdL+hZ46a6 EJPA== X-Gm-Message-State: AOJu0Yzmm+Ux2YKYlGvU704/rhHYydQmwlIKKfpCT/PwuG8dDHcYy5wy VMRkpXhUgDLcj0vc2hi6L0OHR1sgZUMnaFzEMRuhaJgmz5+nDIX1m/CZRbpE5tYXE6VIJ1ODNcn VDFxS X-Gm-Gg: AZuq6aJUYCSuiOfPKWv3MWh7VV/Ko5iYkFE/WfcqYL0E8uB3HtR0VJg9+HGMADlEhds CFWovhjIc5VLhPzuejk5Z4hhEiGKhPJMkgXX223ZW31IZ8iEhtJN4QbTW1WR29Zbx+Q4rMkGvkI lP7ws1cD+9+f7f+Mib7cQ01PF+3eTKJWQtW6v7Fl3DUy/PkYYWko2Rccd0dTcAJEzcbsSpTR/Uw 2TCz8XODVSYMKtx0sp/52h/RL25TeXPRqCFB9xNSOumF0doSuXsOonHG9Qf+Wu36NdPhiWf6ror kPgUEbsZS8eIGkMq0bdGUSfS5SN6GoneSuOfTVeOO1gzESfmsrbLrofWqy1fRwwavqxwqsVqBX7 o/I72SBeVGbr86aPipofEms+LlQtvlOJhX5I25LzZEbjm213piEl8vAQFZbjU3jXTibTu9oMZMu NLynnIBqrISLAHtV9uEY0t5ZZjUcSBsZji/72dlGO8QNwAclft3JhkTqBRgjVFmMHR X-Received: by 2002:a17:90b:3c11:b0:32b:65e6:ec48 with SMTP id 98e67ed59e1d1-353feccd236mr6318619a91.8.1769650312956; Wed, 28 Jan 2026 17:31:52 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , Manos Pitsidianakis Subject: [PULL 09/20] plugins: move win32_linker.c file to plugins directory Date: Wed, 28 Jan 2026 17:31:23 -0800 Message-ID: <20260129013134.3956938-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650858262154100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- {contrib/plugins =3D> plugins}/win32_linker.c | 0 contrib/plugins/meson.build | 2 +- tests/tcg/plugins/meson.build | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename {contrib/plugins =3D> plugins}/win32_linker.c (100%) diff --git a/contrib/plugins/win32_linker.c b/plugins/win32_linker.c similarity index 100% rename from contrib/plugins/win32_linker.c rename to plugins/win32_linker.c diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index eb944b5159a..6f72b2ce0c9 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -10,7 +10,7 @@ t =3D [] if get_option('plugins') foreach i : contrib_plugins if host_os =3D=3D 'windows' - t +=3D shared_module(i, files(i + '.c') + 'win32_linker.c', + t +=3D shared_module(i, files(i + '.c') + '../../plugins/win32_linke= r.c', include_directories: '../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], link_args: win32_qemu_plugin_api_link_flags, diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index 561584159eb..a6e78438510 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -2,7 +2,7 @@ t =3D [] if get_option('plugins') foreach i : ['bb', 'discons', 'empty', 'inline', 'insn', 'mem', 'reset',= 'syscall', 'patch'] if host_os =3D=3D 'windows' - t +=3D shared_module(i, files(i + '.c') + '../../../contrib/plugins/= win32_linker.c', + t +=3D shared_module(i, files(i + '.c') + '../../../plugins/win32_li= nker.c', include_directories: '../../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], link_args: win32_qemu_plugin_api_link_flags, --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650832; cv=none; d=zohomail.com; s=zohoarc; b=MdZY5I3V3zBjeElkCUI1JLDaE1CEhZ3UUmlJUcT5fYQeEkpDiYD5jtW4UWYdabLIDedzddVigHhc/hph6bxrGnu/tOTVm+oDTEmVZxHBJAXXJgMpjLpoZ5/BwZa0ye7Itrphh7fG0QG1ff7XOpByS2nSlmRGxiOucWinhPe9ZLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650832; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n+mWfTnpB5o+zVj5uCi6MAntCWjxW6HfhlX1b6nQ+XU=; b=HbV2QrYB1N9fR+RVChasXTM8HLdki/ToLJnaDlda8GyjIP9Yunr4TXesbowz6JLCPSrVvJ34VY3YcoleuqPrK1+Wc76Jp5/X7jO+hIfa9uW3Jey0YEabhghFHEzdARSIWygcty/KiA15roP2VF/SJTxXj+wP4zvNb5V5XZAzBHQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650832803207.09238312424338; Wed, 28 Jan 2026 17:40:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtI-0000Bb-Op; Wed, 28 Jan 2026 20:32:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt4-0008S5-Vw for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt1-00038d-B3 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:58 -0500 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-352f00d0e83so170139a91.2 for ; Wed, 28 Jan 2026 17:31:54 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650314; x=1770255114; 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=n+mWfTnpB5o+zVj5uCi6MAntCWjxW6HfhlX1b6nQ+XU=; b=p5EWEiG8Hylf8mq8GqqdVCgaJiNrFNxgnHuPWkwPfqDMIFZernP2R8iO2rwv5YmArJ QukJvrotXcvjH8JbGg4STDQme4jNVzbwQQxxOMJRSYvdPSe9bbHiSUFybb75GmEUxU/r ofUMH1knUBEJRc2adhxW3K4zGfuwFPEbLOslDXMd9+MtH7AthOF7+Au+xqGVk7Gy8Nsb B3yvRmxsVJsa4Om3MrCFOY5N84I/dTy4LhU0MavS7BpEDm4gOngST5zpK1JL2XNdT1hp FKal0QbqxTxzjD219gd8yN6DnkEiLo+96Mn/DQLyEMgDw8dzM3DCW9NTcHtVyX7AGQNo NJlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650314; x=1770255114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=n+mWfTnpB5o+zVj5uCi6MAntCWjxW6HfhlX1b6nQ+XU=; b=WdRMgg4o8KaKVXZM6CmdhOvndjsrR6rmN+JSEMZBxppWMCXDdByMXp7OQ/hYa3ppjU 0ZGgAI2R5ZEagMYfycgsZBUlDSbVwrM/oRGbBdtMpJWNT5KNRCdMwnKHh8hGHjl+0odL JIh0gb3DXF9A/+pPBTgOyn0FBGDjn6dHwt07LSmzQTpIVCNmE0EEtJxWoZ4Eph+5PM3H xw4HNHQXItRK95BRZ777GCBXYdMgXuHBdfftRxyWE1vfJg2ld+i7qalMUj77zvofUMby 9+NnIajsEtcU0a0VUOJXzWs3/+cEkSJQEyvOQMWhty9N1+N7TccOVGqGlKXXqOAtG98C /ceg== X-Gm-Message-State: AOJu0Yz8Am6dJKY+rJV795kG5tHfR6fNulWUXjHBLzJJ1PZaQEtUJKEy N1e7iQn2mVuZU787kO/S6aUyFqDh4ShtII1yd/W+Tz+ps8PqBG/GNCynsCEOdFb1YJ4GF8NEa/Q ekFN7 X-Gm-Gg: AZuq6aI32YFlTyKNWlNKKlUMSY1YpYwp2QJkXvyJJpXYR2mhVBDu5H/tfjaPVA1QKpV I7c/TqTGStPHUnA19NIgJq8UdxRI3qEOiM9StjQ3uVTYc/wx8YkQ87p7o3b466XXiQDIFgZ5auL DM2i+u7ty6923oEz2rU+iUM4kF290EfDs5Y2YKhQt2Xpv+IOg1CeYucbW0woXgm8eHRVa22ML2L SdQDF1QrId4UiudzI6ZMFK4Gq6T8Zn/TJHVPMsqAHniMcVlKPxcHAn7PCbQ2f5woH+TOoxctOdL YAnjCIzsiSenOCFRBp8LzrzcfrxJqVgsyEzOkJvUwK5vSYBDfc2cBGSL5wpEzYh3wXhBzhfIUaY TeJRB3u6F1N4HsfxwZsc09ZP+nTPv8rkgEdJWM59R1zj5pHM/c2PSq7oEegsdzP4snGkeCPXFv2 5WB6VzxAMY92hN66rTAVgVJeC1+bUbVrKEVY6sFkUtk7GaiIJAX3wIvZvnBuFr5VG/ X-Received: by 2002:a17:90b:538f:b0:34c:6108:bf32 with SMTP id 98e67ed59e1d1-353fedb94b1mr6300207a91.34.1769650313708; Wed, 28 Jan 2026 17:31:53 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 10/20] plugins: factorize plugin dependencies and library details Date: Wed, 28 Jan 2026 17:31:24 -0800 Message-ID: <20260129013134.3956938-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1032.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650834239158500 Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Pierrick Bouvier --- meson.build | 2 +- contrib/plugins/meson.build | 13 ++----------- plugins/meson.build | 15 ++++++++++++++- tests/tcg/plugins/meson.build | 13 ++----------- 4 files changed, 19 insertions(+), 24 deletions(-) diff --git a/meson.build b/meson.build index 668f1aa919c..402028bb79e 100644 --- a/meson.build +++ b/meson.build @@ -4449,7 +4449,7 @@ if get_option('plugins') if host_os =3D=3D 'windows' # On windows, we want to deliver the qemu_plugin_api.lib file in the q= emu installer, # so that plugin authors can compile against it. - install_data(win32_qemu_plugin_api_lib, install_dir: 'lib') + install_data(win32_qemu_plugin_api, install_dir: 'lib') endif endif =20 diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 6f72b2ce0c9..6915ffa5fbc 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -9,17 +9,8 @@ endif t =3D [] if get_option('plugins') foreach i : contrib_plugins - if host_os =3D=3D 'windows' - t +=3D shared_module(i, files(i + '.c') + '../../plugins/win32_linke= r.c', - include_directories: '../../include/qemu', - link_depends: [win32_qemu_plugin_api_lib], - link_args: win32_qemu_plugin_api_link_flags, - dependencies: glib) - else - t +=3D shared_module(i, files(i + '.c'), - include_directories: '../../include/qemu', - dependencies: glib) - endif + t +=3D shared_module(i, files(i + '.c'), + dependencies: plugins_deps) endforeach endif if t.length() > 0 diff --git a/plugins/meson.build b/plugins/meson.build index 62c991d87fc..4318e3a1671 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -51,11 +51,24 @@ if host_os =3D=3D 'windows' dlltool_cmd =3D [dlltool, '--input-def', '@INPUT@', '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe= '] endif - win32_qemu_plugin_api_lib =3D configure_file( + win32_qemu_plugin_api =3D configure_file( input: win32_plugin_def, output: 'libqemu_plugin_api.a', command: dlltool_cmd ) + win32_qemu_plugin_api_lib =3D static_library('win32_qemu_plugin_api', + link_depends: win32_qemu_plug= in_api) +endif + +if host_os =3D=3D 'windows' + plugins_deps =3D declare_dependency(sources: [files('win32_linker.c')], + include_directories: '../include/qemu', + link_with: win32_qemu_plugin_api_lib, + link_args: win32_qemu_plugin_api_link_= flags, + dependencies: glib) +else + plugins_deps =3D declare_dependency(include_directories: '../include/qem= u', + dependencies: glib) endif =20 user_ss.add(files('user.c', 'api-user.c')) diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index a6e78438510..d7823704616 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -1,17 +1,8 @@ t =3D [] if get_option('plugins') foreach i : ['bb', 'discons', 'empty', 'inline', 'insn', 'mem', 'reset',= 'syscall', 'patch'] - if host_os =3D=3D 'windows' - t +=3D shared_module(i, files(i + '.c') + '../../../plugins/win32_li= nker.c', - include_directories: '../../../include/qemu', - link_depends: [win32_qemu_plugin_api_lib], - link_args: win32_qemu_plugin_api_link_flags, - dependencies: glib) - else - t +=3D shared_module(i, files(i + '.c'), - include_directories: '../../../include/qemu', - dependencies: glib) - endif + t +=3D shared_module(i, files(i + '.c'), + dependencies: plugins_deps) endforeach endif if t.length() > 0 --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650918; cv=none; d=zohomail.com; s=zohoarc; b=Tt+eDuKdWaoK+Ob3D0WvZwCqzb1fFH2JLzpois3jJ/2ddE7ABV3wEkrROInAU35MfcDv4MxmoM8p98DnVYB37lyWjvxF//PICUsF6+UT6AHAsy7E6yY88h28NBgbdBfpu7E2KW57H6KZUpgq75YYvcij65G6SMV6e7c3hTrMq9E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650918; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZEmhWV50Bdw75mIkmSTg87b5KWsClkrsHwxNSDCjPXY=; b=ZJXRKLsn1UL8biiSFJfsru76d0JdbEkO6dMF8uuby3x2QxZ7rvuoA73k5NntlWge3EEBk5U3bgVfH6xtK0saoumXlSShhwPh5TCt4Icr8SNXZZt7vONVjlXlyB3DbsJMClZeEYsHOz8o26cJP1XWtQ2jQvEfYfXqXjkiO1s6Nak= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176965091879323.422729557188745; Wed, 28 Jan 2026 17:41:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtG-00007h-Gz; Wed, 28 Jan 2026 20:32:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt4-0008S6-WE for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt2-00038p-MY for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:58 -0500 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-34ccbf37205so171385a91.2 for ; Wed, 28 Jan 2026 17:31:55 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650314; x=1770255114; 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=ZEmhWV50Bdw75mIkmSTg87b5KWsClkrsHwxNSDCjPXY=; b=x6kWX55Tk5S5yd+GoY4i9fPB1r0ooi8yWiLF2ojSYHKOk7nwLbjyrIVncqvp7j8td6 4v+ag5/Zzh1LH+XM5BvXj9T1bdCM+ociyDIE2ouFw2mGg+kkG+3VX3EELlAGlN2dtdON gwZFDFCfOgvJMtkSLlcLQAEQSnjHENsxfTUVvRWk6ZadigeAevCxdzAAV8wizZtzhmQn 1a2g4SNSTNheTZevUlOJR908fs/IgIQUj8UoemUFAUHs5bHPx4Ewhl6m8Q3XsPEtS3yD Q/gXQrGOUdTVY3fK0TcNddW1iRZYjXyC/Rrj4fbdo4hws3Nu+M7Z4YERdc2SpS4ol7+r PX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650314; x=1770255114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZEmhWV50Bdw75mIkmSTg87b5KWsClkrsHwxNSDCjPXY=; b=UFA6rpPEPB1FYBBXq0P8nrPmSuUMzmdg43N7r5fI0fX9I326iHh9gDtD9fOgeEsNHC nEvBTPrWAniObPWsWkB+biOSzdjcq3A3GWICkvB0PYzenZkAplDp6dWDYNa1SczuFa4q CGxee9a4TPcmi5/741droD6j/Ab8gbwCOPpABvmZRX2cdsvEDjzu0BFus0OExZFsi9jE sSymJ64howxEwCG2mHyP94C2Bs4H2ng0iBLUKEXZVo4atGRfFl/iENvRNZ4AmviGnSbe sS0FxaHJHqYDQghUexeS/kiPYejW3HdesMQsrVgLswwbTvIrVLlObhUCIv1hpGmpotAQ NEdg== X-Gm-Message-State: AOJu0YwBTPNudYLfCGtropTXWrGX8iHCd5rgXkCldSJjwlERIW6CB0vB nzw5/UPHV/rREkbISgJToqSBulM1BpZDso0Px/gsf4A6JwnXrtWRdTNiYbGywX/3PUQIV4+T++U atMbF X-Gm-Gg: AZuq6aKyfyW5VSRlgwmyyA726wlyyWLMZ3ZLxpu7Gh1FfYAytyB9BBVl2JUQXxgpi5U HUidYSg1SzHuy2dEFWNqo9X9j8UfBmvOMyq1sn56gFj+1DBlsjaU4C+BNJ5Z4wD1Jp3V5lgBTcZ EaT1eiaKOrxjBBrXHmqFIkbtSM46NNkrOwEPiVwHG5X0gc2FSpuAqcg2GmVa4Z68fZEZcmxdN2Q r+dqG467irGFg3HT+oNSFkCGxliszxUnWhDiOFHi4VZFUpTzkPu4bLZm99vs+GTLdebCocipbBx yhbkuv6/shsayvevGsJ+acuOw1wbRWvvJtEhcaI1I7CVJ14hu2wQxb4g7SGR8UDWIV8T1a4x/HO lb5ytYE6E2jeSxD14OkQf8iNoOU4GUf3v/nb26ruZ8yypP0zsGNKN4ngq1Ex4VoBwxyNNnuDSek wdypLSdOViAnEakSXu6WRgH+fCsyMv4D5XKg/yQLryEl2XSxDdVKfi++g861lUsyen X-Received: by 2002:a17:90b:3b8a:b0:34f:454f:69a9 with SMTP id 98e67ed59e1d1-353fed87a9dmr5518654a91.28.1769650314407; Wed, 28 Jan 2026 17:31:54 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PULL 11/20] plugins: use complete filename for defining plugins sources Date: Wed, 28 Jan 2026 17:31:25 -0800 Message-ID: <20260129013134.3956938-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102e.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650920390158500 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/meson.build | 10 +++++----- tests/tcg/plugins/meson.build | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 6915ffa5fbc..3d2d7862e0c 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -1,15 +1,15 @@ -contrib_plugins =3D ['bbv', 'cache', 'cflow', 'drcov', 'execlog', 'hotbloc= ks', - 'hotpages', 'howvec', 'hwprofile', 'ips', 'stoptrigger', - 'traps', 'uftrace'] +contrib_plugins =3D ['bbv.c', 'cache.c', 'cflow.c', 'drcov.c', 'execlog.c', + 'hotblocks.c', 'hotpages.c', 'howvec.c', 'hwprofile.c', + 'ips.c', 'stoptrigger.c', 'traps.c', 'uftrace.c'] if host_os !=3D 'windows' # lockstep uses socket.h - contrib_plugins +=3D 'lockstep' + contrib_plugins +=3D 'lockstep.c' endif =20 t =3D [] if get_option('plugins') foreach i : contrib_plugins - t +=3D shared_module(i, files(i + '.c'), + t +=3D shared_module(fs.stem(i), files(i), dependencies: plugins_deps) endforeach endif diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index d7823704616..303f97f9679 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -1,7 +1,10 @@ +test_plugins =3D ['bb.c', 'discons.c', 'empty.c', 'inline.c', 'insn.c', 'm= em.c', + 'reset.c', 'syscall.c', 'patch.c'] + t =3D [] if get_option('plugins') - foreach i : ['bb', 'discons', 'empty', 'inline', 'insn', 'mem', 'reset',= 'syscall', 'patch'] - t +=3D shared_module(i, files(i + '.c'), + foreach i : test_plugins + t +=3D shared_module(fs.stem(i), files(i), dependencies: plugins_deps) endforeach endif --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650385; cv=none; d=zohomail.com; s=zohoarc; b=R1MrOtBicuwDJmHFAlPhVQepOQIEq51MNje8wAyEyz89FmwGAbitrcbHnW4VERS9fjSkjNmRIRW4qVsOlR6js09GqtxyK/UzVSFeAQqL2rd1btUURIyKBxbMWduLDoDW4GdpzRJ0B2S52a6GnubFnLD4KVPPshTpSO+XIFuKMI0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650385; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OH3PLjNDO92jjJzSdzMO4KAOeEUQIYziGK0Y9gQ2+fU=; b=LFmLjtmJcI49DdnI6PqnBWcNq2jhjd54VbwhVL2CTKXWRQNveu0kxcckN98VwuBJ5nlxxxwgqraZ9GV93XcWVo9rRmUONUReKHvApB5oWVpAIBx1t4bHyiJ3eA/cKF4HYpCcXL2riznayoZehUv4mlxevbWyLsA9EvfNeG+LzsU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650385773319.6205138660372; Wed, 28 Jan 2026 17:33:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtL-0000E8-Dg; Wed, 28 Jan 2026 20:32:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt5-0008SF-RF for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt3-00038u-Dy for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:31:59 -0500 Received: by mail-pj1-x1042.google.com with SMTP id 98e67ed59e1d1-34c868b197eso271626a91.2 for ; Wed, 28 Jan 2026 17:31:56 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650315; x=1770255115; 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=OH3PLjNDO92jjJzSdzMO4KAOeEUQIYziGK0Y9gQ2+fU=; b=f3Rpv77z9FrupjYLk6VLZgi4UoPwUSMrtHTY5TCvXhwgJpJ8vtDS9zc99pLTOPFeqC mP4eFu6RSjXZtynnL5kym+C9CD5x7T22BPd6hkkabNQjXnMHKMf+vSDhW5OPYYMmIXeG TfSwOBgx7l6bhBMpHg3QcGA2T5Uq14zn1ZI9Bw5XE3xwlcy8mV3oLsCzMGL+RyjIFdTH /awRYhUXcvK+XSt09WI0JYqtxhtASkNFXk+BJrIktCVbHd65M9FtRwJhq4QF130I6bLg mfkjXidI+A9vE71+4QKRYQVLziy9m61kYgI/9YACPZfLnkR/ZT7uS5YqOfyQrdPVnsei tIDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650315; x=1770255115; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OH3PLjNDO92jjJzSdzMO4KAOeEUQIYziGK0Y9gQ2+fU=; b=BAu6/SOyd+HkQeLsG513Yqrw5j4N5rhDn2xEipL6wC0u/lwC9nSgz7JXiQtDaTJ7AJ DmpOZkHp9VsrDcYZSIt3pYCxdZUxGu3pw+3D8utX917+ss/G3o+Q9ozLlFV/Ahzo4aqW tb0LqChaOjS7ACZH/46UtBI7Wf7X2hA8P8pS39WcEiQmYZFoxABDb2YF2qr44B0rWuxg s8OGyZgb80aJRws+kdTkXIL2+Kd5Y+T9KpU/sk0J6XTtSdJqGBM7dsIyBbc1cTLfxDgZ Paxt5xrhcl5ODbGwpzLWi8aqg9QwaRMEkAYFpC1n+R3/7aGTydIubxXj1gnBIYcAUn7n L+Dw== X-Gm-Message-State: AOJu0YyYz0txZrp35Ga0JBXlUhgRG9SkK2ErhzQwRNFioSR/aCs/Yju0 HwUosHC8kQVpOZFpPGICAx87NJ3CWyYQksm0Mrg8mxfrVKQG0jclsp+lM4JZ7XmKgbHBUBmGInU a+XgFkzw= X-Gm-Gg: AZuq6aJuoxYlPXGvXjnroke7IB6BWFYKi4ymA9xgPlBJN5Vnx8P2oZu5zQqbPVoQwkP gDHBsCbm6QyhS//0qviygZACDFZIDzheS7dWFQMNeSK8Mg6wzwjgMyCID/wKa5oZBk1bx45nSxA K+Z1mTgVSE0ndGkUL6d8zkzKqVaperqe0zUI5mImGnf7odP/ahRVwdAjQYs7JacsoEb86eLAbI/ qVVUccxPOFO3hdRZXiqX89gKdu9SntKTo3NKcXQz+rdl2VDLSLsfdsvn+9MOb24lRW2na3Zd42v ERmm7E5momv+VAQ4ddJy8zE+Bv2iUwqyWUoRtqktP26Bb0cnAciIyQqLNLvzA4Xy2XpFl3JobGU Kdw4M0IuOMFlDEGDwShXz0huhXI9mrV1unrpD3+4qmj8CsQSVcuR9P/Lnh0cimmYglGwGuuoqvi xjljFjmym6DIalpmPuj+hN/NlkgAKpEryUGYWCVn6iNfLWzVtk4+izesxa4rBUZ5f9 X-Received: by 2002:a17:90a:c2cb:b0:352:e796:bb65 with SMTP id 98e67ed59e1d1-353fedae2efmr5901021a91.31.1769650315104; Wed, 28 Jan 2026 17:31:55 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 12/20] plugins: define plugin API symbols as extern "C" when compiling in C++ Date: Wed, 28 Jan 2026 17:31:26 -0800 Message-ID: <20260129013134.3956938-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1042.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650388025154100 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- include/qemu/qemu-plugin.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index eb6179ab1ab..7f449d1b50a 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -16,6 +16,10 @@ #include #include =20 +#ifdef __cplusplus +extern "C" { +#endif + /* * For best performance, build the plugin with -fvisibility=3Dhidden so th= at * QEMU_PLUGIN_LOCAL is implicit. Then, just mark qemu_plugin_install with @@ -1245,4 +1249,8 @@ void qemu_plugin_u64_set(qemu_plugin_u64 entry, unsig= ned int vcpu_index, QEMU_PLUGIN_API uint64_t qemu_plugin_u64_sum(qemu_plugin_u64 entry); =20 +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* QEMU_QEMU_PLUGIN_H */ --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650877; cv=none; d=zohomail.com; s=zohoarc; b=L7uPBFOKgAY9h/dyDmR/22uuW/F/nQkQkjS4O/O0FWeMOflAp9koU5+gvDfoRDDaGpTlG7ye2HVfZVOpie3xFcGm4CB1+A4OP3jAATwXpauCsjHaPbWij0iryifCx+isxi4JT+TwN8bYfxhIDTmUttohasJ9oQXuTy2oom7By3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650877; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yGgLGlFAGuY8onq4gi0buc3E93WA2jrqRIHzedx5bAc=; b=OF5s3tWqmbw/2YCVmwxpSKKAUcHgYORCoRmeCkDsl+jsjtltB2LbLHoyy/jc+hS5FPniyFjArht7tWIN42nXiIJEgop4UDWJ+0+I6jJdRHOUoT7hAbB+WJQ+7fFTGR5kp5y8ceCpwgIf3LnVHznIuVqPT1hz/vU6TaZCz3pZV5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650877474730.270468824845; Wed, 28 Jan 2026 17:41:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtI-0000AE-2X; Wed, 28 Jan 2026 20:32:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt6-0008Sj-KY for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt3-000397-E8 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-bc274b8b15bso246848a12.1 for ; Wed, 28 Jan 2026 17:31:56 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650316; x=1770255116; 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=yGgLGlFAGuY8onq4gi0buc3E93WA2jrqRIHzedx5bAc=; b=AV9hH9kUMpXAxD/2wp6Mh9VPTkuRiZui+Sbr4JLE35wvpJjT4b/NGhIvB3L/kvmiS8 2lLI3/BoaRd2N9iEr2y6b6tiUbM5sHXGwGuh1Fvq02uuP1agrVg0GaoE8976YWC45pSi 2NM5JcnIxMSZE4j4McM8iMnHWJU0K6y72yQUvc/8ShE2iKhYWtAb4ZsunvihuHNKvw9y 8IHOXBX/OcwAKcBfGA4TBQBOh/gUZdUKhSx+JZBHw9W7jOn1DxdUBDTFsBWxQ9AqEFFr 9xt/m/1kPwqDR6JeG3D/uTIn+SzB3xi060oDf+etMC9EK4/yETzpaCNtC/3WGnw8BYrU bP8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650316; x=1770255116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=yGgLGlFAGuY8onq4gi0buc3E93WA2jrqRIHzedx5bAc=; b=ZMi8Gld7BKa97Rkx8RpI43KPjbhoxRUnRTtAzdIODUkNamtm9MpGMmXuPfr/voZhHF AbcNSuBLsdL+6Th2Mc5don0i22HC4dg9liMR/ZAbANeuIaXSI6vFouiaD+PtdGthEghO Y2mkkB3dOFFHEOCTFFz0hd5uyEhacN5gyJQUM12B3ubXV0JgeRAU0I3SkCoL0yIjSX8z gxYiqenFpw55CeRaGi87B/PFulYKM++XQm20W16lKcMvytl3uHAp+qHxjCjWs/JywDui reLtAOqH+ywGTrYyudIrdzw/dq1q3YIH1UKX0meT+ZA75EiB+QIdaSIwq7ti7zk7ZVyq N8/w== X-Gm-Message-State: AOJu0Yyfr7XzaBLYrre0j2eGaNzKqVsjWVzDi27X+ND1zBHyD2IUVF09 DdMRSNbfu1WdccK7jlDXVPW/eNdvtdEqLFTTKV0tZpvDvsxd9r1D+ukvCP0ME6u3wbJNRgNj4Ca sRT8v X-Gm-Gg: AZuq6aKyl925zg2dhazPK6uGol5hD1d2o3vTdpOBni1ZtYj3cZ2+FB51BXjnEEYvh3w O/MN91i6DMkBzehSDj7lPHZHP/1S7HNiZKELTFX4IZQjbFMfF0LtotZHWZUhpu8SysEmGTTHAey ecWAlAD7NAyEeDuYbUSQAoAPFoN3tf9Hu6LdaSadyLdzBg48ZwuTgunmBuACGUG+npswHrCix87 n7vYWwtPXfXpxAYIihsm5AaUrV86mhdBRN+7qBkvNpfRx0X2inu8Do+gOAF4CiHWWcLATXp9c8t HKR2vreIjSQK8k6nDDZutN2YQUcMHKEFMvxXKoQMUgw3lQq0m3/ovlRpz8+7/A+bnzd+eRDg/kq qUWVuT/eaLffsHXgsEAqqHL1kwjxis3UkosUAurP4l5cACsmJCDXZjRiFDnT1mvS6q51HjhbepP 4gmchTI8+OJDall5vkvsf4k8T9COmOeOyFcYCI/BiVDNOon/LX+x+XxBtgHxI8zQ3t X-Received: by 2002:a17:90b:560f:b0:347:5ddd:b2d1 with SMTP id 98e67ed59e1d1-353feda7677mr6623842a91.27.1769650315803; Wed, 28 Jan 2026 17:31:55 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Manos Pitsidianakis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/20] tests/tcg/plugins/mem.c: remove dependency on qemu headers Date: Wed, 28 Jan 2026 17:31:27 -0800 Message-ID: <20260129013134.3956938-14-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x530.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650897357158500 This plugin uses endianness conversion primitives from QEMU headers. As next commit will strongly isolate plugins code from those headers, those primitives can't be used anymore. glib.h provides such primitives: https://docs.gtk.org/glib/conversion-macros.html#byte-order-conversion Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/mem.c | 59 ++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index 9649bce99ca..7d64e7018f2 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -12,16 +12,7 @@ #include #include =20 -/* - * plugins should not include anything from QEMU aside from the - * API header. However as this is a test plugin to exercise the - * internals of QEMU and we want to avoid needless code duplication we - * do so here. bswap.h is pretty self-contained although it needs a - * few things provided by compiler.h. - */ -#include #include -#include #include =20 QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; @@ -152,56 +143,52 @@ static void update_region_info(uint64_t region, uint6= 4_t offset, ri->reads++; } =20 + void *ri_data =3D &ri->data[offset]; switch (value.type) { case QEMU_PLUGIN_MEM_VALUE_U8: + { + uint8_t val =3D value.data.u8; + uint8_t *p =3D ri_data; if (is_store) { - ri->data[offset] =3D value.data.u8; - } else if (ri->data[offset] !=3D value.data.u8) { - unseen_data =3D true; + *p =3D val; + } else { + unseen_data =3D *p !=3D val; } break; + } case QEMU_PLUGIN_MEM_VALUE_U16: { - uint16_t *p =3D (uint16_t *) &ri->data[offset]; + uint16_t val =3D be ? GUINT16_FROM_BE(value.data.u16) : + GUINT16_FROM_LE(value.data.u16); + uint16_t *p =3D ri_data; if (is_store) { - if (be) { - stw_be_p(p, value.data.u16); - } else { - stw_le_p(p, value.data.u16); - } + *p =3D val; } else { - uint16_t val =3D be ? lduw_be_p(p) : lduw_le_p(p); - unseen_data =3D val !=3D value.data.u16; + unseen_data =3D *p !=3D val; } break; } case QEMU_PLUGIN_MEM_VALUE_U32: { - uint32_t *p =3D (uint32_t *) &ri->data[offset]; + uint32_t val =3D be ? GUINT32_FROM_BE(value.data.u32) : + GUINT32_FROM_LE(value.data.u32); + uint32_t *p =3D ri_data; if (is_store) { - if (be) { - stl_be_p(p, value.data.u32); - } else { - stl_le_p(p, value.data.u32); - } + *p =3D val; } else { - uint32_t val =3D be ? ldl_be_p(p) : ldl_le_p(p); - unseen_data =3D val !=3D value.data.u32; + unseen_data =3D *p !=3D val; } break; } case QEMU_PLUGIN_MEM_VALUE_U64: { - uint64_t *p =3D (uint64_t *) &ri->data[offset]; + uint64_t val =3D be ? GUINT64_FROM_BE(value.data.u64) : + GUINT64_FROM_LE(value.data.u64); + uint64_t *p =3D ri_data; if (is_store) { - if (be) { - stq_be_p(p, value.data.u64); - } else { - stq_le_p(p, value.data.u64); - } + *p =3D val; } else { - uint64_t val =3D be ? ldq_be_p(p) : ldq_le_p(p); - unseen_data =3D val !=3D value.data.u64; + unseen_data =3D *p !=3D val; } break; } --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650527; cv=none; d=zohomail.com; s=zohoarc; b=UrErZxxqsToN+xE7EN1A5y2PkyhDFhWr0YGsCJyFewXBCbTdkB1hN39J+9sNI3O/7NGc/qDz4ziNPGjEwibFmHNCeh90bT2KlisxHrqbixV6hH7O82Al7cF6hAZ5Ge03hqmJmFw2LFQTUYAPc+rpy/Ra80xNzAbpo+amsG5Mw2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650527; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GM9QG/3GlMmiLf/xxkqAGjro1S1VfOQ9Jr1hSQ4oLaQ=; b=A4krJDBwuCUHqiK1YDu749oMZHHfBF2FG2u7APQeNXZoYk1O46NODhIF6phYSmp6rUPmTWrQLHqP0Hd5EjzGxgCXip1Mb+phCP66hFkkvbJ1ViYDDCTe3fZWolrsQovw7UJf5F+ihNFPMfy4Q/FFCZd9HiPSNlE71hVGOLPdGsA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650527814100.61158545856688; Wed, 28 Jan 2026 17:35:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtL-0000Df-1B; Wed, 28 Jan 2026 20:32:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt6-0008St-LN for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt4-00039C-Hz for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-c56188aef06so173191a12.2 for ; Wed, 28 Jan 2026 17:31:58 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650317; x=1770255117; 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=GM9QG/3GlMmiLf/xxkqAGjro1S1VfOQ9Jr1hSQ4oLaQ=; b=CgwKIL7wbueYzp+KozmYeKfe0i6MkfR5qDc9aaz3f99Hw7o6YVyWfQ6bnvK/YdKoKj 9/AQXOXp0KYVLa+3fto1sKLPpZDgYSjXYyQgyVuyuAvQsciWuoXbYb1VoIhYmyAhyArG pvzSO+6J0SIEabns1Q7D4N7+dcSF7koxjqMfNMAA+aA7pALd6QmOmFNK4GlR2dr81X/D TFewpB76sZw5Pbbapw9Dk9wd+caxpoe9hJwaV/kQPaos401IBxFB+38XCd6ARDBP/lE2 CNZOINN6LWbAJrY85gJHdML9Fj3zN889q1OFmqd4u8NIxRUBGeIiva754KyFUbAwwdFd GT/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650317; x=1770255117; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GM9QG/3GlMmiLf/xxkqAGjro1S1VfOQ9Jr1hSQ4oLaQ=; b=NfH857foBYDZTCSsjqYcvSC0tQKJFagjIEpwokD6eHS5NHlztuV9faokCBE7kSd5OB rleAXp9ZKRk3CFXxYoUKcfinWpF/E09cJCX1Ey/IqL1f/KMHvHc2qjdvXkJkch/fhMy/ O2mlLfmEmneyZtkSthP1OMn3W+ounNvwC8ySvRi1mzgTmMJTpxfTC8J0UUpcQ3aNL5VL 4WbGG9CTTESrHZI2gs9of5SGCZvydhLBgr9hvZXA7n0v11PfZxL5Wdpm1qpy5bc0e8Gv IU8hES+O71bNh4D+4D1I4SvVyUiOFPzOyNmjsH7Bn4vShCfrkrDdJDWpMegSpypurYCM KRLg== X-Gm-Message-State: AOJu0YwKJYK4asS/RC730unhXulNLEJDYlyo9FuXu+w5S0OQ+ACLjy3P Q5gjhJIJDc/TkMQHUabu3P9gWOxq7CCYBAknwfGJHe24Fi365dC/ylvSzpsMGxe1oujnotPWv4d TQbqe X-Gm-Gg: AZuq6aJVXBRKzrjFlqDkIJOwV1UPfMRjiP+opSv4BarU19AXlJOaqL+Qz+dSl8Ueszs T3IYdM6MeZrr6U123t0xIBCK1ut6gWtui5o05BvHoPJ+fox71pz1o3J6neh+dHNux8OhrgFAxTa wah7OHAKxSoNdG2AMVxW8jVlBaFlz2oVOJZWjKfrO9VhbwG+AtP1iEhIVTG1b2unhMZnXFVoYQu 1zx88muE6l0K7BFDtpIKjddYLR3cDr/QV1jD1I9uXSLm1ofQWq0z0P3WmwhnytUW3bDOUEOX/tq BQiquBCUjeePcmxq3vmj4nJLpLBtGy86AdHxxcflntI5ny26YONHS71VHAlLRDe2Mgx0L28QMPQ EfYxeePAhmqCKmHR7ZzDiOryEvCNieAr0LeHAZK3zWxqxouVLvrR9tiQDzy0JJFyKJpXhvl4OiK okXY+IXuCqST1hjxp2nVdotfwgA47WQAJPlhFqj5QzlC4Nfp22AMffHqy1/9CemjNM X-Received: by 2002:a17:90b:164e:b0:339:eff5:ef26 with SMTP id 98e67ed59e1d1-353fed87bbbmr5362316a91.30.1769650316664; Wed, 28 Jan 2026 17:31:56 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , Manos Pitsidianakis Subject: [PULL 14/20] plugins: move qemu-plugin.h to include/plugins/ Date: Wed, 28 Jan 2026 17:31:28 -0800 Message-ID: <20260129013134.3956938-15-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650529754154100 Content-Type: text/plain; charset="utf-8" This change has two benefits: - ensure plugins can't include anything else from QEMU than plugins API - when compiling a C++ module, solves the header conflict with iostream header that includes transitively the wrong ctype.h, which already exists in include/qemu. By Hyrum's law, there was already one usage of other headers with mem plugin, which has been eliminated in previous commit. Reviewed-by: Richard Henderson Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- docs/devel/tcg-plugins.rst | 4 ++-- meson.build | 2 +- include/{qemu =3D> plugins}/qemu-plugin.h | 3 --- include/qemu/plugin.h | 2 +- plugins/core.c | 2 +- plugins/meson.build | 6 +++--- 6 files changed, 8 insertions(+), 11 deletions(-) rename include/{qemu =3D> plugins}/qemu-plugin.h (99%) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 9463692c411..f48c32bd844 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -166,7 +166,7 @@ Plugin API =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The following API is generated from the inline documentation in -``include/qemu/qemu-plugin.h``. Please ensure any updates to the API +``include/plugins/qemu-plugin.h``. Please ensure any updates to the API include the full kernel-doc annotations. =20 -.. kernel-doc:: include/qemu/qemu-plugin.h +.. kernel-doc:: include/plugins/qemu-plugin.h diff --git a/meson.build b/meson.build index 402028bb79e..951bdd9c54f 100644 --- a/meson.build +++ b/meson.build @@ -4445,7 +4445,7 @@ endforeach # Other build targets =20 if get_option('plugins') - install_headers('include/qemu/qemu-plugin.h') + install_headers('include/plugins/qemu-plugin.h') if host_os =3D=3D 'windows' # On windows, we want to deliver the qemu_plugin_api.lib file in the q= emu installer, # so that plugin authors can compile against it. diff --git a/include/qemu/qemu-plugin.h b/include/plugins/qemu-plugin.h similarity index 99% rename from include/qemu/qemu-plugin.h rename to include/plugins/qemu-plugin.h index 7f449d1b50a..17a834dca90 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -2,9 +2,6 @@ * Copyright (C) 2017, Emilio G. Cota * Copyright (C) 2019, Linaro * - * License: GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - * * SPDX-License-Identifier: GPL-2.0-or-later */ =20 diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index 91df1e78d2c..55e2040f409 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -8,7 +8,7 @@ #define QEMU_PLUGIN_H =20 #include "qemu/config-file.h" -#include "qemu/qemu-plugin.h" +#include "plugins/qemu-plugin.h" #include "qemu/error-report.h" #include "qemu/queue.h" #include "qemu/option.h" diff --git a/plugins/core.c b/plugins/core.c index 85fabf9ec81..42fd9865930 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -15,7 +15,7 @@ #include "qemu/lockable.h" #include "qemu/option.h" #include "qemu/plugin.h" -#include "qemu/qemu-plugin.h" +#include "plugins/qemu-plugin.h" #include "qemu/queue.h" #include "qemu/rcu_queue.h" #include "qemu/rcu.h" diff --git a/plugins/meson.build b/plugins/meson.build index 4318e3a1671..34643e2cea3 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -3,7 +3,7 @@ if not get_option('plugins') endif =20 qemu_plugin_symbols =3D configure_file( - input: files('../include/qemu/qemu-plugin.h'), + input: files('../include/plugins/qemu-plugin.h'), output: 'qemu-plugin.symbols', capture: true, command: [files('../scripts/qemu-plugin-symbols.py'), '@INPUT@']) @@ -62,12 +62,12 @@ endif =20 if host_os =3D=3D 'windows' plugins_deps =3D declare_dependency(sources: [files('win32_linker.c')], - include_directories: '../include/qemu', + include_directories: '../include/plugi= ns', link_with: win32_qemu_plugin_api_lib, link_args: win32_qemu_plugin_api_link_= flags, dependencies: glib) else - plugins_deps =3D declare_dependency(include_directories: '../include/qem= u', + plugins_deps =3D declare_dependency(include_directories: '../include/plu= gins', dependencies: glib) endif =20 --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650847; cv=none; d=zohomail.com; s=zohoarc; b=cF1+o0Nui53PVPGrXFL4mSOz3ANP0XVyf3ULxFa2WypEe/vW0TYR8lOoK0qgoSca9fh13HDeuL/nJRqO7P4KqP6DHZvsGdEIbIe936Sha8oPsv0eSEQDuxLu+vVpPX4M8FKqsMNNP0LNs9x7eisMj305O0H7DJ7cbNqjzpZy9R8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650847; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QelvfUsw6o6LxVxWTbkblnaREhszkxjV185vVeRr2dk=; b=balD/OFfajSzd/ZAbZGWuyiQagKObCjYnlTROrfaCgG69XpuK4wM7BrRL62t6k4Qrgdj78cBWHwz2O/HoSgnverhZy5Oi+Hu+L73WSVRRjnO9pAnbCMlcCVBj91gumMxFEOrNMHvzMzhgthFE1aeZHxxS1OBd5aQ0Va7LSt9I6c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650847949325.610396698596; Wed, 28 Jan 2026 17:40:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtI-0000BU-Nd; Wed, 28 Jan 2026 20:32:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt6-0008Sm-LK for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt4-00039Q-W4 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:00 -0500 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-c635559e1c3so192483a12.0 for ; Wed, 28 Jan 2026 17:31:58 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650318; x=1770255118; 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=QelvfUsw6o6LxVxWTbkblnaREhszkxjV185vVeRr2dk=; b=BVFSVVdDjl/OVBg6BU4ft24MyhHsqrTxRymCJNSNLuaLFiOHOfJ+L6xI3kOuwWIMRr DkX2BXndGGSZ1X7WFDaO1cleXuqSbpff4cBWo8dlHHX4XRB59yFo1pdxJPfizoEhhBia 4SPWemU3ZiIsWcdWR/dBIiekI04HZoxxQIaCsfrz4tlXZTXIP0GAs6QiNSOuJkswCoQp NEtfovWnvrsQx01yDT7x36G5o5HTGuFwb9RbQgtFUEjAv4oVErE97v8JHT/EFnDmJDUC q5f79gEXX0mJRf1za0DHPWsxH70eA2TlICGEFHfUsBTMw2WG5xVdZi73BBarcuzvpWjg /kwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650318; x=1770255118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QelvfUsw6o6LxVxWTbkblnaREhszkxjV185vVeRr2dk=; b=tGj8CvIEKhNmfq4ie60FlJE+aH4BNSCaDAtAyqSeFQlRO+BaJ1qAazUiFS6DjEmNdq QGvASGrogpfnfqX+4GpJQjJccA8j64524FPpmlLBScGiUojr9GOzcXcAADkMJebv1w+H u98pj6/F7+0sSCzdfelAxWIBAz+MdNdfG5bYj0CfLRe64P/Yn+W/ygIBcawb6/IjNivs lxfVwP9ydHUF2SH4w3T6bh6IFsEUN/b5ApuBXUHcxRF7L6add+aO/8hlpx8GP2Ne4Nxf fZ5TywXEa4NmzReF3/Ull9Kv128V+MitkwCNXl1gY+k9FkACi8/RsVutmraw8e8Nh7KF vY1A== X-Gm-Message-State: AOJu0Yx+xWzRo58v3vwsg24vckkFE8JxWCddljycVMFJZXqwOiprqejP Ypv0rwBxCN1m/h5DrGRc2HsMs9wPsXXi/blptHdZE65AAB0Nij3UH9RrAmSxCSpJbWtitCnsm9J Le4i2 X-Gm-Gg: AZuq6aIkLL+w8LPHlMJIEi3+vSzx51Y7MqfsjvVML75LUglfNv/+yj8Qh5gR2snn/Bp rAMc0hv7T9mVfa6/HXioF2rULiA/nbIqCyRx/0aiq8SK0/XvJk5m27vJRWZasUZWYCyb6YHwAOV tvcuVp8iC4Osn4C7KwPMIevlfiYWcr68dWcXOfQbxKwtcK2wrQCX+NoDp2kyuxdCDu+Uxi5KDhF wr8egQI7ITVErgfRXg30N1PBB36o+uemlyPUrNWYcysn7qiQl4WY8MwLyWPEB4ZMrq9NizfXTFr ZQOO82npeN1IvYy+9GBolsivWhKL4i9F39c4aG7JTx/pvQlthEUt4iwAabZ7erommBTFksMQv/z ZLLxKRXC6QbE6uOv2cjHIq33NhcHHOsl6M0lHITPxwS+XSmXwcV4DzdIg1sPLwKfUrC3+EJRwsX 2hMDgb4dGF+5jKPXq9IFAbRNa1tdAoCUsNbRD4Cg7qBQhU0BJRrhDdb3ZVZTII1/ot X-Received: by 2002:a17:90b:4a82:b0:34f:6312:f225 with SMTP id 98e67ed59e1d1-35429b0007emr965821a91.14.1769650317536; Wed, 28 Jan 2026 17:31:57 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PULL 15/20] meson: fix supported compiler arguments in other languages than C Date: Wed, 28 Jan 2026 17:31:29 -0800 Message-ID: <20260129013134.3956938-16-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x52f.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650849472154100 qemu_common_flags are only checked for c compiler, even though they are applied to c++ and objc. This is a problem when C compiler is gcc, and C++ compiler is clang, creating a possible mismatch. One concrete example is option -fzero-call-used-regs=3Dused-gpr with ubuntu2204 container, which is supported by gcc, but not by clang, thus leading to a failure when compiling a C++ TCG plugin. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- meson.build | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 951bdd9c54f..32bbd30bb9f 100644 --- a/meson.build +++ b/meson.build @@ -682,10 +682,7 @@ if cc.compiles('extern struct { void (*cb)(void); } s;= void f(void) { s.cb(); }' hardening_flags +=3D '-fzero-call-used-regs=3Dused-gpr' endif =20 -qemu_common_flags +=3D cc.get_supported_arguments(hardening_flags) - -add_global_arguments(qemu_common_flags, native: false, language: all_langu= ages) -add_global_link_arguments(qemu_ldflags, native: false, language: all_langu= ages) +qemu_common_flags +=3D hardening_flags =20 # Collect warning flags we want to set, sorted alphabetically warn_flags =3D [ @@ -744,15 +741,19 @@ if 'cpp' in all_languages qemu_cxxflags =3D ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', = '-D__STDC_FORMAT_MACROS'] + qemu_cflags endif =20 -add_project_arguments(qemu_cflags, native: false, language: 'c') -add_project_arguments(cc.get_supported_arguments(warn_flags), native: fals= e, language: 'c') +add_project_arguments(cc.get_supported_arguments(qemu_common_flags + qemu_= cflags + warn_flags), + native: false, language: 'c') +add_global_link_arguments(qemu_ldflags, native: false, language: all_langu= ages) + if 'cpp' in all_languages - add_project_arguments(qemu_cxxflags, native: false, language: 'cpp') + add_project_arguments(cxx.get_supported_arguments(qemu_common_flags + qe= mu_cxxflags), + native: false, language: 'cpp') add_project_arguments(cxx.get_supported_arguments(warn_flags), native: f= alse, language: 'cpp') endif if 'objc' in all_languages # Note sanitizer flags are not applied to Objective-C sources! - add_project_arguments(objc.get_supported_arguments(warn_flags), native: = false, language: 'objc') + add_project_arguments(objc.get_supported_arguments(qemu_common_flags + w= arn_flags), + native: false, language: 'objc') endif if host_os =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650851; cv=none; d=zohomail.com; s=zohoarc; b=XWrAaXcGpAZiZt4Xd9lImN8UQZ0IGa14MpJMkwfex3R/2gEz3tn0fuCCRLkt+czWtKvbWjCg25Dv2aGV7ifG0R3FRGTZWP0nK885GTSi4LxhmAFN0oeh8M7lVglJMYZYRTl26Y1ksl2nBmA3/6mZMsRtTrWRs5RdVfstOdlyvD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650851; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ErhJH+3L5kKgEL+bTAwKvHuiXtyYAOljdjanr4eRKa0=; b=etC/gMEfCUKwGDsObdhRDMzYndgB+vLML8DNwFIo5ejLTpICMi0uRC6axP8adzvvfrTXDeYYmwmlWhZc9nJ4P2egr3UnjuffNHBy9yVZDY0nGXERffb40dR9u0asLrXLHER/z5PRPi9z4YHaTNUiCjPbFoaDY0w2zonTfqguJyU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650851482877.7453795802247; Wed, 28 Jan 2026 17:40:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtK-0000DU-Dg; Wed, 28 Jan 2026 20:32:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt8-0008Tr-Ja for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt6-00039k-Ci for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:01 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-353576abcfeso168012a91.0 for ; Wed, 28 Jan 2026 17:31:59 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650318; x=1770255118; 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=ErhJH+3L5kKgEL+bTAwKvHuiXtyYAOljdjanr4eRKa0=; b=DdOpzC8kc1XXjOEqoMkr0Mx7UnlsGcBhALfqGFwlUxw+JdLYPT8ptX0wDLg28GcQE7 EuxELYyhU90hnvF/ZQtMjEYEojQaC1k2oZe+kg2oDHrr69rfqxB7dMUZaKJXaQHLE/A/ 6soKglU4N8/HXQGAj1w32vb+YgN0rG1eBkyR5F7NgDtZ5u9frb48hi1l9DheXr2sOUBP w2iT4S62Mwkr54Zok/iYglykTom9Ozx/w3RuBPVqOA0ih2HIwcfIKptjW0F4rOOkfRfg LSJnmIQyBW3JUIc/V2G/DnTBl7kfuqP9Hc94DDyxMy6OBR9jSoOaYmGt06aBEPJmAz+V 8GEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650318; x=1770255118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ErhJH+3L5kKgEL+bTAwKvHuiXtyYAOljdjanr4eRKa0=; b=IV0FzOBkwIx4WJq7kQQzVEysJ9VNg7OwHfMX+xgm+edJE19caMkefmWmEIyFR7laqP XrRuLLw3WNYxCrK2kBrscR8BAnHQVaT8itxUdOAspxW2/2glnlIBuClmjO+x31z9W/kK 5I5Dvdjj9pTVhW/4XX4RQsBZ9Rq5vAYBEuEv+7Skhw3P8Hdf+L9HsNXWr2sOauMjHKoM umv30OO3YZZucyv46z6peEcAe/a4vb4b73A83USgNwjPQ7xQTxBfH7j+qqGmY717ogNM PwgvZl4uvqdNc29h3Zps+v7idz8oWaG60cfHiX80WHmNcALm1cGxiH5OhKkTlXOCIH0a Zvpw== X-Gm-Message-State: AOJu0Yya5dLuylD9I1vIx1u+LujHSMAtMnMmVD+3idiUg+J1e3WtCucT Jpbf1iKmsSO4vDnW5bgdQAipUX9XrLr0DIaro+aS8pk7BIULpkIdswd3vtu/3OEAqyUcdTTGma4 RcBL4 X-Gm-Gg: AZuq6aJ20CgJzMjvC43wRM/U3c3h6mooJ/27u5h5WPunCBkQDEUbPorWDgxphv+dyxf uOxdpYmfeJUzT2OPTwHOAInN0ziENQadxW4X/g224JVYdkKnrjxzxP19nR/2zMIb5kolg+MJVA9 /hjBxjBaoXNfmeXcinWr+CROPEBHleUp0eWq0OeDA0BSEFISlD+ZF6lhjmDHy2bNf5HY4McMOTU IjOU/eUkeQ0udyxboJmqN3qsukRv1PnEVWgINPSU2q1PKR4W5EkiNc+OATq9+4MLrc1e54q2CA/ 9547m8wFKDeBeU28KFl0Nv8vnLrSuFpEmwgnamDvMQa14qMZgNJP2ngOIcF8BIUu+OCv+VGvR9+ 8s6p9M1n07UgOnk/tbuYTx3myxPSxoyzwV0Nz+jEzdC2dfqn7EZ/6RDDS7W+wAs48vqyV1RbkJP uGh5YX8OKMsICdhpwJsXb2F38PIXLLGpeNkNUBitCgrr7wJYocf9zaxsUBQKI/Ry+X X-Received: by 2002:a17:90b:2d83:b0:34a:a1c1:90a0 with SMTP id 98e67ed59e1d1-353fed87a85mr5797860a91.28.1769650318245; Wed, 28 Jan 2026 17:31:58 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PULL 16/20] meson: enable cpp (optionally) for plugins Date: Wed, 28 Jan 2026 17:31:30 -0800 Message-ID: <20260129013134.3956938-17-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1033.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650853188154100 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 32bbd30bb9f..aa35b8273c9 100644 --- a/meson.build +++ b/meson.build @@ -77,7 +77,8 @@ python =3D import('python').find_installation() =20 cc =3D meson.get_compiler('c') all_languages =3D ['c'] -if host_os =3D=3D 'windows' and add_languages('cpp', required: false, nati= ve: false) +enable_cpp =3D host_os =3D=3D 'windows' or get_option('plugins') +if enable_cpp and add_languages('cpp', required: false, native: false) all_languages +=3D ['cpp'] cxx =3D meson.get_compiler('cpp') endif --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650899; cv=none; d=zohomail.com; s=zohoarc; b=H1XDLoghffFQFWWEBUp7fbfY29rfT9URyEZzVARw/ys1RblwI7MAkCn3SBkEiwon8wlNvohaMch5o5FLI0JFuSY5/PggyRnlLs6ESXUAZ7tQFVXVbG/zriEQoCAEATyYKsAx7VnnwNs5YpNmoOFWajvNtCQ1z5uhXvvdrsRknww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650899; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BAwgkxcCnnqe9jCM08ttRZ7hAqumVGJ7T0ER05F6LwQ=; b=nvSobyGF4EFXaNKFWBskaIj8IeUvNfQylSdyN/ogy24+/cLi6tFdI7l3AD/pUmg/fCgWeyyuNQXG8GvM1raGSMhKt03vQY/dPaXlqTVCJF3iWYVZMr8c76Mr5BxV0OpXchNQE2eBHkonc6Q6KFogCTZ7RIJZbfDO3zwYHdHakUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650899913377.146377334651; Wed, 28 Jan 2026 17:41:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtH-00009y-JS; Wed, 28 Jan 2026 20:32:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGt8-0008Ts-Jl for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt6-00039s-H6 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:01 -0500 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-352e2156450so175011a91.3 for ; Wed, 28 Jan 2026 17:32:00 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650319; x=1770255119; 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=BAwgkxcCnnqe9jCM08ttRZ7hAqumVGJ7T0ER05F6LwQ=; b=Yd63b6TkFa+O8QeHWep6rXGF9DieeM4YQlT9gjARp0gbZHJ9eQj7M38AAnMgItbXZ7 uTKGbPbSlxTcPOLE2t98dUI2HtuC9vCbRrmQpRLvgIc8NATDPSp6Cs3JymWUIVw1kfuw +LqZtk61AsNlEs5K5TLMu0m7KPKtvr8QjwTVHXaSXmnOhZjY8Ro5uUBd2k4smxrsV0SD 8wiEH++Gn+l/I+7LXJRNEcbgGZUp9xP9oNLjEG3gC1f0JzGvKhHFsrEGXQhEdJ8He9uo +4x03hazSCRfOmPxH2aFCdws5DwPYTBQyiP91p0ZSleZ5LCgGb29KOPOQVcjHkddLXhs WV/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650319; x=1770255119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BAwgkxcCnnqe9jCM08ttRZ7hAqumVGJ7T0ER05F6LwQ=; b=qB2ODX4UO53mkisnB9Z8pxq1njB04c/ZW6qFrU91AroUIA2+jT6bO1xbvUczauK9Zi T98YPAopSw73aQKi4MnddK55ZP4UwCZoMoX80NrJWwyqy5IrPwZQigrlW4+qnL1vnVqX PrHHp7SWWvgEsCQ8A6e/3i3NSP1ZKeaRE4ktzQ+bRuPLexEc9HhxSg5haB7/dgo+tkYZ OikY8FuxocD37PNrs58n+8s8TlzYUpch8JKNSkbr0y2S4v24IaSiJXS368YYrSqH7zzI YjRtyt5LeolHyXuZYb31O2eyWYP59UBxZYm3Ge3NvVEoSPbgrQWOIt6AYeo9YLORTypg O07g== X-Gm-Message-State: AOJu0Yy2m926Nx+4VbqmKR8N6fJ+6zGG8KnuTStlT8X+kovRCcrD9o+v BrIK9lIyIxabYq7ftYP/ERrMHLO3aGxD6fy4i2EvF+DXjtfY+IjHLJh9TTGN4xwRCxG0lGSpIQW 5JHZ4 X-Gm-Gg: AZuq6aI/hMn1yswbiDz8eaIbhiab0voS4S4APoE1FVuspVJUZnjh2DIjwQf+/vBn3ei GMBB52Uk938pkBEbtmfL0pgnxzx7KeRSxz0QQ+Q/0F5weHG6Y8ay0sesWouQ83Ua4ZPk2XfecyX XXjq+Wj6vH+24Go1+AYFOhEs3sSq0ocaSxEf+n0umenvi6VR3VswAdNqmiCL49F40/kxW7pOlIS UGweUxoaeHv3lFTxTlnGEyVjsfz0JnN07uRJNpK1GANaQwDwLoUnpb6IAgKIhw5MRh3/5COpcZ1 x3W+rJYtMFCGuh/fKgFpWWzb/k1JxRDGKiKRbqi8i4rlxacrvY4kt2pCsnCjYDXj3+J3OWPpWGc 6uuWQzyZOVx13laxoARRK28ovPGqfESsijLEnsKoO3jURxitw8EUB5V+fK01COwDDFuLy7QqfSD oagPSezk8xlYIWMCG01BT1W/Uff+ubNS3dRFmAfAGSuPO5U4P/5HMfWGTOie0X+6cH X-Received: by 2002:a17:90a:c88c:b0:340:9cf1:54d0 with SMTP id 98e67ed59e1d1-353fecca19emr6433708a91.1.1769650319045; Wed, 28 Jan 2026 17:31:59 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Manos Pitsidianakis Subject: [PULL 17/20] qga/vss-win32: fix clang warning with C++20 Date: Wed, 28 Jan 2026 17:31:31 -0800 Message-ID: <20260129013134.3956938-18-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1030.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650900388158500 Content-Type: text/plain; charset="utf-8" C++20 deprecated such constructs. ../qga/vss-win32/requester.cpp:380:32: error: bitwise operation between dif= ferent enumeration types ('_VSS_SNAPSHOT_CONTEXT' and '_VSS_VOLUME_SNAPSHOT= _ATTRIBUTES') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion] 380 | ctx =3D VSS_CTX_APP_ROLLBACK | VSS_VOLSNAP_ATTR_TRANSPORTABLE | This is a false positive, since VSS_CTX_APP_ROLLBACK is not a value defined in _VSS_VOLUME_SNAPSHOT_ATTRIBUTES enum. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- qga/vss-win32/requester.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 5615955b6f3..74489fcd0ae 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -377,8 +377,10 @@ void requester_freeze(int *num_vols, void *mountpoints= , ErrorSet *errset) * To prevent the final commit (which requires to write to snapshots), * ATTR_NO_AUTORECOVERY and ATTR_TRANSPORTABLE are specified here. */ - ctx =3D VSS_CTX_APP_ROLLBACK | VSS_VOLSNAP_ATTR_TRANSPORTABLE | - VSS_VOLSNAP_ATTR_NO_AUTORECOVERY | VSS_VOLSNAP_ATTR_TXF_RECOVERY; + ctx =3D VSS_CTX_APP_ROLLBACK; + ctx |=3D VSS_VOLSNAP_ATTR_TRANSPORTABLE | + VSS_VOLSNAP_ATTR_NO_AUTORECOVERY | + VSS_VOLSNAP_ATTR_TXF_RECOVERY; hr =3D vss_ctx.pVssbc->SetContext(ctx); if (hr =3D=3D (HRESULT)VSS_E_UNSUPPORTED_CONTEXT) { /* Non-server version of Windows doesn't support ATTR_TRANSPORTABL= E */ --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650848; cv=none; d=zohomail.com; s=zohoarc; b=auVuAPyK6CS6fCszRwVYlYxttfFcEY5cVX3ci92eHviapurZyA9Y+DvMajFt0M+YFQmOAoMvI9dBmhcBrgK/s8WVkrov1RJNav/mt8liPWK7mFgQ7qcE+hxXhsDMuODmxv5I6tSYgc+ZMALMkqNTzMgbc9h6Z2vAUHf2snviN+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650848; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dE7UdsopvEMPmtvJtt13JOTPWrtqnTLsVWWFeGGWs60=; b=Fm3o4mkbL/MMWKkQe4CTXkmnIii939uVCBK+upD5ytRo7vLl9nsz5U2Jqaxet7vyKuj0MATn2kNdVr2a/HNnORBtk37PMfXohyTTmlfZhjEXx29Yh1YQot1TXBohlp3e4CZGBGROjRW5wnNH00s5huoVKYUFzOFcXLasL8i4/2w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650848513678.1944416268019; Wed, 28 Jan 2026 17:40:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtK-0000De-Tc; Wed, 28 Jan 2026 20:32:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGtA-0008V9-KD for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:05 -0500 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt7-0003AZ-D4 for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:03 -0500 Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-3530f597ea3so158544a91.1 for ; Wed, 28 Jan 2026 17:32:01 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:31:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650320; x=1770255120; 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=dE7UdsopvEMPmtvJtt13JOTPWrtqnTLsVWWFeGGWs60=; b=dUGiXkdv0BXkQIIUBbPuRhKpK9yWFWv+uu2XqWmfsjCqhfY1x5cuVnIrA4p+3a8RDW 4Yv7ZSuiv6aHisLApsx8yunlnqYTOWX3fiorx7HFMdbg28t7jqVXZkRv1cJw3MeK39Es N8wjImBPNNN9ZqiURWdJxTxhthox6ZPozq83TlKYG0GpALOFRhlHmKoXgplqmdS0CaC8 OzEx6l1IMOYFfN9GD7sY5EPtGzFjCVD0DX3OJ+TgVq0fmdaQ9s9lX+qr+rFacpiJHGQ1 hEART/BYoqPu+XS2jjUIwhvoDuNyi0+T8PHWBhvibgL6VETEXODH1TMgnpAcfD5NipzK WLiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650320; x=1770255120; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dE7UdsopvEMPmtvJtt13JOTPWrtqnTLsVWWFeGGWs60=; b=iDwPD+edcTuFNW+3kN0zjhnvlnhgv7V4CMY56SAgo+OFytSlnNHBzBPJNVmwsVd5WQ 4FUgBhcG2cd9nCNPTivJMywEc5DYDe2jLqQpwrZH2eFDQy6LaTZo+7dRxQdE+oG115Ze py0Ci7MxeWkcrFAqSl9ClvnxMDMxKQkbNaiBZqclLCCmavbeQmfLclDIEC0/VGn9iLbt ByiKB9A3Nw4ovn8Ih/1p04PexgQpxMTzjuUItdovPHfpJ3dmSTL8OGptOLQBDTlLPVGr m0lOQWxzM9DyAWhR/quxEtRDrmAbRz+KGQoQ52JdU/15J7CMBoReAFZ0E+VCv/bZHPGH zbOQ== X-Gm-Message-State: AOJu0YxnWFX+OhEV/kZDSFNBKzoa05yVP4kZ5msaByJG+oDuH+vgfBH5 27k+NI7E2Y8IZICnSDTMa46qtDLQJG60Kr8pKMwhtVSGMkEv+rKgL4EbSjZMVALLSno6tZTLJjK 3mcmb X-Gm-Gg: AZuq6aLg5CAS2o7K/uQ5oNW7QM97toy6Iaw7B67kgDGG5E/PUYXrWF3Bhg5HSgC5d9P 9XDiMoo/AxfOU4t5zcYeE9tzO9SMMKtoQeR6V0liCOwdpvgyMyUTonNb/LNGOKyMlSlXC5jk4IQ 9mxWmneIPuojuXAh44u45zGRCLPNuw8M7X0aurMNFzTUMUVnD9A1vwWmYPA07MBGkzVm4cIlxrt eS2hkPvQaP3dhxgUPD31Xir6GUipcez568hnUOghyORi+3P6nZPomWiGkRz08g7QHZentbxxxFo CNKpGaWSDE+RoFX0zmdNAXIskZTiM1UTcimC9CwmZHm6URBhr3VKO7cZyKmTDPv/UoqB4K381GC j1E6l6pkAm23stgd+6r3XNuVMNUXtWoIu0jEB7Dq6YIJ2kUDMRYq1kFWCofYZjpdpqHzLK8Zi4q +GHgFnncHfC/TE2MFR1Ohcs1gKoTOb/3ae5T8FI6aof2h+e0HSm+QXs+NP5R7QkoDf X-Received: by 2002:a17:90b:5627:b0:34f:63b7:a1f5 with SMTP id 98e67ed59e1d1-353fed6e348mr5681954a91.21.1769650319991; Wed, 28 Jan 2026 17:31:59 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Manos Pitsidianakis Subject: [PULL 18/20] meson: update C++ standard to C++23 Date: Wed, 28 Jan 2026 17:31:32 -0800 Message-ID: <20260129013134.3956938-19-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1034.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650851178154100 Content-Type: text/plain; charset="utf-8" C++ is evolving faster than C, so it's useful to enable new standards, especially for standard library. Update to most recent standard available in our build environments. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index aa35b8273c9..395f4d56193 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('qemu', ['c'], meson_version: '>=3D1.5.0', - default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', + default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++23', 'b_colorout=3Dauto', 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2', 'b_pie=3Dtrue', 'rust_std=3D2021', 'build.rust_std=3D2021'], version: files('VERSION')) --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650528; cv=none; d=zohomail.com; s=zohoarc; b=d7EXUfJ8mZVvj8lhoEBzYu6OqK99GvaBc7ays8zdMs10XNJHdva1WVHj/Jsp1O2xMkxFyKb8DTxxQkzLsbLHw3M4Rpi7KXzthLJkAuAkWaBkKBEcaK/yZgcaIPJB+U42Lbx5p41vMwttfA83VMbKO4qjAKWEMbCgk9Ms2qsVReA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650528; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MZctqSppWns1zLh31eFRQsbIoY++9vlsorD7HNDzT7s=; b=DiVSsWJgSocOVg0E5PTn5T7u4+U9iKJ8uiT2XA9wP0XJyhSXuDWdyDzWIQtnlFspxs3DBbOyJAI/O03ZY7cNqN2Caj5gwJ0F0+qRgKjmd9PXcB7FjbJvo8T5cr9ZS8P4UDBIGs+nlmjV1NlEFFW0ahRSLY08/YgnkRdtugd1aTg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650528272954.3952713460579; Wed, 28 Jan 2026 17:35:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtM-0000Es-0q; Wed, 28 Jan 2026 20:32:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGtA-0008Uu-Jd for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:05 -0500 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt8-0003Al-Cm for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-352e2156450so175025a91.3 for ; Wed, 28 Jan 2026 17:32:01 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:32:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650321; x=1770255121; 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=MZctqSppWns1zLh31eFRQsbIoY++9vlsorD7HNDzT7s=; b=GDmeh77vX2r29//ManOyhKXv3OKHgPoxocdmoIf2lGouY33YnLvd9ib9k1jDMnLqJe qLkE1QoNBPqxzlsLG6QFyQhQ6r3geWwxuq8qpj4fc8PInp0x1eo7AcsJ68oA5BNaKQ5z tOKemnsDms+9D1NKS7h2Am8StvT37vpWkxKpWSmxNDvJFrrDZ0dLmCxkN+5UyEIscXnt WCab8PwYHtbFJBsVfX6HbdiWGGpiY7xEBdWvJYhOMes/91GDS1czDb29rY3geMx5bgmf 9TFrDw9iVSfShEUfj5HMwjUW3qH93KLLjKn+Y8O4LjOCwBBevQCpdtAWK2SLR6KWw5y6 vQQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650321; x=1770255121; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MZctqSppWns1zLh31eFRQsbIoY++9vlsorD7HNDzT7s=; b=Wf6KhHa66Fk5duJ7lSfKR5ROCfGx8aVY9c3PN9krpmdnG2blNMohollBwm4bOMO9xf qo54w63RyrF9flNdSIlWdigunhTbvmfRmw4lHfkBbba3gRM+PW4Nvu28OVfyHnPqJEUl XtjI0qIfBQD014mqLwBo+yMIar/QTM4UVWthh4XXiILOMRefpuzOBYSj130fUzUBA3gG HnLgMjeA8kWYDN5odB8gL+YubN+Bt+pDQqEBJF5lhBdvhIsgU2lNHckPSIp+qa8l/9aB f27vgdjRMeF6eFbwZ9ueC8Q0OLZRXYitxd7Gh7onkg7LafYnpc4V7GZgTZ/FyYqQZstE AkJQ== X-Gm-Message-State: AOJu0YxiQguxKh9RQbvpCpwsbWulVkTQu5U677jzKyHqFOxMXo41Feid P8J9FWx0t9ht9n5EB9dBK0NwJDmW500hz9xm5uPVNxNPWvcYVBaIrWdKhx55TOtUcBN2mQFqTYP ocdIw X-Gm-Gg: AZuq6aJii4QfjUFB1T5JkPLTohTKJO0MUevb2K/6I44hg0ChWsh9tqyX7/SQjhZxdY2 7rwMqPniN2dkA22qwTQ+l8Ft0XJfldxFEALLCPxXpx8DH64Wb6pcu96WFhSJeQHDDX2TP20wHL1 KnaCO9B6yAaZBhokS+7XDpL5RljnWAG/ktyuA+W9G3BrByZcwnwQkuwe1o0mzHH1Kv7ybZoG9so WCxcZXw6FdPDjnQpET/tHzGSByqKM9zyfn0kYD94W9E8bq/pf8udIkl5kBuAlhZXcjv2jRT0Phm plAjVo3uqcGLwQGduth4PvP4bKJ7qknnNDxv6Su2qR/BMRZO9tRpaGebIURNG80+keobjUuwYSP DDcs+DM4g7oRCPhCWzloJbPLYzoGCwg1pqxwBj7I/b51tQm11AJfLCzT5x8ukrpG+DWf50uT7oY JLUf6qI4PziM4cMDrf0hEvmsRbelowDqq20ieOzKoGlqWjNY6GlHRLMdOKVFy0WQIU X-Received: by 2002:a17:90b:3d0b:b0:340:be44:dd0b with SMTP id 98e67ed59e1d1-353feda18a2mr5377470a91.34.1769650320822; Wed, 28 Jan 2026 17:32:00 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PULL 19/20] contrib/plugins: add empty cpp plugin Date: Wed, 28 Jan 2026 17:31:33 -0800 Message-ID: <20260129013134.3956938-20-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1036.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650529110158500 This plugin makes sure we can compile in C++ while including qemu-plugin header. It includes all C++ standard headers, up to C++23 standard, minus the ones that are missing in the oldest environments we need to build for. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/cpp.cpp | 119 ++++++++++++++++++++++++++++++++++++ contrib/plugins/meson.build | 4 ++ 2 files changed, 123 insertions(+) create mode 100644 contrib/plugins/cpp.cpp diff --git a/contrib/plugins/cpp.cpp b/contrib/plugins/cpp.cpp new file mode 100644 index 00000000000..1ff54896d97 --- /dev/null +++ b/contrib/plugins/cpp.cpp @@ -0,0 +1,119 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This C++ plugin ensures we don't have regression when compiling C++. + */ + +#include + +/* https://en.cppreference.com/w/cpp/headers.html */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ +} + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + return 0; +} diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 3d2d7862e0c..53d52c97967 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -6,6 +6,10 @@ if host_os !=3D 'windows' contrib_plugins +=3D 'lockstep.c' endif =20 +if 'cpp' in all_languages + contrib_plugins +=3D 'cpp.cpp' +endif + t =3D [] if get_option('plugins') foreach i : contrib_plugins --=20 2.47.3 From nobody Mon Feb 9 20:47:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1769650469; cv=none; d=zohomail.com; s=zohoarc; b=K/eP94ywFGjgh/AfVJNqVHXWRp6uV8kOdtnPyREBDBEFXqxP25vuSBPe7nvrN1DSMCKuudSR9I8jUtkgTF/6rTo8mqQkQRbBX8ZMX6KAV5l6O0HvYx54EhIYtgBsbjRss7QqYxOpFSmryAGm8KgYrV5K7X7y5ATh0nYUpLndViA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769650469; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9g5XwC8X2bCijA/ZXO7zi5qSvvTibB1PBZ+Yqaq+PhE=; b=jTwOgdoHL74jWIy94zZASA57GEIwLInU/i45rST9lTO0nQkYk2iFTrgE5jpYnJQHjn7TbidCr9qt3ViSXXBjJaRc0IVp8/5QOy122fBH1Pe6sLMHC41EKNI5Sv+rVzQZPY5PG4t4VGYET82ttooT9aVfwWc2kNf24lPfkQ2B2Ws= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769650469174518.6367581855932; Wed, 28 Jan 2026 17:34:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlGtL-0000Ee-Ow; Wed, 28 Jan 2026 20:32:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vlGtB-0008Vg-Kq for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:06 -0500 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlGt9-0003Ar-0l for qemu-devel@nongnu.org; Wed, 28 Jan 2026 20:32:04 -0500 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-34c5f0222b0so222712a91.3 for ; Wed, 28 Jan 2026 17:32:02 -0800 (PST) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f61e0007sm6627143a91.12.2026.01.28.17.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 17:32:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769650322; x=1770255122; 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=9g5XwC8X2bCijA/ZXO7zi5qSvvTibB1PBZ+Yqaq+PhE=; b=NW5385XnJwkLY1/Q+cpgwxB/mXbBKiUMH6Ff7UIE6Dmj/EaGBNnigaETQN1t5UNPWK 6rDS0f09cIZZiSCg28mZFgSdfxplzyjZPmwYtDa4LSugq3iOUlFUNmcwDwZ6g6Y1WvvW O93hKf91NFOwz5XSv/1qHIbQFj19qBFGP1AmhUDWRJuEucpYHelIXlVi+9a1gWas1PwK gUR5nmOtfCRV01f/evSw1Q3226+F6UkMWHk+roWNbP0ypNsiX2gO7LfnGKHsGW8yaIie uMtNp9VEuxSsGhnus00pM14tkT4eYAcSeAHky3eVJZXwhM/Z4UTrJW0gpAlm6ndeTnOG 1ajQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769650322; x=1770255122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9g5XwC8X2bCijA/ZXO7zi5qSvvTibB1PBZ+Yqaq+PhE=; b=dOm4f8xSmx3UnHpdQIewnbsg6zAy0TgPE9f+yW9AEVhXa/tdGSve8VJb094b2TDy1k mWDQjfiVxzVEj3Fm2NWOTRu9N09u6SI5rXFrTtPJiHo+ZfxSx+/uUTBbv94WeeAOXguX 39UwpRzsm7BCQRUWBoTG+EfgEl7s2jZJ9V6CmdUZbfNv7WY/VB45pdSlHkwelELE++nK VgnmrILI4ZxP3jMsc8ENcbglIC1PvXqqdwnpDX25P5pSyEyMixCoiMN6ketOl9AU9hlV sKUhFmyeOVuPb+3q/T9ehPoP5ZCpRdJ7shU/eL/ER9SggNgnxWH1O5bbZYs7Xl6l0Lc9 1w3g== X-Gm-Message-State: AOJu0YyMTG0cPM/A89NbSiqGCinMnMnaE1hwxYemjGfeoLa/Zvv6f6pa IZ0cKjalwRL6jsJwwBQPcWCCJyZeuIIt4ee71FxVkPpTbyfXqCSebIKjIPP0PMzkhqUKcZI0I2Z ineQm X-Gm-Gg: AZuq6aK9hZWvwtTBqCYkWmHsOa3v2GswSdEuTZ+FcsyEvK+8ofOHiA8H/s+IF9kGfH5 B9fTHnRx2VF95uuKtu/nLiPtIuTgQM64QPSeB/e/19psF0tWrxlURHnIZzIshC+faCS5bNGIWF6 SQmQqAcxo+gdjmia0l89sSfz7dXAjLYvhXC+7pHAmUvTl+S2q4SjJlBXRgaSBCFI0ME9npDLk+m 3UnzPlQtP9rWiU8MfiNWb0fpa0NDtDbQfkG5tjTw0zfocCIrJQXlTsn9QEoXAu2Fwvjl7yQd8Ux 7i/JXHAUpiEWC53ndo39vVv9HrX720rLpcq51g2L8RidjM0+gLryXuOceXSpiwqV1w4WgLeljCq DcwTJpdy3LBpdFuyj+Rf+gy00l5sJUDlBk0tQIJllc2mtof7xhazP7AwlBITje+HaiEkr/g6RkD yA3381lN3i52XK9yCOgkvzhADNjPmCnaEDjI9cmUQjac2Oop64575nxav/xbYKkVv3vWu8t6Yec Ak= X-Received: by 2002:a17:90b:2ccd:b0:343:684c:f8a0 with SMTP id 98e67ed59e1d1-353fed8fecbmr6226826a91.23.1769650321647; Wed, 28 Jan 2026 17:32:01 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 20/20] plugins: reduce source conflicts in plugins list Date: Wed, 28 Jan 2026 17:31:34 -0800 Message-ID: <20260129013134.3956938-21-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> References: <20260129013134.3956938-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102f.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1769650470843158500 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- contrib/plugins/meson.build | 19 ++++++++++++++++--- tests/tcg/plugins/meson.build | 13 +++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 53d52c97967..099319e7a17 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -1,6 +1,19 @@ -contrib_plugins =3D ['bbv.c', 'cache.c', 'cflow.c', 'drcov.c', 'execlog.c', - 'hotblocks.c', 'hotpages.c', 'howvec.c', 'hwprofile.c', - 'ips.c', 'stoptrigger.c', 'traps.c', 'uftrace.c'] +contrib_plugins =3D [ +'bbv.c', +'cache.c', +'cflow.c', +'drcov.c', +'execlog.c', +'hotblocks.c', +'hotpages.c', +'howvec.c', +'hwprofile.c', +'ips.c', +'stoptrigger.c', +'traps.c', +'uftrace.c', +] + if host_os !=3D 'windows' # lockstep uses socket.h contrib_plugins +=3D 'lockstep.c' diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index 303f97f9679..c5e49753fd9 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -1,5 +1,14 @@ -test_plugins =3D ['bb.c', 'discons.c', 'empty.c', 'inline.c', 'insn.c', 'm= em.c', - 'reset.c', 'syscall.c', 'patch.c'] +test_plugins =3D [ +'bb.c', +'discons.c', +'empty.c', +'inline.c', +'insn.c', +'mem.c', +'patch.c', +'reset.c', +'syscall.c', +] =20 t =3D [] if get_option('plugins') --=20 2.47.3