From nobody Tue Feb 10 08:05: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=1769708337; cv=none; d=zohomail.com; s=zohoarc; b=gZ3rvLhKUF2ftjmc9KdHZn8gnrBPUghXabR8LwagWMBaDi3G5Sm3r/PjA/xmuyKU44HiYBaYzW02ZqtIKwUW4embjIej7GOuP8N/+i/AK+eAdGnSD/QLRYS2DJdDygi/qGOUSV0kZx4TXVTlVfnU/iePThKWL/8/ItJ8YCoU8Kc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708337; 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=HD+mMe7KagiiFksQ7+VkRlV2MOxBw/OquAe1Do4OCiQ=; b=aJ4hDKLLOS5/2TS/RqB/Oq2tLDFSE6GujCJHLPkOzpNaYq8ieyzAoaEPiTmmYLQVb1RO7jbAsIjcfqzaI4vU59PSaXv1PXyn3uwpi3nRwDKSvgULQsLClYLw7g7eWGiCNPjnHCIqFj8PZokHrfYWisEIedJ9sbPn5B43t6la5LE= 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 17697083377211015.3848186201147; Thu, 29 Jan 2026 09:38:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyJ-0004LU-JV; Thu, 29 Jan 2026 12:38:23 -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 1vlVyH-0004JW-Hd for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:21 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyF-0000d9-Qw for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:21 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-8220bd582ddso698785b3a.2 for ; Thu, 29 Jan 2026 09:38:19 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708298; x=1770313098; 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=HD+mMe7KagiiFksQ7+VkRlV2MOxBw/OquAe1Do4OCiQ=; b=Rgq1wnw7Cb4JC2fveo2ZERtwle9M1ZzzGGMaM+yDfR6L0Kn2kWLzuJMX5UrY/IbiXo EI7t7Fs06QIvBk3TI+jmH3OyDfPyODqg/oD6FbFBxXBB9JHTnbI7zDtbnuDjJ0FqM+Av 66LvjC0OB8f92NVI0UCfTu8GBrARToQBcA20umM7y6fxARD+MsvNHXqn7Vqzv7xSPRH8 zssi32/+Gibvf2eW6mKuIgdIr3CGJR0Z07mcPkW6VBp0iWp7l5p0HvSN/Az2BBCgY2Yj f+/HyqjXQYEb+j0yVeS4UaqWbxRFvBfe/Z2y29nhDnDiuOvA7MCy0IEm3FhYubGXNUF3 y8Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708298; x=1770313098; 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=HD+mMe7KagiiFksQ7+VkRlV2MOxBw/OquAe1Do4OCiQ=; b=Xz1K+B+gohmAnvYWdcbl9M+LaoyDa+6WC8C5VBZgT1S16UgdPv2y7DFT4UBezzbnUg 0EruP+k1T9prru0Qjg+ITZfxvbUfmTkVf+CSPhkixcxnnl8CRvHMKTvSJm0dJDepjPM6 GbHmhFD6N+MZiE76yJghxpN3qSPLb7l/CcPBEAlEDByD5tg0wp1CAZZKLs+JZjhSoCei 5zIaqTcqkA2lJHgoQqf5kTIROcCkzB2qqJK4maspuqSAIsy3FURyKU35D2VHxB6yiSW9 FTUGmRFtVWRU0jeVfbml9+1AfpmwhfeaWitvoJi8ZQ/ZbiDYP/7ARt8VybjXWGawb5Q+ InBg== X-Gm-Message-State: AOJu0YzKvu2QMGkhzFM8gPWW12SkFr/ZAHwpJDzfiyE8eDobU5csrE+b /sVuA6lRW6J7jgtOWFZmD3yh/iL7taERU/dF8L1vfWcnDRUlyYZHE9aUc5GpZDU0SLXrk/pnj9o uh1LR X-Gm-Gg: AZuq6aJLE2N25s2Pw1hk7hf7LLxvuzdZG2HIr9oHxIGpo9eVOENx6Uql1HAru2mLJtu eNF8t2y5aNVEqmB5aOUvfhmUjv2IBdQu2YJpHktMB99GJNHWs09h/tTgjWQ6PbwRPohmJOzjmH8 nDa5Dr+ga0lTjb62AwcWMHpD4CJIWr9e69moHjzpJ4J1S+f9w2Yha7AUzlES7rFp2SyxwGjtW8F A9ADAUIkAqNoav1HmgbInHThb+Gvyv1BKpiK0E+3EyCjfZRGqtaSaKLNrPt81ZHeM0aP/MfR58k DeikHfBWURopbHtdG4meYF86IGqcgCGnV6sx/s7+yYhoFneNnG6TwSwY5wwECM6/Ixi2XpQAO5n ljyAoU7W+R4TQcqmeadTJ+Kbg88ivxZcgxZBzINE9KJYOvKEGVPZddP6m5iu1hpG2oH+aPYrljo c7h7nR3hT6Frzv9MRlxBpQH9kgMBIErxL4OQUDaP/v1p5poiysSUsebq5qYgm0qy8i X-Received: by 2002:a05:6a21:3395:b0:35f:6e12:186f with SMTP id adf61e73a8af0-38ec62de51bmr9492455637.23.1769708298128; Thu, 29 Jan 2026 09:38:18 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Manos Pitsidianakis , Pierrick Bouvier Subject: [PULL 01/21] contrib/plugins/hotblocks: Correctly free sorted counts list Date: Thu, 29 Jan 2026 09:37:47 -0800 Message-ID: <20260129173811.138036-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::429; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708340406154100 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 Link: https://lore.kernel.org/qemu-devel/cf5a00136738b981a12270b76572e8d502= daf208.1753857212.git.asb@igalia.com 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 Tue Feb 10 08:05: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=1769708338; cv=none; d=zohomail.com; s=zohoarc; b=I/os3qIcrt6t/q79aiwRhWNC3xN7/bNe7/04x37tXJ4HYQ2ky3aeo4wq4/NwXK9mkxorLfvFpMcRunIIqTGFnjmay7G1CMxt9gVCL+9cck37leumd2JPs1LFRAJarwmBihKOGHnTtw7jkWqqjtBd6+pYzlP0SEQVjtmlWkvIzMc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708338; 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=Adf4h3CDLT/aaxvTVJM3JKdsOLodwkUsTuO/3VBrEfU=; b=cbizc01eGuF/9qdJpq7iWmAHi+kgsV3Pq5P6ad/EUvsoisYITQmM85+L+zFAVK8yLUBSSrS85gyTw7IrlU3vR7THmZkSQXrtYC1fyITkYNVXPN9sE5VIXVQuXaHS/6vsYB+1ovAXPB9msK4nVfFnmU0xJFaCQjQ20pF27l4SycE= 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 1769708338513662.04804226433; Thu, 29 Jan 2026 09:38:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyM-0004V5-G9; Thu, 29 Jan 2026 12:38:26 -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 1vlVyI-0004LV-Vf for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:22 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyG-0000dD-Ip for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:22 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-82311f4070cso888276b3a.0 for ; Thu, 29 Jan 2026 09:38:20 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708299; x=1770313099; 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=Adf4h3CDLT/aaxvTVJM3JKdsOLodwkUsTuO/3VBrEfU=; b=kEkR6x5En7eR5IZJWq+HEWnxecGSeTwIMn8l00lhKAbu9Qsl5Dw1yi0WmJIpuGXeCM muciUwmfW8rYhQC4epHRpsA0D3L2heu/m48vWMdn9ZDOdC35FSeP+7VPsKSLr6hVxBK2 j3WcChtNmVxRfgXTPxBxJituCNAKw7+UJEhgxgxnAs4ms6E+CrgiEx+fIwAm4wEiNZYk f8XLz1MCSnQKqGhXLckwG232ILbFG4Y1XNFNlbUlR4LfiaVJnApj+D1Zo1hxyV2IdFFw QeNtcDK8hfREdjD3ndMO/tLKZJkIR4d/TY+gscs/TPvnira9R+W7lRr5gnrhbo8r3LW+ 3/Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708299; x=1770313099; 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=Adf4h3CDLT/aaxvTVJM3JKdsOLodwkUsTuO/3VBrEfU=; b=udfpx3nVZSFuG0BOigkzr5yAWebh/rBa7kukL0W68KjON6L6W+pO9Lc/T11J6X1nM8 6L//xXWnO0qg0d5fzUEM3mdTP7Vo/9S6Q/hc2TYN015C1BBsMXA5/68QQ9AgamR0GyiF 3RUvyNOa8tQA2VG/1HoqTZKk8IQcNnRO4Z5lRJUozfvbuiXU0RMIJCXhbeZwJimPN8jp M1bUIUUu7ejcoaS2ZayyF9btexERIUHn+bHafPUfyvmsi7S5taNHu0QuhD9wXsg431zy npRtLBpsu0Zcc2/AYIW5bEjWEEbWQgllRNa/asr9jFHjRyePbGt0IHna+64ez+apt9bK XDDw== X-Gm-Message-State: AOJu0YxiMhH6KVbfArQ6dXc1UyGbx2hU/5EM2MdnxdQvowqOTjMLV0Xk RvNyYktr1hoU+WezkXVtpMMzr5qZj6T7kzbwAwA2+NHIlwW36rcI5dCar9g1Lq17U2mJ5XS6q+F LBuZy X-Gm-Gg: AZuq6aK7NuaXQCS/fs0GDg7/Mvi5OzcEtaQSLIlOISdICdIvgFkNamVdkUHvKcOaPI/ p9QC8tUjpat1+SxjZbNrH6nFY8oJHn+042YeNJer18C4sSmQi9BbfR3zViFdLE8MjbFz4pLLl0C GK2fup7qPocwYF/RoxQ8f439pJB9UeiG/TR/LZd8YqMx2TvS+oww3sNP5+ZCAmSoDNNkzzyOTlM lDk74wMtO8bW7tf3r5j9NW6FJNDNl211FuRwpHThQqCSvnURITDb/Nkj0zguBpELuU8bplZzYgx TvFcOKQwrYIUijel5F7E8Tty3JsgCob5RkzAK8LkJSURwDKSlz95a+p1sxWEGHrL3+lfUUROnQ/ 6qA49SEvXHRzkvx1UpjihM/pFr4M0+PRyKIseb/q/jpnALJcte1I82PaCCWxFbPE9b6kre4An+i VHu484C7FS5A83vhU6BwtTO/4qi+wurl8iJImI4l6V6Wa1K3DUqvBIM6V0vhHhBYDX X-Received: by 2002:a05:6a00:3929:b0:821:7c07:ccb0 with SMTP id d2e1a72fcca58-8239208364amr3635522b3a.15.1769708298832; Thu, 29 Jan 2026 09:38:18 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 02/21] contrib/plugins/hotblocks: Fix off by one error in iteration of sorted blocks Date: Thu, 29 Jan 2026 09:37:48 -0800 Message-ID: <20260129173811.138036-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::433; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708340629158500 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 Link: https://lore.kernel.org/qemu-devel/f1ba2e57c6126472c0c8310774009f2455= efc370.1753857212.git.asb@igalia.com 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 Tue Feb 10 08:05: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=1769708441; cv=none; d=zohomail.com; s=zohoarc; b=YLZYLA6MVuOc93WJc8Q6npe7Kfjs/CU9m5y3nYydWAM/mag5ySFUkPXOcW2E2n+Ypwh9cqCCOuGAeNqMyUJutNQG7MIbvj0YPjxqRTpg7kpSsFfFNGeG3bIQ9KQQFcK02hgSxTQOyOUz+BMLI4d+vOB9g8kSHtwkqBqCt8JLHMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708441; 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=ZFfpq1J2RUXikSVjEKqIoQu5VVhghr8XYjp2Owizq7o=; b=a4u0GEq5zAepXsFDn/Dq0FowvcyGPO/KCslJ3CGj6ryWjbu4B4/7s0tO/fdWm9c4spnojS6zfviKI08BBMxeutdbviQYRj7kMt4Eo+f/UEvr9fAkkIrnRHuKhImf5eA+NyEghq3OhjT9FjUnP70EabbI+kW1sWDQSehyl/cWs+s= 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 1769708441190358.9410411617572; Thu, 29 Jan 2026 09:40:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyK-0004R8-VA; Thu, 29 Jan 2026 12:38:24 -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 1vlVyJ-0004La-2S for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:23 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyH-0000dG-9V for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:22 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-82311f4070cso888285b3a.0 for ; Thu, 29 Jan 2026 09:38:20 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708300; x=1770313100; 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=ZFfpq1J2RUXikSVjEKqIoQu5VVhghr8XYjp2Owizq7o=; b=CHC71q+RShKtSU2T18/N7Jpg460GbbdYtCXpdaVna5tmcQ4+MvNVpP+SbSMiYrHWIO 0RTSZ4+iUP4CQ17UzN9/mypBLLugPEo1x+/kq/ywvs5BZZhiyhKLtchTQMTLh35b2YTJ v6qcmmefhBx9Ak2hXivNs6xpsEQwExybiEBiPOin+aCYWVxfuS6oe3N+0HqxPOkn9ZP6 VjtSzQ6dhRLJgAOVtCn4GS2PxQiw1kCMlJgEUmKdlucErwdAVM1g6myLyyYG4f+RZdYL CByUvFVfwu+ZknmpOIjxpta0jIsn4IAsd5K+eHOoNss5gj6fHxzDYPRFdFuf0K2vK/MQ uGeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708300; x=1770313100; 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=ZFfpq1J2RUXikSVjEKqIoQu5VVhghr8XYjp2Owizq7o=; b=HbXEJhAy3wKUKtwJezSbJa6P8ogoPvfprSzu0ixsm5kVvxAasVDStpgony6diHD0i1 DWkpTEELc0DY8mwAxzrPqYeHDVKTAKw21/YN1U1NzevB6CCOINBmdbQtVOlomKtp4Crc 8V7pJf27K+/VxnxdEsWXAvhWLSUHPlfsdbn10hS6/5EIJ/S++5p3z7miscw5+fjrb77a lNT3FC6RvsBr7ux/bPImkUz6svLY4OnQsKOgWjueI4YQo/uN5yjRnflZo+D2nmdxw702 RmrrKUgee3Q/VTWv0RuxoMB/WkrbneuPk9ZOI8luEsn2+SgQlyIr4Ib1Z9t4CJqzINmt nwcw== X-Gm-Message-State: AOJu0YyoJo1kirw7meqWUlNkVm/jvGKm97hZxEc/gXvxuSLTf0TC4AX/ Eg1fm94SZRiQyzk2srBA8WRtj5ZQqoYoEMZvWn+ObQ1vOlCqWKLxBJXiKR89zAzDudW0Cu0uATz 8TKhs X-Gm-Gg: AZuq6aJFo0eJ6zJTIH4uPU9/0DNCUIZb/d2FKCRAV0mKmCGHhf45b9NpLxENhbF+Biv MvUvfuG3k585AZPCgAbo0sw8w9pB1qi99uw76uN6x+fvrEJeyu+8+AQjjd97YMWjbFJEXbF0Cnq 9EJ+65LYfzEPGm8WX1wVxAImxkKzLFZn9kYHyBUUZPJtwLbt/C/RqJNVa31XDzgyPIIWTjQlxtX Oeuw6au4jHXFwurMQq/tjW5EH8smCbuNI2IubWOBQzF3KYM+X0MlfStJos1moGZMezzdn6rSlMc HmRb0KYyxPKLlDFeXAO7PU53Z04K+5LACQnZaeagH5PGHfo0qzMb0QTYUCCTmMRUimfUuMeiRFV C0O3XTb3QQ3KwsJCEllnMrMWpf99HlXjVGD4UiaGL3o6L4iA7fab72jyiNAkgeesWgMYLGNiONh pVI2HDvBQVXeWkaEI8ivA4yfx+n6nEvcjXv/KPg/H1sHeBPdpCI/mcd6LAVsJGG9Qy X-Received: by 2002:a05:6a00:a209:b0:81e:4a9e:f809 with SMTP id d2e1a72fcca58-8239201d9d9mr2944656b3a.2.1769708299571; Thu, 29 Jan 2026 09:38:19 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Manos Pitsidianakis , Pierrick Bouvier Subject: [PULL 03/21] contrib/plugins/hotblocks: Print uint64_t with PRIu64 rather than PRId64 Date: Thu, 29 Jan 2026 09:37:49 -0800 Message-ID: <20260129173811.138036-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.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: 1769708445330154100 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 Link: https://lore.kernel.org/qemu-devel/5d26c9d99ee87ac4a4034ff64e3d888125= 3eedf3.1753857212.git.asb@igalia.com 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 Tue Feb 10 08:05: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=1769708338; cv=none; d=zohomail.com; s=zohoarc; b=TEmb0yysDRx4f+A2XnrztRPIczolMWf+9v0MylN33PwdZ6V7odE6yCw4T866ZVgVwj7EHpYAd+9/rm6U+lqcx5AcoU8pfmojO/MTZeRlxVJ9PCFUP+MpykfkBVojYp7BOGLDYrFIOkS5CHt4i1Z7CEzwT2ohtvAevPRKalkTPME= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708338; 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=Rl24eVwM8VDKwNGbTY8imqXSq1p2xBTKgWYXW2mu/sQ=; b=dv+qPcsdGHdD6CnOsmjS+XxMLQ8sewev9f+CTANmBWYUz61A3qsiGeEwBs+MJm5+sSBQbFNQysxIlg36N5iG52vrLtJFFOcv73mdUN4atDXutnsQTmXv7NZim7b5LQg20ol0kLbZHsswnYSwy0O0lNdXtQIijP5piCCehZ3RgWk= 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 176970833802284.23752447180095; Thu, 29 Jan 2026 09:38:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyN-0004WJ-3n; Thu, 29 Jan 2026 12:38:27 -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 1vlVyK-0004Nx-7o for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:24 -0500 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyH-0000dO-Qr for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:23 -0500 Received: by mail-pf1-x444.google.com with SMTP id d2e1a72fcca58-81f39438187so667162b3a.2 for ; Thu, 29 Jan 2026 09:38:21 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708300; x=1770313100; 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=Rl24eVwM8VDKwNGbTY8imqXSq1p2xBTKgWYXW2mu/sQ=; b=NPcFm+RuGH+m8Oy90l3sr/6bUq8bqsv5HjbzHB0Am+ohj2t/z8EGhV62n8D23Iyw+l Kz20r3/WM05ZI8cepddiIi4tfpLp3Q+ojMmhN+o4hgDnQjV/9x0UgugX+4Jgb1+xr0LU +DO7zZOVL153jJbQLTCUG2YSRUiLrzNeIYxxNfjWnny4XOq1W9yg0nIWdLQfTaWiTRXU oZ/OFqihaMbSJlu4Jk88UijpkUhJhMVfHS4M7UluNihcP8x0o11USDq0ahzwgFhAqhaG JZ1XhyRwm2V5gJUhSYkEVVWXwAsjVYbA1/Qirmrv7K0yLCVX//LFJzqJkdI6qcKt5SLY KJrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708300; x=1770313100; 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=Rl24eVwM8VDKwNGbTY8imqXSq1p2xBTKgWYXW2mu/sQ=; b=W6NzNAhF88hNkT02y/PINnUmkMCUJuk6sfVZFFbNSrUlM7TBzKfBK+l0hq/RnGD0PC N6cdXBfoIR9yzXQlPcGIX6XgnZTOO0i2/YYJFLU3Rvi9Q/fz3GY+NZMMm1TyTKItLoHF 50fapJEtYFb30sUgMyCdNZfxF3jtcVuqIWGQ8DkxNLVCqQVd5fGZfx7lkB3JRdFYeJzn /V90cxQgt2gU3T9Unmk7siQkCxlfOHZ0U+Iepq4wQpHRipDqmi0v88psQvLUqcPsnORj ztQLNKS29glhxCpczCm28V6XQW5SYrSYGHyLwlHLLPoudFJNqOzmWJEofbUr1gt/+GxQ 6Myw== X-Gm-Message-State: AOJu0YxslM6yhFktNkA/lsMJ8823HKYRJUGCSD8B7h6O9E6GuSUYwcpX GFhlQlrzYDIPM3VGHcW/3ksRLVaV2qxBCuv3R9ejmeSe/8mEnROIpE9/ThTXrXNOBnJweWI1hr4 7MEe4jXY= X-Gm-Gg: AZuq6aIWdPxM3b1Ot+AUe6vVnYjDioWHMok8xaiCr0DFOJluc+UgxCo94S8t7aB97/i si6pfzZYa30a4N7PA8qLY86BFrdoC18fMku1rmlTR39CN1JigwvEUe0n/4ofznFnJQNYNwBXAwg gfzsnitG/HwC46rEehb4t9G4/2ruTBspB9+/fgk9p/OE0Ggu0aHXoKtbjwEh3bERC14fkp+jzAH C/28iuTyMsHJ1u6yPU1URTdKZaxfTg+JLLGyOa24/Q/SVv267k694bcriTwFtR7lmo/6Xa4EEoB 5N+DYfwVKFHCLUIvi7wTcrVXvVwbeXen7Lqk4eWzsNBHwqhajNK0JSuWnzXH4cYQYIEuy/1//e3 3jcSImicYKJKGUIe6t0LaeWwLBNLBWOm7M3w5tM3ujp1UsNofgD3JVRQfWf8w6ztH1ujWx3XM3J fn9/2rxBHbuHc0S3nocm/nqW6iaY+OlBh8cuxty6dMM0o/atpdWQx++HrrAzl7s9hI X-Received: by 2002:a05:6a00:1992:b0:81f:3a05:8a7a with SMTP id d2e1a72fcca58-8236918218emr9167557b3a.19.1769708300284; Thu, 29 Jan 2026 09:38:20 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 04/21] docs/about/emulation: Add documentation for hotblocks plugin arguments Date: Thu, 29 Jan 2026 09:37:50 -0800 Message-ID: <20260129173811.138036-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::444; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x444.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: 1769708340513158500 Content-Type: text/plain; charset="utf-8" From: Alex Bradbury Currently just 'inline'. Signed-off-by: Alex Bradbury Reviewed-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/35128cc5a86a0c18418f9d3150fb8771c5= 4ef7d8.1753857212.git.asb@igalia.com 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 Tue Feb 10 08:05: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=1769708347; cv=none; d=zohomail.com; s=zohoarc; b=Qn2xKQcocaECiSEyL8QwKScfJ/V0lmF06fTR03gSW9Tu8AzZ5Su64FRhGIBSgWnHQBqZidXZg60AQ+cgZRcyDijWp/FpaS0142hJN9/cIcfdq5cbwBMqMWaihwMMvHl+E5CXmwNAiEQwPzHUPpvzrpAvN1ATzcRJg08Maf7qISk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708347; 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=72yLhNJuTU543aChFcgG+P6Xk9XLsSmbf2NcxT4jbhk=; b=jDFKUmsZUIsZOMPwpCBsk8RlIoHdiPMB4ASmiRQLHCwxiMKq1OyNxwS+GqLarNRA46yRpFi/U8xxbLAurLCeqO/Z37eleYR986Sr8nHxaQ9+49aUsVa1C2ftOr/Nj4/ErLlgYXZl0EhQT3oi9xIlFyHbPY6UxO8fRbjH3gkX7/w= 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 1769708347646930.6883493201777; Thu, 29 Jan 2026 09:39:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyN-0004Wz-J8; Thu, 29 Jan 2026 12:38:27 -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 1vlVyK-0004Py-L9 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:24 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyI-0000dj-TY for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:24 -0500 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-34ccbf37205so586490a91.2 for ; Thu, 29 Jan 2026 09:38:22 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708301; x=1770313101; 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=72yLhNJuTU543aChFcgG+P6Xk9XLsSmbf2NcxT4jbhk=; b=UjswphfsLdr1iVBJKl/zSGmGCfhnhJNWxBFsxNysK6SQsjnB+7l0HZKGv72zVNYqKq j4j/qTNx7CrvTH7CrHWw1xoayR6902PzI8RzKQfgkIOXJ56/79+dcpozcgcSlf4mUFaP ME6TQYFKSwq5LAouwv0aRtTpafz8+92eqQKs+p/QFrYdjsZE7wpZ6ICpJCodzhvh6GpZ peeaHMjHXbodh9tRNLsojsEXMb8YqRNE8LTQrVHhVrd+bC+npLgr/1FPVm1KsK+3xusp vvSgnAZdsUJ2QnnvX8JMRsH4zpJXaPvNOYqz5XWntillGIEH0YEszdm+xNIcaDREurld u7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708301; x=1770313101; 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=72yLhNJuTU543aChFcgG+P6Xk9XLsSmbf2NcxT4jbhk=; b=mL56mpu5ZbniVaO/g7yvR9Qc/vGWnv3ZoVW2ou4/CzRwme2YVXECI3N/RuaLmF7TPQ zx5YJ0gDx/j14oZThJTVTGyN1xg+tT5p4yKFAqW5pfcY+GcTAKl3pN/Zz1umtRr1qPft O7LNqGT5UMWlkUhoClMWzpe+slEl6snQK0ypCWu4b0Zn4eZ0XjZWKEKhFPYBcHMoPYsm wTXNJlJLH2NizRbz/riiwYZVO5jYYucWcwVXbT8Qs8UpWgpOcXMbGhy7q9jn6XOVwmay fsbQ7ShlIG0wBoYqzJMfkUCpxUcnX6NWv48pkzarEW3YChNT1rOzmaDtPaBFG40ybNXO aOow== X-Gm-Message-State: AOJu0YwGMziyfWyZUFTVGzb9HVsN6NZEI/N9eVIKIyT+m2hgDS2AKqso OfbRBajHCdgl6V2W5raWkXzazHp+Gec4WxBNtdoPtpAMBs7VWevcR+MWXSLN19p+KQnb+1U1AHr T+eug X-Gm-Gg: AZuq6aLoJWZ31i5E1skLmdJYcYZd9FKrC1FJv3xLVt+B0XNWp0Xor41CIIB5pFIpKbI xkdyHwZnHwD8awFQPA4CKelwL445hwLIKMch4Jsk8Bwn0K/05fkv4CdP8dvbF2Rn8ieYW5hpcjN 1K/Mkio4txTsTmTiX4KYS30Mf3sdy7My3Wofx58ypIDOsdIcZvfUGGVBiFVaT0p9BdT9hgT8Yux QaVDH91PteVg0ojguJcv7WMkvohfbPL54Cxfg4xpz02MfdAKK0Fvzyk6tHfkR5h9PucoPeWolAt yRFC3B32K7U1uReGFZHjjbRM3pkpRVc1UYbZEBUtTzg9pBAYdk8uS9tkzZ9CElLX32ypbKlbGW4 QzWU0qJvEj6PkK2CfjypNsQkbP/KPaL7HdYYJrX3+1SIfspNRIpUqV68AZRKFE2sPeXfi+R3+2g U9ub5Zoivq5k6BI/9rgz2SfUci4D2PTzNSBOMCKAZTYlzodjZ8X6WCkAxcqEosDmKfJRssZhEEZ EE= X-Received: by 2002:a17:90a:e7c7:b0:34e:5516:6655 with SMTP id 98e67ed59e1d1-3543b3097b4mr206930a91.9.1769708301260; Thu, 29 Jan 2026 09:38:21 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Alex Bradbury , Pierrick Bouvier Subject: [PULL 05/21] contrib/plugins/hotblocks: Allow limit to be set as a command line argument Date: Thu, 29 Jan 2026 09:37:51 -0800 Message-ID: <20260129173811.138036-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::102b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102b.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: 1769708348260158500 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 Link: https://lore.kernel.org/qemu-devel/58281d6e54bcad1802e8d3dc8d8501d54c= 2a971e.1753857212.git.asb@igalia.com 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 Tue Feb 10 08:05: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=1769708430; cv=none; d=zohomail.com; s=zohoarc; b=gy9sXvr6raW1tvw0vYrNVktiWVUWxlFyBwu2iFe6Dp04fcZxKQhqum+kjvvwNtEQXO53ShaiMTfqdxf2DprpeTgrwgG+t2f0us9g6ELO8Lv2NBJYAJQie+1TqHuO1z/2bqF7q0NOwtywqevBLGkyyjiyS1+JT3gGUi9S9jKgO30= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708430; 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=lkr6OhmguPw2oxi7sD8m2/kHKNvzaRIhXU0XNXX+ZdA=; b=MQ91fXbJ28glI60hVHm2PTAaDr6nEPquHRaGdNc3BLHZVECnA/H3fC/+6iLC5CDd3bX4VWtr67rA+GptDHuTjfi3gW8ksgWzJg1I7ARODnSdIgnMWv5lBj/myOvyppRLF1Axj8RjX/KB86WdhlrB8JklwhROo1X513AnAyYUDGI= 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 1769708430592880.3441725056815; Thu, 29 Jan 2026 09:40:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyO-0004Xj-2y; Thu, 29 Jan 2026 12:38:28 -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 1vlVyM-0004Ub-0Y for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:26 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyK-0000e6-4T for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:25 -0500 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-c626bd75628so431512a12.3 for ; Thu, 29 Jan 2026 09:38:23 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708302; x=1770313102; 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=lkr6OhmguPw2oxi7sD8m2/kHKNvzaRIhXU0XNXX+ZdA=; b=iIy4ty7RPnDZImnVusUFpWL8UWcAXgkpjTX2vJ9DNo6lL2Stxyqy59RQJEH7vBArZL 3oTXk6wV7sXrrWZqcu/GnNAoPz6ng4RYu+ksj7zKVbj+NSudbgrhFmlklzDRdUfDK7sP A185lOVofpyLBn1Pv1F3hD38Ixn8o3i4IzYC8yR96HIZD8way3sqhsf2A4DWwSzjAGTR iwH2teK0ASkzmtLgmiRXdsCUmBQaevYf9SLc3UI9Hl0X2Pns7/KAA2D938Ctor4f0GpB 7pPZcVvbdhlikwuHZgggcwnG5poDGrNSG4Lst4JSIqSL7xh++5Eon35zpSViENufsZRs NFOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708302; x=1770313102; 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=lkr6OhmguPw2oxi7sD8m2/kHKNvzaRIhXU0XNXX+ZdA=; b=lRMww2zqAX+kSDuUb5TXIypN4hnzqv0CIS3WQFnjD5z5g2lPAIGjXRPdVF4uXypOew ZPuEaMykzKeJWlNTxejsflIq5Gi/bkrI00Qkw8jFGTqluOmknCUqXcUtkyfi++OhrzSY kK81h7YW9WLf39sSBGQRLYic5LclWfXpgAI31B4jNnmU+M5eWBUDiWEhSptS+QqAVDvr 0U9Ap3EfDJs8XPqWHShpZBofBHzzSFE1hFKU4oPBR+RnLVnOvSzi971vtRucbrW06ri3 aHtJ2ZaVJmrSdOD6cyZG4MBdWLFVECY0SAAQIjJlfD8EFtaErplM5NB/42c2uXBbTFeb e3PQ== X-Gm-Message-State: AOJu0Yzz4NCaoX0M+/+c/gg/MrMBZLe9O2NHJc/6VeJN6M+sgwXhRc0W pFC047gn1FXx99XwZvpD0Mc24IfKMxmd/Wal6DZazRayJXgOVu6tlMJ0ESBTJuCSkSROz2rg3B3 2EQFu X-Gm-Gg: AZuq6aLKaQ6xfSsbs6IfCfXBaKF6A1HtGKGirpN3ISpPVSQZSUd9jmxXQ35ZZM6uC/8 fZlzNAmqu+88XmgFU+TD55C+K1M8Ss9YFE/1pBxUwZGyJeR/6m/XGLLz9lUjMeokC0uAFaC+9pL MOpr1OR+1IyjxW+E1LWiUaIvHS+OoeFJ8uZCU/1pnHybSvD+SFH3lfNiNYyZjD62XehVab9gFsz 6PosVzKj6EyegdWXEYfJqk8k0bxW7sISl8UyFVW22/ceiSypjUGcsJPIwU+ctqUlrJlzBiXMfs8 OJv1zQT25E2pdkDrSxBKyMRMIYH6r4xTbhEmesp+TWFX78NZLVQBTbtOU+YRG7lsxElthObsNrA mWrChHrtc+hy2hlGgP3EgaljXU+sddrE/s+uuT9GEEDsuef1qphVR2Fm7s0QRl8F/glADe4wrKq geVSUYuMhqcZF8kwF3lHCw57nRqqQxiuT3JPfZZdqR1TZUMm5jlZImfMt8bxNE9jxz X-Received: by 2002:a17:90b:5587:b0:34c:7182:cf9d with SMTP id 98e67ed59e1d1-3543b3d64f2mr202462a91.25.1769708302268; Thu, 29 Jan 2026 09:38:22 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson Subject: [PULL 06/21] linux-user: move user/syscall-trace.h to linux-user/syscall.c Date: Thu, 29 Jan 2026 09:37:52 -0800 Message-ID: <20260129173811.138036-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::534; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x534.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: 1769708432413158501 For now, only linux-user supports plugin syscall API, so restrict the scope of these functions to linux-user/syscall.c Reviewed-by: Richard Henderson Link: https://lore.kernel.org/qemu-devel/20260129013134.3956938-7-pierrick.= bouvier@linaro.org Signed-off-by: Pierrick Bouvier --- include/user/syscall-trace.h | 43 ----------------------------------- bsd-user/freebsd/os-syscall.c | 1 - linux-user/syscall.c | 20 +++++++++++++++- 3 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 include/user/syscall-trace.h diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h deleted file mode 100644 index 9bd7ca19c84..00000000000 --- a/include/user/syscall-trace.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Common System Call Tracing Wrappers for *-user - * - * Copyright (c) 2019 Linaro - * Written by Alex Benn=C3=A9e - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef SYSCALL_TRACE_H -#define SYSCALL_TRACE_H - -#include "user/abitypes.h" -#include "gdbstub/user.h" -#include "qemu/plugin.h" -#include "trace/trace-root.h" - -/* - * These helpers just provide a common place for the various - * subsystems that want to track syscalls to put their hooks in. We - * could potentially unify the -strace code here as well. - */ - -static inline void record_syscall_start(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) -{ - qemu_plugin_vcpu_syscall(cpu, num, - arg1, arg2, arg3, arg4, - arg5, arg6, arg7, arg8); - gdb_syscall_entry(cpu, num); -} - -static inline void record_syscall_return(CPUState *cpu, int num, abi_long = ret) -{ - qemu_plugin_vcpu_syscall_ret(cpu, num, ret); - gdb_syscall_return(cpu, num); -} - - -#endif /* SYSCALL_TRACE_H */ diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index ca2f6fdb66e..4c1191b8f47 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -31,7 +31,6 @@ =20 #include "qemu.h" #include "signal-common.h" -#include "user/syscall-trace.h" =20 /* BSD independent syscall shims */ #include "bsd-file.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3944004568f..b4b551ad148 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -132,6 +132,7 @@ #include "uname.h" =20 #include "qemu.h" +#include "gdbstub/user.h" #include "user-internals.h" #include "strace.h" #include "signal-common.h" @@ -142,7 +143,6 @@ #include "user/signal.h" #include "qemu/guest-random.h" #include "qemu/selfmap.h" -#include "user/syscall-trace.h" #include "special-errno.h" #include "qapi/error.h" #include "fd-trans.h" @@ -14334,6 +14334,24 @@ static bool sys_dispatch(CPUState *cpu, TaskState = *ts) return true; } =20 +static void record_syscall_start(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) +{ + qemu_plugin_vcpu_syscall(cpu, num, + arg1, arg2, arg3, arg4, + arg5, arg6, arg7, arg8); + gdb_syscall_entry(cpu, num); +} + +static void record_syscall_return(CPUState *cpu, int num, abi_long ret) +{ + qemu_plugin_vcpu_syscall_ret(cpu, num, ret); + gdb_syscall_return(cpu, num); +} + abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, --=20 2.47.3 From nobody Tue Feb 10 08:05: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=1769708406; cv=none; d=zohomail.com; s=zohoarc; b=Vg6vWUTdIefbvUjeTwfXrB5gVNCBVKfj0d7BxpriSl5tpwbdlO9ut7Fyu6T2nKrvhBWYpOSUoktWp5klwqrQ4UwSr9T5bfQNYuXPVzes596/hVk0XRgp67Tq76ObF032K0cSJ+TMfPbkbcAaS8rBXUgPiTY5UDmX4S3zXtLncMM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708406; 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=AhJDAaYUhDrqX/q/1jMneEFS4p0nFap0+VJEN+IJhGk=; b=hUCOMt/tiyiDQ2vbFcZzTSj6bQErEEjE+VA+odilWXw8m6S+5zyGHMaYr0bn3vWJMIlmHkYfBzK+LDR6vJzpzqm6XoG92D12t4eaXucpslLGlia8AOzCoXTZhienLOgDJqsEVqAc+f3RiMs2R39CZXEJ2K3Q1AgrOkzuj0ZNbG4= 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 1769708406080853.6252230478248; Thu, 29 Jan 2026 09:40:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyO-0004ag-Qa; Thu, 29 Jan 2026 12:38:28 -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 1vlVyN-0004Ws-HN for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:27 -0500 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyK-0000eF-UR for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:27 -0500 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-3541fd9dacdso587394a91.1 for ; Thu, 29 Jan 2026 09:38:24 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708303; x=1770313103; 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=AhJDAaYUhDrqX/q/1jMneEFS4p0nFap0+VJEN+IJhGk=; b=jd8omEiBbZh469d7Q9qXas4DkO4lezMuZ7eJB/yklbOeI+DvEtnI64fnuYvWEYE+yu NhzUq+SMtlPOlDQu78lslFwMv7U7YxgodnsMmHocAK8lYY77x4yhl9pS/Gc/V4YOgnpT q6uhbbNxkYEJHXJhRKa7yO2iiPeRfzPUNqdSZqpWw7LlJZtzgqKS8hI44c6DnS+IIx+0 Py3HcbL2ACZgRk39y1Z+hJdjYaHcNMTmvvNgQ71iPM9jKINoDWN4XJT74Whl5bm7S0CZ WnN6moDY55u0jgtRGFogs9YdFHKPBcIuyeeGU1TWP4HHgGc8o72heHH1nZ361LimjoLT Fa0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708303; x=1770313103; 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=AhJDAaYUhDrqX/q/1jMneEFS4p0nFap0+VJEN+IJhGk=; b=X0iuWRNaAKyUhAya4NuGfqksG/U65/eYAW0tsATVrsU+CpA7ef9mAANrYfSU6kwOyz n2w7Dfbi4a+SpOtkE26bTxgsZavbffL2mee6oEAIqYYsWNj7ij2NdIR49X5/AnL/fTmX Dh4zdqVjnJVnAB4cR046bHOsLKGySCQEYi9JJlrwJMeq8+5PCFF8hLwCEN4KAn7T5v1B CUnB8sInFUSVpiwW+CGfF17/CTS/l0gvtDp8cLn7s+pjCCqtcXfA1Btyl2sNIUHG5CHH 92/38Egi4n7DgnAU1EAHIMFEtiEkATcnpm6KumRPomUWH9lZRleZ8a6BVacMdYXFmEE+ 7DSw== X-Gm-Message-State: AOJu0YwwbdCSyN3VHerNK1i7CsKNkiSr6Qc9V0sD2rxjRBJZyAGrwfaJ F2afdh1f9Ml1dg2MgPSlUuAuZ0Uick9Hf1W69X9fEyiYWy0W4II/vOUCsKktsuIfoNuzvZCxhHR Fj37m X-Gm-Gg: AZuq6aLrEYi/Qm6SNINbBjOiiptQ2VZcbn1a2HgirDHw4+4FBhA+TSIiyjoUY4fe1OM XtTl/z8zOQYS3iOEn73BI3X+1eQkvKeM/bF/U8fi4mZdybnCh5Ka8KjCJF5FwcPZF+PTF3X+1y4 +5QVUJ8AQIiQpi5gsdiy3dPUt4uJgfCiKBfIc7GmklEnuJidcKVGMto7HS5VLBXMZwx3d8RKNTN a5YqVFI35gjkEcvvz3DQ+cuEa89nmy/caJ2Cqf1RX5ah2H8X15aETjsqZY3eM2F47B71+1Ah6xE lZbFC2qBnabMOUw12kRdmCi1DPje7Sgyr04q+GO0/Mf+II0xNGwSiSB1w8s7Ej/Cjj9HEg5/G8J VhPWuA+fYhsgRoTNnxanvBqG9REIQ5XoDiCuBUlqLhFyd5dLuSqjkbYFSNFuoL8voIdDzWNdTJ4 kvt1QXp3saO0Wq46WmXBlkZuONkiUUPz2HjfsJIpjpPU89zCvdzgCn1gnLpRboNq0J2blF1BnQG d0= X-Received: by 2002:a17:90a:f944:b0:352:d933:5574 with SMTP id 98e67ed59e1d1-35429ac7f79mr3397518a91.9.1769708303160; Thu, 29 Jan 2026 09:38:23 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Ziyang Zhang , Mingyuan Xia , Pierrick Bouvier Subject: [PULL 07/21] linux-user: add plugin API to filter syscalls Date: Thu, 29 Jan 2026 09:37:53 -0800 Message-ID: <20260129173811.138036-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::1031; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1031.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: 1769708408243154100 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 [Pierrick - move send_through_syscall_filters to linux-user/syscall.c] Link: https://lore.kernel.org/qemu-devel/20251214144620.179282-2-functioner= @sjtu.edu.cn Signed-off-by: Pierrick Bouvier --- include/qemu/plugin-event.h | 1 + include/qemu/plugin.h | 33 ++++++++++++++++++++++++--------- include/qemu/qemu-plugin.h | 32 ++++++++++++++++++++++++++++++++ linux-user/syscall.c | 24 ++++++++++++++++++++++-- plugins/api.c | 7 +++++++ plugins/core.c | 37 +++++++++++++++++++++++++++++++++++++ 6 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..b74a7d0811b 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 *sysret); =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 *sysret) +{ + 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/linux-user/syscall.c b/linux-user/syscall.c index b4b551ad148..3e6a56aa0f6 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -14352,6 +14352,23 @@ static void record_syscall_return(CPUState *cpu, i= nt 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; +} + abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, @@ -14386,8 +14403,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 Tue Feb 10 08:05: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=1769708338; cv=none; d=zohomail.com; s=zohoarc; b=kV+8BPlYLpxTpVO8su6NT1gjNxQiBkkGKx3cXkHB8LRbl8uoW1MzZw7tTk/m7CPstIp+3nwX4N5qRivRdIw6N7ZFVd1vs4505pTYtVvI85hUDcTsDo7PsbX1ZPrN58+4TJ7vgPjN0g0NJep0v+XZP0E640pRJzGQu1mEVmQapCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708338; 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=jsztMEzgZHZfrQRWYcQj4QjAMuO/MHTF7LJ1DZnGjY4=; b=gejX0r1YKEZQmFKqiVTPjKDiBqwvpfS3/O0Os9GBXFWkm/+JUuDa7lCBalRQMRYXVL/HOyOGShRuZZJzmni5f5q/EWdQ6rtBlF1OFHG2XAv+aLIOn6WHkMLwerzrC7qDdZUzAXNjx2JiqfQ7hZ3MRQ6CR39RrgM4s+hGc8BrJHY= 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 1769708338105372.10667688417857; Thu, 29 Jan 2026 09:38:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyR-0004nF-Nh; Thu, 29 Jan 2026 12:38:31 -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 1vlVyN-0004XI-RG for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:27 -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 1vlVyL-0000eg-G3 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:27 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-8230c2d3128so723709b3a.0 for ; Thu, 29 Jan 2026 09:38:25 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708304; x=1770313104; 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=jsztMEzgZHZfrQRWYcQj4QjAMuO/MHTF7LJ1DZnGjY4=; b=lOtQiemX53Kg1b/00ZpCtTdBPBp1rcvT2fw0WweXqK45Bi1BxmkLMvJk2ZVQo3r0VT ByuhY+PMwjGX1YlXracPemnxYa0OszmJPqJaLklyrripJ4qmRzQGCHwQnHc/BJzGFVcq Joi6WazX5+nf128N5q9k2G1FvwV9lYZMfZo0emEaqUghd31IRmgNTxtMWxZPWnj24Qqn ajk+S2RK0bJdUKteaVvNb2yQYFX5LGBvaG8cVkjvKqtkPYoVMM0JFWf2FDfqQXYJ8uDr G8IPtN9rIIDsiJpZedAffg5g2Yn35VpaA77hhCTkjQav7qi9cU2Jxmp1ndF9x1rUe0cJ DuMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708304; x=1770313104; 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=jsztMEzgZHZfrQRWYcQj4QjAMuO/MHTF7LJ1DZnGjY4=; b=NjtrAxCj22jehvkJFLZQ5azNt/v0iMP+50Buzx+efSIj7jsKG8PJIBZWjoZNUgCkHX aa02s/eHmtcntNT1OGeBB0CxQxTGTAYhfINJ/X2T58eG57rcmQ8S7OB0ymbgNLB6izdn sFbZh2KReJrIAAI0YFSr8CV/lhwVkioqt3q6Jj9p4/j8IPYMA/RosmZUmsdGZ8XTOFJ/ Z1ixfE1VG7mb7SM+u4+aUhZ5/P6WHNOhPRCSEilt9+bnHYHuG+ORzB4Z/Q51DmLZBYkt 7zy5Z+TyukiuBKDrzsizhNvgmVP9fDSswbAcZoV60G+tt/f2SopSR0u4bPKUKw2eQ4Ze z8og== X-Gm-Message-State: AOJu0YzpvwKgIJ5PWm6oGIgpOnK91FyU3onsA4hOViwQTqJW3V7Cgfs3 O1jDq8ru0Njb63zbb4E1tRItdiic6Azclvdqguz6lYA8y4gKjXi0ElyH47fWIaNtXX1Torr/nOB VApi0 X-Gm-Gg: AZuq6aINpq6NiwxrCcBrvQ7vAgNgAgo+PIoQSWQUVcOu8+EQrqxSlQIe3DUp2ScGSM9 mKlgsx8Nen2TIo8rN+lIS7A2SBR9D5KVgKEhIHrieroRt9m7geOWMCX7zLy+9TPok3+LyXkoyhA aOQnGGEeZsvISfDzylEyATfQfkuWpBaiQuNjIvSA+l8VtJiSXMoG9YPa7J69aiSU48R7jTvA3rw yWptriHG96wUuDvfSPvWgfXePmY4cYY5nhoZiQTaYTDsH67aof8GrLHLymY+FKAFRVdd+4cG510 ezNTLezajWW3jgsFXxceyd/A4HUtVPeL25uje2bKzF1X/Ow6grcU7Iphbl2SP0Hyefamz+zykfY A73rW4btinV/wdOCprhckXhSczskkjuD+Rggu97sMtpsKZ37lv+okjQ17uyjk/6NfGrYhmUbNVq dO39bSyZmeRiecDl3KleC+452rhtA6zSCKKNPJP2jaDE4oTF8YR/qSspgSWmdOu+3P X-Received: by 2002:a05:6a20:a106:b0:38e:9b5d:dc2c with SMTP id adf61e73a8af0-38ec62dddf8mr9506633637.17.1769708303918; Thu, 29 Jan 2026 09:38:23 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Ziyang Zhang , Mingyuan Xia , Pierrick Bouvier Subject: [PULL 08/21] tcg tests: add a test to verify the syscall filter plugin API Date: Thu, 29 Jan 2026 09:37:54 -0800 Message-ID: <20260129173811.138036-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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: 1769708340573158500 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] Link: https://lore.kernel.org/qemu-devel/20251214144620.179282-3-functioner= @sjtu.edu.cn 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 Tue Feb 10 08:05: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=1769708391; cv=none; d=zohomail.com; s=zohoarc; b=fvIJyhJptPEzjCLQH29G4647Qbo47MbVscj04fZIA1UMErM73nv0O9vECN/Tb3gRNCLmnLPiqL9KdErZcM12Zai90KuELnnrXTGfWZWIMuTPnlJ1FuseUjKYU5t1tMJNpo9DSRUAWWkOvIFuxUVmKcNeVQIjT/v74xiX1rjByKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708391; 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=jRW4en1n4D1kiZQqnRmRGh7FNpXXpDUSpvCX7m51XUg=; b=h/r0e6fPjyY5A4f6mReb/alC51JhwqfD+CGaXIM12DOT0m/iN8coVCTv31eWPm8sM+RVIqRYl/eBrcqqUbaZ++ovMtooBrQEGB1gXFyWdIPcfiyVP1R74k465ZqGEycLKyh2H9ZBvrBqDE9KR6PaEzPaUsZYvmCtweXV8xDNczE= 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 176970839147295.81677754514851; Thu, 29 Jan 2026 09:39:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyS-0004pB-8N; Thu, 29 Jan 2026 12:38:32 -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 1vlVyO-0004Zz-Hg for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:28 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyM-0000eq-8q for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:28 -0500 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-c05d66dbab2so810327a12.0 for ; Thu, 29 Jan 2026 09:38:25 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708305; x=1770313105; 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=jRW4en1n4D1kiZQqnRmRGh7FNpXXpDUSpvCX7m51XUg=; b=WlOtzjp7EVaGPzCMOKdvv0Ha4TCD18i3tLvLt8yGotc9LlnD1CQQ8u/SxA//SteKjQ eFehD8eHOGMU+JuK4HDf3Jz5mad8ghPoS654m32u9kpqWu8c1yuCO7JQquIwUVF1ziXx +wyCSb10xL5Et5bsgLp0ZcyYe/FezumsipEXUR0s3KyoLLgNSZ75JQpKX8yoPhzwd8Ib zsik97zC1+TZmpBf3s0FGH6K0EFnYabY5E7UJ7y0hfLkugrq/wXQNTzPNZEHpn4Qvtao vxYalNps5+2F4ITagK1ntSWrGzWO39+/EiQwW+OICUaz3uBoWfm/A3jrRvcu1iLT+W4N rTjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708305; x=1770313105; 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=jRW4en1n4D1kiZQqnRmRGh7FNpXXpDUSpvCX7m51XUg=; b=XJCxekrsD/J5cfRKPchIu594Nl422up1gTPsUoHPXH8GMYafUtjbvxlq4XtnUmTOkx uApzPWENmbqerOG7Kgd9Uot5bw+Wdej02r+5CFdUNbVmHbBG9k0vtzTd7OIZ5VQ9XGoT mBCiTCXH0h1AO4+oOdDrNQ0/Kd00U5y2Swx7nVvKZIAcOTpyGNefxmvvyqaYAKx7qokQ 2G4slRLpojd8Hx8m2zvK83jUedjxW+zkUOQlJX0g0z29y1CqjpjbmfnELLXDx8x0aq6D ExYST9sa+vKeeOhWT6fH1s9qM9XqNiFm35nqFn8Mm9s8jmGMaBWKloSznFPHP3c2rMLu KZng== X-Gm-Message-State: AOJu0YwMCV+UUvQXTkfi66Hg5vEvwb3awDrtboRabSpuadrCB7n9f9Ee ZO3DgD47PwJuWXMWpxqGZnHMviswaJ/JMzxXNssog50L3DFdNC4AYA4WDTxCjiICFhTBarBau9w Gg+/g X-Gm-Gg: AZuq6aK/sHzsxsgQf8NNR0V5ElFvhIWcdru62lHIhI6orS8JcOngm1BMq+jvLJSfcfU x7Eg0o7hrLh4u+3HZqZaoBMEtg3S7sNxiEccaCmC8TiVz5zGFkyHS/M6piiHOGE1INecOJdyd+W 9Kz6k6N/b4cAo1SXMfIhtbShFr6F7J6ytm4oYWcp93712S2C40FfvdBKztcqf8qWaN2T3uMrrjY enHkM28r+hbsYTRAeqkL5GvgYi+Lf+dDrLpwonnhHPK2/LCeVOd3JAhpxE4Jcc+vsI/lH3iPzjI wM96VdGjERFZ4h70tYSU/v4WUSlL1pdJfKJP0jc3l6jLH9oieuZO6ymKDRCvbuGXQ/IQNkvhosX ozgkABS02h0/va9dU4upa0eJ+9nuXs4pVMaEgXMOh9kEfcsyaoCchBrkDeITNPRZJyg8EH48Qzb qCCXaZJz03i1/RqXekBi163oZBKrYQDzEJwtDoK6KTqkFqQFFfKUXIkWn45Sj0S4PF X-Received: by 2002:a17:90b:2dc1:b0:338:3789:2e7b with SMTP id 98e67ed59e1d1-3543b31af54mr262295a91.13.1769708304667; Thu, 29 Jan 2026 09:38:24 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Florian Hofhammer , Pierrick Bouvier Subject: [PULL 09/21] plugins: return bool from register r/w API Date: Thu, 29 Jan 2026 09:37:55 -0800 Message-ID: <20260129173811.138036-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::534; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x534.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: 1769708393791154100 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. Signed-off-by: Florian Hofhammer Reviewed-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/f877dd79-1285-4752-811e-f0d430ff27= fe@fhofhammer.de 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 Tue Feb 10 08:05: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=1769708371; cv=none; d=zohomail.com; s=zohoarc; b=VkDDMn//irS4gkc5P7/nUnRfQ9vhQ7gAtc2iIH+6UL3cME9zaeKbqpvyRhN08w7yfli5/FcRO+ZoUgaZSnbca1NdzW3YsD9WTU42aXCJh59N29fmcg+w4u9fCLTekNr1oat5Mow33veqZt4zG3YjG3zDypQ4PHELmvchVzNITzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708371; 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=GhrB+p6q5WdeFFrjMC0kuTkiUzANFpmBoSRwysaxsTI=; b=KDHqUidOgF6UPjGn/ZWBTHg/eJmWnihLF6TAQMHd9jraC5JpttO/6vWKHghiG2bG6zv5k1KRobCzo54baZhuZRQxdEEFh7pPXFiYNjeInyeHLirrzAjqMtlvVGDeBaXY0Ig52tthPWVNTeb1jpg9Ng0baE0LcLRpAIJDjqydJdM= 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 1769708371151929.7142871987076; Thu, 29 Jan 2026 09:39:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyQ-0004gR-6X; Thu, 29 Jan 2026 12:38:30 -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 1vlVyP-0004ba-1z for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:29 -0500 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyN-0000f7-4p for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:28 -0500 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-34c1d98ba11so955849a91.3 for ; Thu, 29 Jan 2026 09:38:26 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708305; x=1770313105; 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=GhrB+p6q5WdeFFrjMC0kuTkiUzANFpmBoSRwysaxsTI=; b=sG2WpZL4xrM7iFM3+Pxp17Ad3FRUTyH62YrNIpfHx89GspNUWFt8yLwrwOsjmh8O8Q MSc4bSsI3QCjA12l4iN4SxXmUS8Y3KO6w6DjRisF1O6PSNu0OEJdNoY7ukpsEYQ6fFju zMxlEPpXGBKX0SOL3UnrLdd2KZ9liCz4+uXCordewCc7jaDxiX671SeITQzLHpY6pEin v0FI985P7+fSke9wt6Gx8EcfAcszwuTFBNGTf0UufDWj1MFGf7CHK+Lrh1mcvvVIz8AK nuQEwXzYbIt3U7BTMYxx/qZI9Ig8MVcAGhW0Yrf4nergsMc5dnZBw5YR1G/pyOHM16pt JAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708305; x=1770313105; 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=GhrB+p6q5WdeFFrjMC0kuTkiUzANFpmBoSRwysaxsTI=; b=gEaJh12vbjHOhY1X1eQjVA8KmMWF/QE0Q8ni2VgU7kTpoxkUesId7AzFC17ixsWFJx BrwcrYFeMQW1R+k72QEHJLFo03qt/NtvWA6ZRK9wq7FxLFOI6t+ov4/OTkvCzzqbUE/A kgOvHi0fhmxip4SRIXmGbWxag4KsKL5dL0MRB3R9CNPy+NQ8xd2kq7CO5G5X/G1yxyT+ bpnmG1KadZIaPt2LWqzLmyye9KgOR0LlW16BpwKZ883C58a5Ib33YAUVWKW6i0NlvJ/6 wdHiiMBUqhOZ4TniW7zRQBLMgClsNlz7vVd47ReHuLz258JviQYfQJtZJDgK0qFZSI6B IwIg== X-Gm-Message-State: AOJu0YwNZYEG06OBz+2RAEwxX5jp9bUaZlwtDEYG+hUqhrSvecBf6mU9 cb0PXqbVp4JNVxlSKTE0QXsY2PEFt9Z0By6aRoO1HlV4ClcTKJ/CfDgbu3s+5uxkG7WOh4BSTQu DrbCH X-Gm-Gg: AZuq6aI0I8eSlQAlGa3BRAYuraKnw1/njZwsR7N2q9dugodK307Ux1t8Ry37dtQFj2f txwqAAR0FEryoTFZLV2mbuLmGR/5yRfxQAkaJsso1fbeOKRuwSQNq25Yx6LxirNYpH89dfMy42P 55WvPqpo8MGTO97P9csB5EQW97FmGry4+ZzLO3bshtprf7QI9R39mqMZHKfvzckX5NC/GPSLpoN aLmVZV9sE/H2TqGvHRjBLqcPAoElYU2dIqSq/heycZU06K8jjtih2Nre16GK8R+fwUejIKqT1Ho +NxVPW1hpkjZOSiNIyLFqOx/S2uhZT8MQZBBEs7YcFpT9t/sv+wHpRoHsJCbmf8aPw2bb25ZTeT Npb1REiSwHF3QegrbN6vWy/OHofSODK/QS/MXwvw0bjxSMIMpSfh0foeU4dI7t7zORi+9B7Ek/7 MO3Bu5RB7+DQbpzPCK+cXDDR/QKU979IRioRYJ5xHhK4lYtrYhhSmMwzN1KFyVZ5XM X-Received: by 2002:a17:90b:2e8e:b0:330:6d5e:f174 with SMTP id 98e67ed59e1d1-3543b3941aemr190651a91.20.1769708305378; Thu, 29 Jan 2026 09:38:25 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , Manos Pitsidianakis Subject: [PULL 10/21] plugins: move win32_linker.c file to plugins directory Date: Thu, 29 Jan 2026 09:37:56 -0800 Message-ID: <20260129173811.138036-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::1035; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1035.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: 1769708373313154101 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-2-pierrick.b= ouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708382; cv=none; d=zohomail.com; s=zohoarc; b=FqP1IKqPmuk8GnwWx23RAGYYrWmnqm9NimxWp1KljrM+ephN6bI2OsIBu8iToKZGs+ZknXHBedPeO0+zIct9ZPyRKQESxwVKOpg5i0CbrSmCgptfCgi6yqGB0tsZGUoLCk2D5SdDt1FcELkN12Lbesdmt8cXA8TnohLe2r2ShA0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708382; 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=Tfzt/+Tqbqaa8fpLeO7Urmm7clD6CMvMT/txFOKy+4E=; b=dXPOIhN7M8wr4VcuxlN2Z0Y1MF0iBFx+J7A6UYfso9qsGkVONQyk/TKWxUgmivOuOl9C6i/6OtEUf6Ly+27BHckWh2uYaHljtbObDiheguOu2oZrPi/lixSihovj9UL2Ian92tjulEYyi28IjDuo3RaTttRi+eMUF+UfDWaQN+w= 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 1769708382250619.6704690078085; Thu, 29 Jan 2026 09:39:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyS-0004pH-Bj; Thu, 29 Jan 2026 12:38:32 -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 1vlVyP-0004eE-Ka for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:29 -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 1vlVyN-0000f9-PH for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:29 -0500 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-b4755f37c3eso729925a12.3 for ; Thu, 29 Jan 2026 09:38:27 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708306; x=1770313106; 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=Tfzt/+Tqbqaa8fpLeO7Urmm7clD6CMvMT/txFOKy+4E=; b=gEWja8Ottsear4toLT01U5SksuNVqwSm8V2xj2cKNSLBbu+uEg3GnBs0wq/yuOBMJi SrhSWcYjruiL52+zPj3R1El71c2UWK0suERnAS1IGgaFmPSLMn0HJAzaZadOVGSFVASH gEvhc8SW3d7t+4thcu8XcSNu6oWQujhwqQNzZ7hAJBcfQ5glvhZc0V/DMlsFSQVJsicU GOipYsPeNGBBLKwMx/H5QDYEQMOjJFifhWYFiULRqglF9tppzYRCAHONcu64FNYwV+Nk LAozc58S7v7mXb5jny0XUPYOkFGn6hb9kbcN3D7eCu/Z7zrn7T/G5kajGt8HzvS5jKZ2 cHBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708306; x=1770313106; 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=Tfzt/+Tqbqaa8fpLeO7Urmm7clD6CMvMT/txFOKy+4E=; b=hiJpMBRMn3N1pTcJ3Gm05E+JnuQZ1cmKZouUTDIeH6lnV9NPe1/6Hl5FMIaHSnZeaD ni7teyFlWxUIxiSlGcLcZsoMJ1DcE8Id4C/0inZFin2QiHo8n9aiooeJxigg7grANCc8 s4FdcYo56pde1Y9FJ8t7wzik61ln32dW/wwaHnYJEZDV8ReQxzGiIR1xH0KH2USq5Ig4 zq0kDBqYUR1PgPxrNW4CjzPPGYnXVgnF2WWozmY0vfGrrkDEG+C9wMqzyHb221YiKbvs jYPxW5akqZW45dSF0geUAiLqlDPo0IU7dvdRqfWx1F+VIR/Qt5akZvyPiK4krWijTunI Q5Xw== X-Gm-Message-State: AOJu0YxVi2OTRRCrSOnh5OpqqTOivk9tlnrgs5v2xJN/Pfp6g7AH9RvA 0MMV+wT95uxT8FbovB2LYezgwjQ5DE6tQGtIVBIJcSgV3ljvaaJvRRXnlgUwSwh9oQqhBblVW5H Mc74L X-Gm-Gg: AZuq6aIccu3K3ga7L/X3ENU+oSmGBs10yVKL3HOMvJvHM0DAnphrPlfiiB3KVKGAeHr zmniOAHGPQXPigiH5+HxTcStqEa7LeFJAcSA/e7FK3P/Pu9eFTgiIzUXZPAHBpZJftMhDhAC9xH A087m6512QQI954BT3Z3iMRf4d0dc2due3s5Q7ZoOBSAkfRzL5fZRg91gTd26Sbp+FHnmdGvrfa RsXcSpNo/0VHnLZzbFaK/D2IHHiSOiLCkEon/xE5qq8qpAW8hPAPcf6aeEix02pcodve7XgT70y CPJ1Jvyczhgz3c9K5qU6blKQXWjuw7e7VUmvaXfPP1s8H5GhCZp8HBUGH4oxWmQodz8IcBXX4dj lWnl9R0EsnaBQo9UZfSFROex5gfGwtFGb8k703KJDS3UkRi5Lkz3/vA7iAAZrp45FKc2U2SMxYL XDnPiTL8tsjF0IHtD9iWXiX6nSk4WqHSYui2ma2mg9THSDbIVG+dWLyevfTKps8zyB X-Received: by 2002:a17:90a:e704:b0:343:a631:28b1 with SMTP id 98e67ed59e1d1-3543b3161dcmr273290a91.16.1769708306176; Thu, 29 Jan 2026 09:38:26 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 11/21] plugins: factorize plugin dependencies and library details Date: Thu, 29 Jan 2026 09:37:57 -0800 Message-ID: <20260129173811.138036-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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: 1769708383725154100 Reviewed-by: Daniel P. Berrang=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-3-pierrick.b= ouvier@linaro.org 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 cc0dfed0667..82e0188b0bc 100644 --- a/meson.build +++ b/meson.build @@ -4450,7 +4450,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 Tue Feb 10 08:05: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=1769708382; cv=none; d=zohomail.com; s=zohoarc; b=W4OhxmhsJQPr50mWMkgMsphfXcCk2zAEzg9USxUY2WLTQSBJTTvg8D2BL65/e+5OVNr6tH5LYAtwilEShJoFd2mubf1UR047P6WX/XAZCTuRMoSKm2DnmpXVRrVsqE0Ur5MfSCwJfKcqA/mBJrRnoCBRmHAzrDlOBiwjj6pepEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708382; 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=BjhHTfr1mROlpEqdEr0G1kp1OMMPs0Q/qCF0PmqBvts=; b=axFUKK5gpk+XC+NoNDh6TPhWmpL7pZbxIuVH4UxcZdBHoBhEtY0dabWpXmbN7bLNMHhQesX6e2Fx5cYyFSYkE/rlnNHjQJbG+SSP2DULKLYt3KGL0Cw9ooz9OUCYVAcCrumtFhzez995TYaitrUUB3cXlr9wcOosq4j6fBqJxcA= 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 1769708382395863.439689052004; Thu, 29 Jan 2026 09:39:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyS-0004pD-AZ; Thu, 29 Jan 2026 12:38:32 -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 1vlVyQ-0004hQ-C7 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:30 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyO-0000fQ-Jw for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:30 -0500 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-81c72659e6bso1169182b3a.0 for ; Thu, 29 Jan 2026 09:38:28 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708307; x=1770313107; 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=BjhHTfr1mROlpEqdEr0G1kp1OMMPs0Q/qCF0PmqBvts=; b=X9BWXQFMTWXElQcZQ7+1V3nOwziZOcg9iJSmnuFRB1SR+FE7U+4iYV1Hq+X+GtILN3 AvwQjwxasVq0wV1ZWaJE3p7m5uTycSUgNOFjFE0wKEqO7obsqnGt63tPQT0px6e/JJvJ ATql/uNlo6vG23+rfZ5oULBhc5RZe+5iHvJ8s7WgWaVO1Frh2c0/zh9fsAL4R9WOIjTK oa6WwIivbqjYbWI+rFE7xsFfyxpOq5YChYMDikJ+hgMnSlfsnQilq0XZRJ9mbk9Q7PY0 RcnQOJvCUg4ODUtn5k6dcrOnfKzv3uqkP2UjDyMl8eEZJmH0371CjC5irsRNg7w78/OM YKqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708307; x=1770313107; 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=BjhHTfr1mROlpEqdEr0G1kp1OMMPs0Q/qCF0PmqBvts=; b=tbO+GuyAlEWRKRD5rdqR8Ami6SNdhVGVsW1fWRC0yTBfMjLBDY/iF6I8817BXWgoL7 0TqxWet4tnK34jBcBDgaqFX3TnIyjliNHUim5j0fwadLvxjzC4FR3vQKq9fET+9TzvCD Jf55Q+AD1iqJMQJ/OLmUL2dGMGS/TeSbkvuYF6ObTWUeD6YFOCnNmG5uVtQLOI18Ih5F 6SIImg1+461ZatIlTMi+gZ/UuwNd7n5FEXRyl3RBL+Z2BloQmNwUXpeA1tKnJA7/HHue 1mT8lBaGZR4Wn6AIl4f4BFWsa6YKnyo84+3KQMtBdwR/4iOAZ9Fky8CjSP0TZuLmFvBf C7qQ== X-Gm-Message-State: AOJu0YyXsBaC5xUcOq0o2nIZ4YuOLzB6wjXVfkweRiUl50SmoM5Sea92 Bh3MejLGyST+KLdn4SZxDgcM6xdWbpDgql2OybO5/LmOiaC/pCYHdoiEepzv8v6n9cPu6yjQ1ee NXlZx X-Gm-Gg: AZuq6aJ4Pz1XJcnB3TtvcRji/l2JmkQctN9w29ItMVMoiQHdgoF4tmWZSQ79g4Fss+8 RTbn22PVDI5Lnd/JG2QWartugZOFe16xDevCMmXbdDk0uv5xF4VVbH/ualm80XOR6O4Ay/n6jyZ HNkAnRP2QmRnjCiKjId3dN4cBELi4pDCSo0sESsl7Nzcbl5WWhBzPkR7y4Yx3djZXp11fOHk6gH Xr8UilbkKf/5a/QHByderZQ2CcKwI/bcigmhfvykpehFXVnPo/qdQVnuV83IkAHzvNUckdPvKAM ktBfXJpbohaA8+pYCupbetpmyNnrrjbqeWJ9Lyfzvbo8zavDRkuKLyIsKKRj+4ymDvUr5DWZFSo q2XMa7jNZCKv+Es/cbEv1YbpU3/hLWDVcnTDB5c1mPDiHnvl2RFm7sF9YnxXt/pPH4BdNAeOgJm zfzg4l1gTZlDOmow3LYMAE54NDp2wV0GqaVpsjAD4sLNHi2t7+jAuBnvWSSMmnqsmG X-Received: by 2002:a05:6a00:4216:b0:81e:af19:34b5 with SMTP id d2e1a72fcca58-82369299aefmr8660663b3a.38.1769708306923; Thu, 29 Jan 2026 09:38:26 -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 12/21] plugins: use complete filename for defining plugins sources Date: Thu, 29 Jan 2026 09:37:58 -0800 Message-ID: <20260129173811.138036-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::42e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708385503154100 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-4-pierrick.b= ouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708370; cv=none; d=zohomail.com; s=zohoarc; b=Um7BSHU9eSnc9BDQ0BSD23zPHmK6rQlkVAsz++0nqFbo+QdLpqU+Ng65y2XhfZ4ODuab4StLn78h0ImxhD0hN9weODvSm7xgLPCdy+EtXY2DNJEYA4d8jAhgq9KB/322FwB+dVsPCAEU7YKqO6QKqdnQRfW3rCW5kAAsgh13IWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708370; 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=FrhEcNLkm/NjrIYqaUvna4D6+e//Z9G8gExH7fNJCJE=; b=ZyH+l2o95H/9YGeV4QfVxSlh5quynOJp3znD4LJiROYjRLR2ZTtqSGkvZnWBi6ityJuDAZt2zNxSwgdFh4mDIbSabBVzdpD1yeLg4qMUJlTpFI7A9TkzQzsQCp1Je07XLBoU/PJMzDq9b+Vgnaa7iQHPfQv78ma8yz+P3SDxzsU= 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 1769708370096586.1997761197865; Thu, 29 Jan 2026 09:39:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyS-0004qP-U7; Thu, 29 Jan 2026 12:38:32 -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 1vlVyR-0004kT-0Q for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:31 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyP-0000fb-8G for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:30 -0500 Received: by mail-pg1-x543.google.com with SMTP id 41be03b00d2f7-c61343f82d7so499689a12.1 for ; Thu, 29 Jan 2026 09:38:28 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708308; x=1770313108; 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=FrhEcNLkm/NjrIYqaUvna4D6+e//Z9G8gExH7fNJCJE=; b=c/+tiuK0VqIw7TGpQ//RL9r9YMfZmfMpmWcpr5XH3idOvPVp4UgEu57+7+6xp1EF3u iiOojbhHHQZVZ0cVSDcFMHvjA9Nibo8ImcMtPuwpcQ5giBYNQvMyP+DU0/+MaaEeuQT3 8HCUXTkelJqk8LemPPxC1l8YXEoRjSApWv8dYwWAZGrLJbx+ZCY68K5D6W63pvI5hPrr v8dGzZVGXUxgpiRqRhbzDUcgP5S5QszTkOD60ovbjPh/I1dG/STJRN9zEAGbEhKaeSdV iKxIvF/utmaufjUvvbfhlyiA/LWN+8eGqpDKpwJHiH2QT13SJj3hg+25Hp0gS4AzVzLi WaiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708308; x=1770313108; 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=FrhEcNLkm/NjrIYqaUvna4D6+e//Z9G8gExH7fNJCJE=; b=tIa0ot64ObGHkkm6ir+/u12W1rsz7K3kZWYFYUId+H7XaKZncYzHcyB1njRyAYpWu2 3AbPoBU/1qoSi8mGplXh3C7NJdSw6NEvFxjtRVa1oOAHwszNw6Q+3m9wLbr0wOIlpc3k JRwEIriuxvdFr6nCpMxxsZmebF62OhHE424kRLDuZovZD9OwdFJKZniFZVb4n5xIFkKK CNwDEXqJVEXsiI8zOx0oza2QRGLGOkxXUzjoIT1ZSM61Pda0IfoPNbudtVbfn2jpB55y i1+nPWCGW+6F2lasX9ll3DQn6xd63aHx6b1VDyFj+FHbgK7IYhvH/AlBqYzHzjFJh3D2 xZaw== X-Gm-Message-State: AOJu0YzBeJLS7+ECX5m3pILC7Db2fZVrM6cN9s4R65DkjHe4JDEuSTwz wnx2fy7p8GJovbQBL6JwX5kHTErPZB7H5rYJKoe/Oaju/gCypJSx0YrVsmpz4QuB4LXS2tb+Rt7 gSAMTlEo= X-Gm-Gg: AZuq6aJMR9+ND37g4pdKhhHal0kxpBZw7TGTuA7YuNyCPmH+FMOdMvjXtnb62UHItrz fnjtObK7pL6w0QrfU8U86hZQCBGUmMQckfAdNjE0PX1y5y3FTMVgAFqwDytmlEde4z/cJtEZc3X 2LA4ZLdKZ5TMbChgKO3szninCiJpphegT1cVapWMBL713SJM+lWOhM9qTMkbTwA6/CkWfzRkrRy r6ge97Fg+UqChmZfcWzaNhwqN/aMR7yFTOJGSDvxdQBjksnsK3vI+HLQP5bI2JMcpM0yHDj64RK U5qsz8UxmRAej6g9LGWrUlerTRcKDqPscgN3WhYVeN0Ix9of4jMEytG+DZnqaTwybtrmeCyPQ0t 4r8yPoEYXIuuterZTI3EN2rEnUFLVb8AZqx/klOJhbrziLw7klyitawMZnFKiIv5PqTxszwxPIz LgDlBlFQ+fpHaR/tHcxGb2uf/1DAtETx5tcscigMLYjVqU0djqyzUuiwiDPzkbNqYF X-Received: by 2002:a17:90b:4cc5:b0:341:88ba:bdd9 with SMTP id 98e67ed59e1d1-3543b3ac871mr198856a91.25.1769708307670; Thu, 29 Jan 2026 09:38:27 -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 13/21] plugins: define plugin API symbols as extern "C" when compiling in C++ Date: Thu, 29 Jan 2026 09:37:59 -0800 Message-ID: <20260129173811.138036-14-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::543; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x543.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: 1769708371375154100 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-5-pierrick.b= ouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708383; cv=none; d=zohomail.com; s=zohoarc; b=jEuZQxQofr9mDMeVAxZqObL/XeiDZQf9wO0nBKxNNjCxqsXDdqq6pt/ol7/Zx+rymCZafrMtRT8Hajuiw/LzN1EMaoWr61UAvRh2MqWbxCzdLTf2JK5fF1mvJRpBJTUduRCjALkf94gd8YJSeZvRdaAQcxARDJeGUXzv67rMBk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708383; 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=InBZElLJ2/mcvIPaOt6RbJMQf2ySklUloiFPz1R6SEY=; b=COYUnSpHd0HxSjNAZQZLv+nNS9Chkoy790PX4s5Y2JUeLt7CbLt5VbfhSQ10GHbkDvBz2dZJBIhnhLgGUAiAcAbdV32ykjpDdO0PTdGF4nHHqSwc6OE8dHfDvf1MDqTPhqCtNeQqfxSH5ei7v831In9/t65MFZmClXaUbQlSxEg= 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 1769708383695416.1974378326388; Thu, 29 Jan 2026 09:39:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyV-0004tQ-GA; Thu, 29 Jan 2026 12:38:35 -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 1vlVyS-0004ob-49 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:32 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyQ-0000ft-6p for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:31 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-81f47610542so751511b3a.0 for ; Thu, 29 Jan 2026 09:38:29 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708309; x=1770313109; 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=InBZElLJ2/mcvIPaOt6RbJMQf2ySklUloiFPz1R6SEY=; b=XdYNlvkYsZldrstq6d2cP23uGgNHAKtkoGRchfV4aPci1lUSmFmG1cQwba5XEK78qq cLe//U98eNziGUdW1DYhK9UdN+4WckzyHvSd4xB55Dm9dMRu2xymtmBNjgwi31GQ4wuz mAb8c8rwgWaTMXBLpe1n4CSpQzHZ9xhuVtInK+caU41lzlUwGjWpSvxCyBITubuAly9G Fp5bQN9jfrvGP8/d07vuy1pgcHu74gDy3q2I5mDfmmS08qxErL5tmZkoZT7sSQZ78BK1 /cnbZvoHQZNNS3P+h4GT3JM5evSQFM0/IgTOhipgKHYAubPOtzZ734+bdZhWK12jDk8m hUjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708309; x=1770313109; 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=InBZElLJ2/mcvIPaOt6RbJMQf2ySklUloiFPz1R6SEY=; b=XOoTv0rpXo60doYe7lkQO/keWWG/4txoKE0Jr17z8K+rNaV8e+jJVIjyZhSaPJJIqp pNWyfDSqi2dPJSsjlpaSjak3fp1UuexIoWanUp4JggBCZCCL8dcpjbxZmph7CXrRY4Oh PBWvdTzslhxbOfZ8gH4t5qQQ325rOc26LiOxGbMBOHUKjJdBqkmQoFtfyl1gclfWdk07 XWYBuWuz6WR+YUXHhPs9YRUJA86HJ6bmfmIbz7SE+Si+ja6JTbuxn/6ojmDC6+Uguu1g QXrvA5Ad1Ou67sjLpyz6cYWjKh4BtP8Ca7HVzfQq9nmT4ip08+DLufb6aNQBH6UOmFwh XS5A== X-Gm-Message-State: AOJu0YyAIs2w1Xkw/zBqAjCYTYZA5LcwYeAVtiH/ZL0PfzVpAUs0iEy2 HDIePi0kh6SaDKFGhqX2j4ogQnciez6Ab1FvHXeoQnZj4U5jPcSa2qwruC4mMUoh6aFVybiMeGT /hLb0 X-Gm-Gg: AZuq6aLU3ZenN9m5b9cPj/YXQpr+61ca59Rp/FRs6A0BvtPRn3iCVU65gbH380haGQr Xwj1uFDnsIwfsLv2uygjKsaDGwfOH3XeMtx4Fdft/F7YK0IBIX8d/ik3hiuwIxALvqWgaDT5Rxl XKXByWZtDY+q9CSh0nABqXpW2aDV6orVBoRJhazLzGUTGktb7fJS0ngqLP2eDXeywN75/eIEbCz gUiC1L5RtAyC02PsJioMAXwp6dpUW8+fk6evYwfgdcSlr+HNjwn7skL7Hh8mcWuz6QD3/iJqemw /eSxH5l4fons2U6wPmUgMzK7sCHiNVKgjY2nBVoSeuVpQwADviIeMYcfmNK8l+XjTKwFqh0bDyE C87rzKSZ75ZtUb6UHLADX5iytxqOkY2KADiiSoq3EA76e4GWKtBArGHM6KVv9v9PgRznMRoH7z3 IvKvtWkiyIlDRw13jXpDYih+XNyHS55T9U6NJcdWrmr4mcukaYsNzGG7/fDC6W6RUb X-Received: by 2002:a05:6a00:114f:b0:823:172f:f0c with SMTP id d2e1a72fcca58-823692922c4mr9112043b3a.45.1769708308556; Thu, 29 Jan 2026 09:38:28 -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 14/21] tests/tcg/plugins/mem.c: remove dependency on qemu headers Date: Thu, 29 Jan 2026 09:38:00 -0800 Message-ID: <20260129173811.138036-15-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.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: 1769708384094158500 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-6-pierrick.b= ouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708347; cv=none; d=zohomail.com; s=zohoarc; b=ODH82MXl10OiAdRB9cQwvAHKeD2kHBmI0/x46s36Rh3SBLyMjQzt1uBOX8c80LFUbO2Vc8+GPtTRJew82bVAzKTewS0plXTrhtVgxVrEaCC0uTdkEKS0jrIjdWZWMm83TRFINdz2MkyOF54zAFcDAtNqjV0gjegz1kpn3e+fRTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708347; 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=C1iWVIWfGVLKilqz3ftc9Tmo4SlNlCW4u2SLlHd8K58=; b=eo2kKQXqVEu3+lbAziQEUY3ptchtsfmqymDa9WoN3PTnHNajTdWHZDByQPNjHrk6lmy5rtJjcBsS7ULmh6pxH9zvi+w9Sh5/XEM8coZVQb9nBHAYjHa84KHUzNWAy64MPJLSHLEKnqpdFBI9kPxlmDG2USTgKN0afRJLMWlMQiY= 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 1769708347507489.603581640842; Thu, 29 Jan 2026 09:39:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyV-0004tv-Uy; Thu, 29 Jan 2026 12:38:35 -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 1vlVyS-0004qB-Pp for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:32 -0500 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyQ-0000g2-QU for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:32 -0500 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-81ecbdfdcebso731339b3a.1 for ; Thu, 29 Jan 2026 09:38:30 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708309; x=1770313109; 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=C1iWVIWfGVLKilqz3ftc9Tmo4SlNlCW4u2SLlHd8K58=; b=ZFrL2bbTzyE8Jxhot1NNO0Yju/kV4oAlvruzLC3g0VyEcvEayTyqk+pnyx7PSlceuH Ct0J7nHahVbSfbRDDfw3wZNqwX4j8he1I2avKX137QGiaKK7yJOaCaF6qE0m1KlSSOeY xD4u0JfCzrZrdRO5njTswKIO85QFbzVzuW/M3XH4EsbYwWRKPYJWAF1iAQwrgpq0f8R+ p0UJlOSVcLIUu8a0c5/uVxvfANOVqJA/GNXKpPxu/k92NpYQ/aqUnMWD2KXJLx6r+S6l 0mv3PDasRP8B/IRZusN1sfm7SgqxPEiUc4IDLttbmiCfOTCOatobLjVYoGrLyBoMK1yL 4uBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708309; x=1770313109; 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=C1iWVIWfGVLKilqz3ftc9Tmo4SlNlCW4u2SLlHd8K58=; b=GYbFYPvcGp4RHJG39LA8RUf/CQxWidr3Lgz2AUZHpLO0Nq7pQarnATUx4Fsmwvf1Pk V/kqf8ug/CE6W6pguEr6glcv8dn6QjCQ4UIPUW9Xb8iMcXOYooiUVdGcanI/r7Pa94D1 0Wwj152SYpwK1qQKOjbpetBSog726QjBXUOH1zw4FNgS9EFbeI86C/Uy+ingnmWfQH8N k7kRi4An9Z3YUMzLH4F+mXAT9hJhy1q5zaBcSAl70LRhJxhw19aPj1YABBArIsQBuEfi xcBDrGwfanv57hrEgpBImcNVUtZUpAfj8j27BXfsaqGh8PweCj95MXnCAbeyg3JnZVL/ cXpA== X-Gm-Message-State: AOJu0YwaLvKGBCP2DHV+BpsSDMXO7EAzPkf73FuOrt1Bcl9ePvyLGJTx Ed3l0kmw5qKQujtvw/UTjuPJmJ/gaxyAXaCRJgP8nlC8wQRwvLfoTBDQyEqnBO6FdSE7GCQ7R+c ggtcF X-Gm-Gg: AZuq6aJRRupmAuqR55ud+f3ij83E+qJjlJaiml0WoK184HFTeWozrIJIsEOh0WXaOiW GkSjtb/MK2o8tbrqu1wv4SAuDERk+DJnXV/463kvt7zK2rPmxcNKx9ulkFTZ3Af8bKVyiQ53krl LxfPrFnX4NudDk1Lci3DW02atf2DthosHgZiJAqOPSni4q/9V2lE4dh0IR9bthrdN7D+DH07SbH fCM7l2DuBj+YXOL6WoDYbLxdB+Iuin1zlHYVSU7oZ550qVIlZ984JSWn5KMdn0qUBefLa4+3qJr jr6WhgoQ1xyEOQZHl79yFWYHoc3tW4ASFcdl5BOL0SUa7yTTQjL/dd5odaGaRsdddmfTAUqIbzs T6HN0RK+gZa07SAL3c51amdTdsbmMaB47ZUWJJJ5tOLa/SueK4zZYlPJKD9hyQC6iA85AJmvk1h ZKnDOCscJ1Y+qTum9CUAFxGqWFyoLSyQfrVGn0pReUj6c3u1OZObdMQWTJQzEBGzR3 X-Received: by 2002:a05:6a00:1252:b0:821:8250:8ded with SMTP id d2e1a72fcca58-823692ef096mr7154793b3a.65.1769708309385; Thu, 29 Jan 2026 09:38:29 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Richard Henderson , Manos Pitsidianakis Subject: [PULL 15/21] plugins: move qemu-plugin.h to include/plugins/ Date: Thu, 29 Jan 2026 09:38:01 -0800 Message-ID: <20260129173811.138036-16-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::42a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708349060154100 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-7-pierrick.b= ouvier@linaro.org 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 82e0188b0bc..23252afc7d0 100644 --- a/meson.build +++ b/meson.build @@ -4446,7 +4446,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 b74a7d0811b..ddd77bd82c9 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 Tue Feb 10 08:05: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=1769708373; cv=none; d=zohomail.com; s=zohoarc; b=L01BuVjMA2osmZxfv8mE3qb7bQf4Ax8D0yzV57IxPS1iCtl80rx09ksNQGXcWH4zfGwp0WXQ+TeB7Kv3SdyjSU9fXFw8yKVWHhibHDMdj7VS1KMi0eQr0Jut76R1juHV/es1BrJX/xrnQDsrV1FvUjwZvFSEEYEPlVVpo6lH5NA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708373; 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=v5uxG/Q2SM3Aouk+ewwF3GM6TTHW2fcEuokwAO/vUYM=; b=hZMpn5HWXwGGxIYEWu1Ng9xYFOAkKJM7hFpWgeK4B9xrAWV7CMeqGbXr6FtSp7K+HilGW+XgPstKFwxlQd3pB0OabKHSeTrOsJX7SorexHO075UUTelmqfcuRWzNwt05e3ONQatrUXMjAkxoxPAZFg5nqvcllQbKSuXPO8rG7IA= 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 1769708373198441.86369710217673; Thu, 29 Jan 2026 09:39:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyV-0004tI-7K; Thu, 29 Jan 2026 12:38:35 -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 1vlVyT-0004rX-D3 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:33 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyR-0000gG-LD for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:33 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-8230c33f477so618450b3a.2 for ; Thu, 29 Jan 2026 09:38:31 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708310; x=1770313110; 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=v5uxG/Q2SM3Aouk+ewwF3GM6TTHW2fcEuokwAO/vUYM=; b=COUJekAy5TfQAwThLw/6bSpuKYNYOsbocJcpp0FPfZbwGHVlShFPESkJOD3IxikHB3 VesF5fxvpiN7XN2l0M2FiQ/i88qkdp0eY05ynjIKR2UEqJGr9E60uSqEhUgyedctbPys qig5vjtf5zIi2rHybHunXzRjebA9TPxGdcLXuDlCKs5l/SBpcCN/ij9/mpPLkE/EsQ7p 4xFuQeZtL0vSpK3Rcud93DeGesk5PogrjO4Yb/xhQk+YXNwkPBpOe7lfMIr/e+npgE67 4PfUNqyr0oOnSeIY4HJFVtHmRi2XvO0p2BBc3viHbNFL7OVb8M/XqTeX+5oAsNbd+wKe q9xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708310; x=1770313110; 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=v5uxG/Q2SM3Aouk+ewwF3GM6TTHW2fcEuokwAO/vUYM=; b=b8OL0VoF2vJ6augO+4789ghQHHfXdASAswz6daIHjb+xV7cmAOSADQ4642Outh0KcK sSCtD8xf9EsttwmFggNSyI9Go6M0AZ7xPGXpD2ZsqKIpYaqD6sb1rqk2LtjXkwJPvbBU 8Ae0+6e3ELM5WIGyr2eIs/uDjr9tEAP6eOAnGmWPCjFgjJH7qfFiI+FI1TDTZpIDpX8a sgClr6o/1kwJ0qZdTiZIU/iYK1Nc/SlEZ+l8R5SUkqhvg8Vk5dV5sqnz9urxjZPv/PhL 47hgHBXrkzj5QaBtd6QZayyvWuX+scH7j0wvTvcMuLAMtsZlizgwARbF8EXzdon1MNzi 3ZMg== X-Gm-Message-State: AOJu0Yxm4rFLromcR2ArnMDUO79KSTgTpvybFNnTcZkdgTypFNlCYcoX qlr15LkCVhcdSMY8MZBYHMwvaxV065VCLSYuYvD3yyQWbTH9QPtFb5kMP5YQOTVgSrdUYItEqWp QnpWQ X-Gm-Gg: AZuq6aJNb+NgmYmKYxyea5zXkxVPmiSx6bxmub/l/I+kDXU43+tm2L+AZvLyIWsvImy 4QgT7mWk4Za3kSjkB4MKUyuqrV/9Vo8T/7mMUjmBSGyQ2Zpz04flkqNy9vVkPAZ03HopDDnMyen 1tWMToUiioK5Xm3jMJ3CCI4rEEcPPqO29XRIGrx4E1hA1KAmIaLXVjxG1bnC3e+tPDl7OtuZSH7 V+SFFh1WJb9fGyDyhi6TmULe7vJ4lPdPwY8VsIPbu8GGHSotm8CAR72Xu1wRVbtr9KFjNVsQxcM sjecjXS/bXDbHyWcSgGg9bMXevtebEvPeRxfhJd2bDw+1aUYqq6bYZ1UeCbGKvK+M5I/CvNY9cl jF2Q2fjxUWhpIbKyAFX20IRQkwUZ0Ce712GdW6qk9ehUZzIzUZcBwCV7yQW8LG4fYNOxfjQeVbv xOMb4LVEuJ3yfZSsR0F3n3dJ/pU6Mr14MTG/aV9oZnv4pCJyq5FUTPWU0psajSjEjL X-Received: by 2002:a05:6a00:7607:b0:821:8569:7f19 with SMTP id d2e1a72fcca58-823692ee7bemr7265995b3a.59.1769708310300; Thu, 29 Jan 2026 09:38:30 -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/21] meson: fix supported compiler arguments in other languages than C Date: Thu, 29 Jan 2026 09:38:02 -0800 Message-ID: <20260129173811.138036-17-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::429; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708373989158500 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-8-pierrick.b= ouvier@linaro.org Signed-off-by: Pierrick Bouvier --- meson.build | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/meson.build b/meson.build index 23252afc7d0..ad8550d9e97 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 Tue Feb 10 08:05: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=1769708421; cv=none; d=zohomail.com; s=zohoarc; b=AtegORG/REYSJLt341Tmc5rtSOxzzWGWAUxHgTDYueXf2OChSIf8iq9o08g9BR+nKCVxuW/0sK987sNyQuEe3d/OKok7pZyI8NtslmNM9sAX+pkRGgasaC8gge7w+mt0fPKDDvPNEISdszEOJ4EOBmeAblYmWMT3YB1sEcRmkaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708421; 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=OEbiu3ITH77U1iqg2asi27fIJJqEuaVmbpyfWlkTbSg=; b=ZcXIOCr7AHGqkX7Cjo/ORodC8ab/DKNsD7fjSQwly8CkTaMx0At7ZwJF7dnf1pfMuSGa/Bs1hb2Azlbd5QKEL8c0SHSU9PJ3Cjezr7adY4AG9ibWepP0VEwIxbvVmxTa6hFJlXxaPDtWzh3Y4snQRiRr7gQJScf2hrgQ+2v2+zw= 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 176970842194744.13135446067747; Thu, 29 Jan 2026 09:40:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyV-0004tf-MF; Thu, 29 Jan 2026 12:38:35 -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 1vlVyU-0004sl-Ao for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:34 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyS-0000gR-NW for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:34 -0500 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-81e9d0cd082so1020373b3a.0 for ; Thu, 29 Jan 2026 09:38:32 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708311; x=1770313111; 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=OEbiu3ITH77U1iqg2asi27fIJJqEuaVmbpyfWlkTbSg=; b=NE5K/Kgfsrxg3o9DmgJ6MRWZtIEzSZGJ7MdtI7whf9zidu2WMnW8PGQd//s5K8GZGA De4wOM6QrWSWFtTKDN606ncBBKf+nrE6AfcX/ivTKPyPe/hc71oLarc73g7sGpQWsj67 04/1xj1SNZSI+W98L1+q6dEuRep0URvATIM8sEUB03VlS5y0vK86VyJIyh3gXWP+dKwB nEK6Yo4MP0vkKRbc+vwdmm/nxEKdEg978TSDjhdSZ7R/39RRrDVrgSZqxNX6biCSsnh+ JvhSpzAjano5i1EKarXGvfzmGU+vJHiZ/uFshhrF+xN1+F3rlIcVURATAFMqs1RJrKhy qYSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708311; x=1770313111; 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=OEbiu3ITH77U1iqg2asi27fIJJqEuaVmbpyfWlkTbSg=; b=kpHWWGXMzKtUo0Lq2yYyjzipBkoBZTVaHrX31Rvz7CEDI/eKEtMPkpZx4YHOWtwFvE e3u0g3XH3cOHy2lXrz34YtkQM4s85UrtpYYFxIEBTHyoDuqj29trLnQSWJHyiHk/m7VC ACktsoZftnCqnKtfTzosEz3aQbRS1tgzDfHBGnvse8cvlxoIimi4x1I9BrPHLZVlMoqH DEaimOxwdDXbe9lFE8fHh54MjP9RWapz2fzeVaOwt7SMi91iCnxVYElJKneZghRiAhLS AIVbUXbEcKuPBneWmYciTJKUWtoBSpMu8bNhEL3jG73mjODsgDumuIx32vd5VolLmtgx cuZQ== X-Gm-Message-State: AOJu0YwxTE4wqioNK+iZIs9McnbFAICwOQLmMvB2ASCFtePnWtPGhrjE +bd+xwMcioNObkjKfWkfvGqpkm+bLBYhYG7zMjLnLSkSej6t1VuTdqW3K+NY/tpLuAInfFNSSsN 5y1Ab X-Gm-Gg: AZuq6aKXIhAM3/ffIhf6DYwqet+n1NOC5F3VPAg24Zj1s3y51tJ1UPG82amKP+taxIK HgV61gxL+BBakoti32JRl7qAnqK+u9LApkKL/61ATU0o5P4cg8XDXcoRvjEQfnjSQyOdymLJq4o Btra2yXRYlDRFHUQVip9iY8kbZuOO2h8vH0/hfVcKHY0WvUr0lW4TYXfbYnKASGU6jYQXjIVrGZ DTyrx6IaLM+uVXMTQAB+PLiU2c869tsfIWaPbmTIrVwPv2OxZbp+0cDgkd/BRYE4HExBTmYRIzd XcZ1qTbmMMdkgwd+D2pZ6VJlZ8+P6ccSoxYyikB4AUqt4VWZgnapTLMduCpJT5T/uiI8fbnb3P3 6iPW04icHxd4DzTtBDG3yNHTq6ZAtq9QrHHFNt6SKzm7mWVUUkh/boWNevOC6OFe9urdo6+KjlF qdkBgp44Yb6p/UnOGa2ftUW3bGKkRRV8Dsd1awaXptnTQ8ZXNpUl+lnZcIANQGLuT+ X-Received: by 2002:a05:6a00:17a0:b0:823:1580:7914 with SMTP id d2e1a72fcca58-823692d2efdmr7982192b3a.50.1769708311053; Thu, 29 Jan 2026 09:38:31 -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 17/21] meson: enable cpp (optionally) for plugins Date: Thu, 29 Jan 2026 09:38:03 -0800 Message-ID: <20260129173811.138036-18-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::42f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42f.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: 1769708422273158500 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-9-pierrick.b= ouvier@linaro.org Signed-off-by: Pierrick Bouvier --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ad8550d9e97..149655058a9 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 Tue Feb 10 08:05: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=1769708434; cv=none; d=zohomail.com; s=zohoarc; b=YKJxaAz6COw34f1sC7dqQXP/p1knVUBo4O0WY2pd9xkRy3FYFEi3r5iUcs+loHe+xPFqsACUMVRkqwz/NaVWOHM2IdTLjgrz2BtzGGf1t4+z/RmtI3h0fBWUKxtVu0GlrTbkjXtOYBK/JbRgQDCDFOJyLx/4liLa647KWj+T9hg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708434; 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=9iHm/DUI7LqRSDNNFCJrzlVWDCQyVlRHzHTsKps5Fks=; b=ItvfcG4/gLOFl42GsON1e0u/oPfxoWTSuoih6tYG/8nMUaaTwOqwfuxpv6zZulY2Lv85xPQvS7sMrQnH4nvwZSpYc41gKr+NC42hiRiPQ2DKB8uHXMmEPwapa+ESdmkjfuvBOdDBOfUNhK3T8KHm2OiOviyDcIRdQfm/qCqeitY= 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 176970843487034.55950276468741; Thu, 29 Jan 2026 09:40:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyY-0004x7-7Q; Thu, 29 Jan 2026 12:38:38 -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 1vlVyU-0004t9-Ty for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:34 -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 1vlVyT-0000ga-85 for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:34 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-29efd139227so8032345ad.1 for ; Thu, 29 Jan 2026 09:38:32 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708312; x=1770313112; 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=9iHm/DUI7LqRSDNNFCJrzlVWDCQyVlRHzHTsKps5Fks=; b=NcGs+uR09uOKCEk/M0jGteg6GrZDqXf86RPvA/iMxFaWNveVJXzvtmJ24ZUR9oHeJg DlBRzCI8+HFhtXP1mDO63QI5iLoWqUoRf2OEqlh+KEFF4kPwcXqQOEmTCmbWpYdw+bf5 lpTbi1rn8dB7nmuX3m8UDnRjtdKCWLkg5cevNkb0tDGjP/WblKiFOfTb6pp53EtqInt+ 7rEfv76fTahKoMZpZYiHpf4XuljolJIAsz+TviyaDaep+AvwYdSrBLKVXrmIqjDSWdqs UUAzZaA4QsSEYsXYY1p7/giE0WJDYKY+cC1jaceJQ4qlrAWP+RhbrCDkWby4C6hVP37n qLsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708312; x=1770313112; 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=9iHm/DUI7LqRSDNNFCJrzlVWDCQyVlRHzHTsKps5Fks=; b=MxEw7wayE3vZIQHxyNGbowOfK0XT5lS9nIn+lh/hJGHNnSAffzYUMnpZm4caWlMhnB 9hBdKWhuKn3Qz2oCabsM8doV60Irojz9zN/hxxy8zpa3VjHlV8eSi4jF5A0tXBHiG4hS wruvLbwjR0pHGIjSM0iQxODfcV1tUlwcqi+3zOsIZ4eLPyA576gTiFBnH2aUq/ShLLRl haJHMPdMK/t0atfQFTH/epW8/pmwzZDXsMdzOGnrMqj1tlXz7Pdi5Nc2ioYE0fUEOCQ2 xj+gN1E5Uz7wjmXksZ2ssZ1gXKxD39WbbsM+2z7u8hO8z3Ue0oZOzj/4OSpDxpxAA/cY ydog== X-Gm-Message-State: AOJu0YzTrQvyuPz2rptp/xL6t9tLqNLJ+TKgCRJq0zN1KPgJE5jHMzs2 k5I0gJydw2NlT4uVgkM+3T5Op/eLLBcJK2LEDJEYsnut2Xi5dT9DKQE1kCPvOTRzzdXwJjYI/7X t/1wW X-Gm-Gg: AZuq6aIox3tORMJgfDqevq/8+HziuWm1LDuWejKtY3ODkrRb2yRk57NPOXee1Io7u+4 Hx7slCx3f0XOh2xf65bZpCSkNwQPKhcqHFlcnOk5ysXi2B5OV5gENEaxfz+Fqh5Kl+cJ8Tmo3PP RJrT9I8s28pkFpAX+V7UbwV0oBGeo5W3NmYD7kxZQ6ViIVC9AWmIR3aXbXlqW0mYJtfUIXom5XT HCfYS5ypjqAbF64AJtrnd8hGNUUOHHsj5shw/MQMCKgYwao6iGT612N2kEsPd0QUlF7Cndb/vtO CRGfALa/VpbErJWwJrVi8JPiaWiDTN50N+jflBiPNoKlYA7TutngrHdXP1uvCCUtFomsAtbxrQQ ac/0uQVMpqrQnzLFX3jwE+mxoKk0Xy3XH1wmySpX/pkdj8ke6meu+t5mTYpxzdto7PF9/5t6InF JT3gcyC3pQZQCJPF6gwrSNF5dpP0DlStUm16XYxFAn5d6Wtn6x2ISPSc+8BJHIA9Fs X-Received: by 2002:a17:902:f690:b0:2a0:e94e:5df6 with SMTP id d9443c01a7336-2a8d81818c8mr998345ad.50.1769708311793; Thu, 29 Jan 2026 09:38:31 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Manos Pitsidianakis Subject: [PULL 18/21] qga/vss-win32: fix clang warning with C++20 Date: Thu, 29 Jan 2026 09:38:04 -0800 Message-ID: <20260129173811.138036-19-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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: 1769708436370158500 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-10-pierrick.= bouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708453; cv=none; d=zohomail.com; s=zohoarc; b=iBTdSeGoQok52YTgUezuWHNtPfNorR1SItByE0mfKne+LgKZY8DoXHWCfuRImilAzK8MIg1NPiSj6G6IK2CH9WLH9s2EAubDmhHpkrgmAX6XoVfAx0zLM5GbDdFUs4Cno8v+IPfNXxtOZvVLXe0pwyWfRWbxWgqm2hac9aRS4H4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708453; 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=9NXpbQqzZXg6RDvTPuhPR+5gSP2cGuSgQ3VkVvuuuIs=; b=XT/Q158C4cskJEMUcZEvipzM1NyuwmkxBdNc0lqD7I7y2CWUlHgFJ31X14nw6EeFE9hvz3SwvlbFCNb5By9pYV8lzTBMllRkLd9s0Jw10YECVinDR1pQM13imi90EhNqyssB4LOVhaGBTt+lrJtygckiteeETE6o2FCMKLoNRGk= 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 1769708452996900.340066676048; Thu, 29 Jan 2026 09:40:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyX-0004uv-5E; Thu, 29 Jan 2026 12:38:37 -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 1vlVyW-0004uP-5a for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:36 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyU-0000gu-7N for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:35 -0500 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-81f4c0e2b42so716832b3a.1 for ; Thu, 29 Jan 2026 09:38:33 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708313; x=1770313113; 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=9NXpbQqzZXg6RDvTPuhPR+5gSP2cGuSgQ3VkVvuuuIs=; b=e8c2LMJlvY5hipvA6t2ixJFHF7Pm+r/1B04EcT8VPiQctdOgZG0TAZP1iGgVSxYtH4 uVWpoKde//VJGQL4/3nDX2oHFYWSiBHYEg9E6PwkQl+mzJmxCPNCpt28AhR7/E8oJvUZ qL6NRsd7RpZezzShK1yph6xIcQlruFC7hVuuYomb2b6yRKpOF8jZCiISMzOJulRQqnhB HRB5bMy7dOEhoSj1dGiAfg1bElRPNHDuEue+PdHkK7Bilf0onvyO9we8fMnytT+dwIXf n70hkqP/mIhET6jn+Y4vds7ELNwQlJWuiCLEYFUvS3bVPYf+IHlkIZffLTbpz1n+0sG/ FUww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708313; x=1770313113; 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=9NXpbQqzZXg6RDvTPuhPR+5gSP2cGuSgQ3VkVvuuuIs=; b=kd4fuBgV7iFtl9Zc6Ud/DMWMq5bHQ2GIV465gcERGbuEzhikPISLPgI39BSaic39c7 RhutO/K0yljMQ1pSzI4Qh5Vp/4xICQ2dKNuLRIdrS9VUFzhgcuyiO8nhO5d+1qcAg/qy RzdqotgFBXaSOm0b2xYp+PgWGE7MluytRgkBm96t4xsiRd3yF236CIGB+NC1McMKi7At etqCfM+Wnecm/Nv0prPj0fdj4ye6rM5c1pcwFARlCDcYkXSr79t7tG1TfIsj6uIy+pyE 1DhTx890rVmyWE0PVjSgAIuXJ+OXWGISNeX/dWBYFc3ILyyCcPBnxyx592QdBlSEooyR ghBw== X-Gm-Message-State: AOJu0YybcKGvu2qBDMc9cSQmzCLFuJNvo77I2lrDuZviImV9Q0Pk6+8l ZWE3ABi2C6rVR4HfOHdE06wAFARfBC1BoDr06shUhIUFJYTlWVXumseJzFIpEcGvP3fFOlOa5bX 9UZw2 X-Gm-Gg: AZuq6aI8ASembbpeVKEgoUSaf8yZi2y1QugZ/HYDQRJ26bbrAY2GlR+B32EceysbzDB ZrUSQ79JWOnOMqlWcf4ZmiTB41Sw/Afm4NAG/J/98Q0jnyHpKVMrIS96eF0NuEMmYJSeQgUpdP2 KGw+af0HotQcrN9EL5JVi2N9KaMxepTvizRWo9FWTJfPbAA+zJHNVGn4l+ODxrVRM4c+yUx3BAT TAxoahuo0U4G4/B/TJNWRuVuRDTn1dj0RjMLBJ0Y5ZMCB6Pqxi728qmyAdq5gEtlqpEWauU5HWv XEr8rqG61HxtxYP52iCEjzFydG4fWipiR1j2p2HZjk7tGum0JE+HDQrsRLc/3yAf9gCNY9/PFsE dyam6h0Zy5eVyqNGTTzHn8k06woZtRrpHXyE2u+70jBzo9Ul94kpafXppQ6A5ieQJPB3JvtMcYK HgBuE0rQvdAA3D47yXfKiDkpohG5UXSeTa2J5A/bMYvpW+rdbpyTDvq7PLa5B3jpWg X-Received: by 2002:a05:6a00:2e82:b0:81e:4476:f67c with SMTP id d2e1a72fcca58-823aa3fd494mr158810b3a.3.1769708312658; Thu, 29 Jan 2026 09:38:32 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Manos Pitsidianakis Subject: [PULL 19/21] meson: update C++ standard to C++23 Date: Thu, 29 Jan 2026 09:38:05 -0800 Message-ID: <20260129173811.138036-20-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::42d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708454364158500 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-11-pierrick.= bouvier@linaro.org Signed-off-by: Pierrick Bouvier --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 149655058a9..8c6c0a9a32f 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 Tue Feb 10 08:05: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=1769708380; cv=none; d=zohomail.com; s=zohoarc; b=DbAFKW0V5AzIWeOTXadA7LT2iKJ7c97fqZhdrTQQbawd8uokiCwy9geSL8Yt6L+MklpwzOrcxoFoLrkJf9qrcanBGUoMSyYqNUenwt+iu4Xx9ZP2twA3uJbTK8MABdCgAgME4Gjc08nWXRym9pNT9xfzICu2lBKcFWeNpPERICI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708380; 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=EW/LvKJOHjch2/WO8HxnWJSGnTjzN/LRcA4NPCUYnkE=; b=iD6EHqsoCdE70Wlb8JD/2NATqkjfBF4XIwwZfKbKZzvjBE8o/mYJztowanMF5xggnHQXgeprGFuhGFw0BBoFSG9U6cHefv0U695wHlEJRCmKHWLKdbDCaT7T4Db4yAn9sidLKe4uX4X07qFqYTOu1A4WujIkYmeMVUWjro1tqNQ= 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 1769708380546917.4795643092835; Thu, 29 Jan 2026 09:39:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVya-0004zW-FL; Thu, 29 Jan 2026 12:38:40 -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 1vlVyW-0004ul-Mc for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:36 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyU-0000h6-SV for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:36 -0500 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-bc274b8b15bso749220a12.1 for ; Thu, 29 Jan 2026 09:38:34 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708313; x=1770313113; 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=EW/LvKJOHjch2/WO8HxnWJSGnTjzN/LRcA4NPCUYnkE=; b=bSPhYoR737VwwA8eECR56E6JPKXpxTD3T4LuXWepCMlQqKlw8SJYTle2VLUVLK4/qq UW28eViK30uzS8N5KYNmk80oy9Z+BcHaVhFsNO1ZtoJODnjLDPki+OVxecSPUMSNUTGM +kC22Mu8abaNqSfUbtmVtW02Td7Q+3MF7c4mZd+FGAZk56XIXmwzc5lWSU9rP9KINREh 2vonDEdJH9OMdaAiODEe1YQA3FFD4KEAIUgx0N3QWmlOkFCSo29HL+sCz0BxSdEJUn4n lecHXKvaOttW/hkAFSQiwHelQHRrPJ28e/SLbQUfWJucZ2H44g6xxnadc5TI4frNX/l8 jEuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708313; x=1770313113; 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=EW/LvKJOHjch2/WO8HxnWJSGnTjzN/LRcA4NPCUYnkE=; b=v9aR8VhwVLdQp7kEAU8oxcrBw9SwnJxqs9ypclvG8zYhnKJGKgHYxHzhTvAPuuiD9n +luG3cZq7RsreEdgwm+YEmRYMcd552ZH2mQkSSLHguI6lXSixn4b6gcydOo7KTU04DD+ O8SfYKsX63IvI7xcLaXgZu4G8Y5grlQMBGaapAjVmec0l5urvqYVjzD1vIIPWAuN4cnA 4IGvuMd03rLmUK2EkEFvMp5ymAgvbWqiyfB3HyFUc+WALLEf1ISmOwR/9eeQ/Sztsmm0 mtNq+a3MbYRFtmvG4ei5Wjf6ldi76F76UgB8a87CeMbdY9I4wS9O5s84OVGyXVni+5jr z+Sw== X-Gm-Message-State: AOJu0Yw8gWvcGYKpywtBASiklW03IEJTjQX5q+Mwnvsxtw6zZSR4UExa IhOBLdzbTqAF7Ok+hHdj0Fv9a+0IVfoXJmmDkevkH7u8p6TECtvT7jwGZ05wwhP2Ra8ns6id3Mn HI8kl X-Gm-Gg: AZuq6aJaQsfFPVwonLGPMszznxkjc6Aq4NBNVCsvYB470ls2OlFGR40HOsN5vxpVPd7 FYw6rRb1vNK6PkoMJcTXNCt0TLT8MF5pz1vw2pJ+B0+tLcBDdj3unD06QamHB6LSC4nSVVr745C EiRym36jY6jpACmK8+Z3PCYQZOJrXfXz8M/poCisQYB08fnFtPqlXROwcF8McXmWiYg+qi6tyfD juVtz3BN/eRAUagf3v9MusBKVEXQtg8r5kSiy/kk/pecdpBySs7WBj1qMJVNUIINPbUMpxa5L7o n0920bHowUzo4RsP5SedfR9Ux34anUtk1K/dYYiE4LPdXWrRD1gk6MvGkmuqKxlRh9T3X+xhR12 0zT/zYOMBJurUsP+jOAgxKzZfw7BkShdYA800g2yi0kr1Evf4t6E79RjqPafZPlxNOTmX8aqcaG UJKL7ezZkx4EXQde6jJUR3nkcCSEyJAwyh740JSz/x6xcuNBB79FfmxRLGKIfPW744 X-Received: by 2002:a17:90b:56ce:b0:341:ae23:85fd with SMTP id 98e67ed59e1d1-3543b315807mr218091a91.11.1769708313392; Thu, 29 Jan 2026 09:38:33 -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 20/21] contrib/plugins: add empty cpp plugin Date: Thu, 29 Jan 2026 09:38:06 -0800 Message-ID: <20260129173811.138036-21-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::532; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x532.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: 1769708383557154100 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 Link: https://lore.kernel.org/qemu-devel/20260124182921.531562-12-pierrick.= bouvier@linaro.org 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 Tue Feb 10 08:05: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=1769708450; cv=none; d=zohomail.com; s=zohoarc; b=lLoYcOsKS5xGteP+rS6XQfyK6IgNuyhFOHp/JoogQNi7f4um2F9Gwn5MKytsK8UL7HSkYyqCURdCcEa9409LiDMRvl/v6fyXfQLK1SZruv6Ii+kOLs4Au8w9EYoyCq0bcXimnwcXAHcqY8vjWFdJ5DyXFxQ9SQFHfEkTJjlseJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769708450; 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=5/5IKoHT64XA1F7ETwTeOkylihtCoRO0y3JBUjlvUeg=; b=c16iU5twAPAQVyOHySB3LTgT0SpkbrA3nYpRYMe8UwMHEccOnFtASrtE3ANJMP1z2U4aieZiI+XvOl3DQBzithUXozpaPRMjlN5gS+4fBH+8VHMLiwVl6DLgIcp1w0vGPv9w+aScE6akBsGsk/0RPxBNzmfFGePsivpmtVgXI6Q= 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 1769708450837863.1427033420853; Thu, 29 Jan 2026 09:40:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vlVyY-0004xw-Mj; Thu, 29 Jan 2026 12:38:38 -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 1vlVyX-0004v9-7T for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:37 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vlVyV-0000hM-Is for qemu-devel@nongnu.org; Thu, 29 Jan 2026 12:38:36 -0500 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-82311f4070cso888459b3a.0 for ; Thu, 29 Jan 2026 09:38:35 -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 d2e1a72fcca58-82379b222f1sm6706246b3a.7.2026.01.29.09.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 09:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769708314; x=1770313114; 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=5/5IKoHT64XA1F7ETwTeOkylihtCoRO0y3JBUjlvUeg=; b=huefIt3qmn10tPnZ/sXHgUfiRTjYm8SLlcMqeK3DALSJ17VWFrN+a7wO/r5xICdG12 3unHBYii82GgfNzsApyBzKUA9UGSeWk2Uxh+5t04VIAQzxqu5bpQU41YUVeJQ+KosSg0 jmWQ2EHs4VNB5yrZ1ieKPSxLCk4mHOaFvyUV8bA7E4OwPPYu25yo3TWYYp9MTi75qP82 6KiiEcspxCzTwqzx2C0x73bZokGWhDElgMzAAtF24eENXBenrRFCR73saVKLdajQznNF 1nIymteHrIh2Pn6697ez5Aa+Q/cqYg8sQFygeZ+8pRF56dIgwCWb6gFAvkJCEvs0v0ht EK1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769708314; x=1770313114; 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=5/5IKoHT64XA1F7ETwTeOkylihtCoRO0y3JBUjlvUeg=; b=mo6eJKSJld1/NpAYhcOrK13GWlNfYRbyL7o4qOQhRSklAH9JoZXuuCIsyAw2nBYsjR 8zY0/jRj5fFgca3a4JytWgY9eXwz77t3eV/LDZeV4Yl72X7d3/UR81Q5eU8ualBb+61X 4iYVNEKhUQ1+4d84Rny5g2305PvqgVc2XiwtbN0VISh6id5EYhJ1zxFLlQtgb7ZQc+mc E/hMzOvnGtir6OvXYgpZH7db1hSL0Uv5EFgsZpKh8lsDAJ5yfOJwojcDsADn5xmVpEEq 856tUhAW858OHVxjXlT0uLkTMDgKZVH5cwMSQGbq8XWhS0+bu7+1WMgu84erKJgjaOvf 4opg== X-Gm-Message-State: AOJu0Yz2S3yOcY41L7WiOBWXUw1IcHrdc1dhWzAV+4TgwHNTcZ6CNsT/ wdL5IoVQDCiJTjEW0ow/Xtg/PaZ5bZ/DK9krabiWEosj9ikBYBy4068IfRywmQ09JwmSorYF7BC dy0RN X-Gm-Gg: AZuq6aLORJo8qqbP7qs+LMEIjSRVO/VtCJP7SRlzisX902rxo2Wvp9mFyOgT3bOyLiw oZyLaqOTptNkfI2lPRLqp2JOqytwiDAiTyqgcr2JvTwv6IpNNFqKtS2Z9276DSHRs2rsNdFFd2a ng77yPBZO55RTtZeyrNYdmJLbXsR68THC4C8ILaf4c2YuKQ54OeZE3RmcJh0eiG9p3hWhlWmpLm KwEc6BzHXgjHRd5B5fSWG3kS3qxAOLEFbKeQEYGqqHCeXef76BPkXTFnrFVVkIbXBJg9/3Ym1OI 70rAKJW96ZDmLVIpVeN1T2bs9lUJ++tSlrXwGtGuIJes/KlfMxXcx8msu42L335K4Q1fAmVHC/p NDT487BPRAd9VenAKNXyQPc8KZgTKVf1N0q62S0ykw3hFeP5O0LvIX95hSBfdd214HHrPI7psi5 RwYSCxBBpQ8FKXJ8zUfOZ/Vh03vZa4+FmgR+4we15q53RQZjGe47hmtSJ+xzcs76fL X-Received: by 2002:a05:6a00:1f03:b0:821:8ead:3706 with SMTP id d2e1a72fcca58-8239201d8edmr3586819b3a.4.1769708314012; Thu, 29 Jan 2026 09:38:34 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 21/21] plugins: reduce source conflicts in plugins list Date: Thu, 29 Jan 2026 09:38:07 -0800 Message-ID: <20260129173811.138036-22-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260129173811.138036-1-pierrick.bouvier@linaro.org> References: <20260129173811.138036-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::429; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1769708452335158500 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/87cy2uat5e.fsf@draig.linaro.org 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