From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552374; cv=none; d=zohomail.com; s=zohoarc; b=m3qxf19KJz6BHqjFbPaiV358HMBx5A/VcL31kVCvqJsF38Wxldnqh+vaB/towrcPfcfyxdNCnW5HOGxfSR16gXH0/iZUjkTcKG7F4Ac7TKSOCj5l7rsd+xSfxIQmvan1hUZX/fBfYEEIaMJ1sSdFfT9084XBRyXLF+xAc6NTidE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552374; 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=a+wGGRZCsFuDn55cNs+nSPMT4EkvcI/GYRZyjpLftws=; b=lk2o2xZ7DvO1kgRQqYgqatunfFt47Y3jRaf92ihEtIUxMPiRBg0PsWdWUi9iWQz/aWBgHwiFS7mQkKAJtGkiGfJ2zYp5Sku644dhSm6VAuhqqhKYr3HLhuFzhcdAjkBLL1T1yLJkB6cNfSk+hlDL88vMDjkTioymty4V0FlWL6s= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552374906669.0820794185512; Mon, 15 Jun 2026 12:39:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7m-000407-Hy; Mon, 15 Jun 2026 15:37:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0002P1-HF for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-00017o-6b for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:46 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ0q0p1453759 for ; Mon, 15 Jun 2026 19:35:31 GMT Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etd2cb4be-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:31 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-304df51ff3eso7915016eec.0 for ; Mon, 15 Jun 2026 12:35:31 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=a+wGGRZCsFu Dn55cNs+nSPMT4EkvcI/GYRZyjpLftws=; b=NMXDmRROs1ZjtC+K+IPLKp6U6DC S0+8OD0VrNev7HKBIUKVCOtqgN8MtiIxYOTmOKOuXRfpa/3RhNWsvEBZMcKj0I/q CPq9m23ngLmQYzRgnjXNPm01k3TRjHf2T7Z4+wJ1fkN/tmfSkt/X5nAZa/thgJoW qky7mS1tLNDAmHr+S/44phIYPR+aDygxA9PDIVFp4VCjNBVQLQb+FY7+RzNIi4gq 0rc3MTChgMfkTyxWTIip6Ts8pdXCn0XvGbAs5ofrqODXS7q9bl2/TMMOh0jWePZ1 6+PkCsWDDajcr6raECRv34OG5WO2JcxsxcWvdQxzXZHjy8s3wzffcpSb81Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552131; x=1782156931; 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=a+wGGRZCsFuDn55cNs+nSPMT4EkvcI/GYRZyjpLftws=; b=GlN/25PPSbiYAQEZPPIHICpU0vLfx6guHYFFyppFSpLespv9jyXe6mPQ94vmvb1pZP 9ZNhd24aE7kotnjxYyWlO2KB5YmE+3fEr/nSRtOWrPTMHriLZKQMD/+g7d2wABAL9sBf +xWDd3XYAtIQaiJrkxugmCVg1cqxscZQQjLKYkM06fKHbHANUphQMDQ8/Ilsr2sOUF+x TpB5OhJ/Kquz6eEVAfQ2PG8tvi7BAqX5uMiu85vAvYcB/FiTMRuo199wIouCyVhrfo4R WOO1aJ4BGNQZLN/jd/hXxSEL3s01be+K0IurEdj7uUItxPMnijN7dsITQlKSAW3apK0v MRNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552131; x=1782156931; 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=a+wGGRZCsFuDn55cNs+nSPMT4EkvcI/GYRZyjpLftws=; b=mcHAccq76ZYF2D1YGjEx06xG3TZIhky7/78fKqXdbilxMzrKmHQ3tNOg/1+MGq4So0 1WoXBtxBqCfdpXzwThKoSIFCf1XYTiiAPHjWar0VO1XNTnIGalG5NND1VYzWmtiKFnMT G47QyLwkcAYIaIJT+zTirhW97PfKV6Q3mgPIAPAEt/kiceu3i29SaQZbMqRVuE+NfYYn MMidMwmQpX2FMCX61dndeld8+Q6u5+Wci6M0K7mz8cB4Uw2Akg3FV0KL29tW+f5vqlhh 0F77xlWpC0p6XssUQrc++Zfg8TpU+wDSijqkGhCU40z8eYGwDBDRgo7LGZlsm107D942 4FqQ== X-Gm-Message-State: AOJu0YxP3fb42bBhminRO0edYJIvkj8cnIHXzKXfKoN4A2hhIgx4OpLg 4M86H8P0OZSU0SLdzbAnsjKL2pwZgoP7lAe0rz5uBMtw54MZ675MNfTt4MBJUvHQloUgW+Rt0+a QbFmzFI7htt3zEX/M9X3Gv1B42I0uSE3Z5FBRD2d8Grw3Z7P/mYA95CNJ7HPw5PiWrd6L X-Gm-Gg: Acq92OGz2pW40Lx9eTEkfYo0gsnF7OusVaG+ON+1PHT/Ks1rF4CbIEZwlxbhA0NwBlH obL8RN6/uFKWEsYc6lBdYEXCoiR8EMaJCUJAErIdXpBdR+LheMKWstnctuMd+zzmcG1K1aXovy/ M5BdSoR+56EMaQxslD0wTMiD17nVJrugGRze8/Lbc6ZSdGTfsbxLUOzjY8oxwR5oOjZ/bFgvbLN yElEEo2Fo0Je9BGnIEvjoTtYcFSypXB726FXQUGCgDXy/YKeD216KaRvt1ppOEJ+nlX99cC6Rk2 glnSSyqq6UWDRfQAiOh8vZBC1LB8kXdp2+xiryO27FxiX3v898Afwo1xW3zZBW7A50QAr/ziOCw IkuLJq+nMn0p3boK86MM/efsLdxYuOVp5cq5tAkY5qe4n+FdMjoK5o8aBYSRdhyYvPYwWkrus6g TEkV6GCg== X-Received: by 2002:a05:7023:b16:b0:138:2c88:b3d6 with SMTP id a92af1059eb24-1384bb69a3emr6280662c88.18.1781552130673; Mon, 15 Jun 2026 12:35:30 -0700 (PDT) X-Received: by 2002:a05:7023:b16:b0:138:2c88:b3d6 with SMTP id a92af1059eb24-1384bb69a3emr6280646c88.18.1781552130101; Mon, 15 Jun 2026 12:35:30 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 01/26] plugins: bump version Date: Mon, 15 Jun 2026 12:35:00 -0700 Message-ID: <20260615193526.2883349-2-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX2Q9FdqB9qkdm omdJ0F6bINj1PwYkQh3sV21qM+SFLO7wQAu/843qulih0muhjXD0NI5quUw0wPHQupkq9pMaJHd 12GH/JqjDQagVqcGCUt9y5hHXigdx8hE0zurAGRNPBBjjg2HMR1IOZoQ5KN0S4UA4oiFU23oZYJ KSQJheXRFm817iIZEdEwrQacCOstBRxPQTSRb7NLVtPkppuqFyvpG4dqGmkNWMxERDn1EaHXq3L yGjIKGY+C5nt0BN+FFIZ0sH66OaXbtJkvHrgCqklLYNNTVmvPwoGeWrab+0UG8EYvYNlCFKdhFi VfhQJ4DHC+2e0sX1P8Ax2BS5rWshKrIxbmHN9VJxG7Y5h7SmzsZSkcej6IOwsRdv6xmh7V9rCd4 St6mLfCbCyoy7vaeNEXO3QHTY1dzfOtFWs/oVscaONzUAGoMhiW2O72NnhgXnkf2ShSE9lYz8GQ j11t29sxXelskdDkM6A== X-Proofpoint-ORIG-GUID: 9wpuMvhaqecdCIWaLEXgzAtHoVvXxpST X-Proofpoint-GUID: 9wpuMvhaqecdCIWaLEXgzAtHoVvXxpST X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXwkVsZc7w7zDs d2GzBk7R518uoYtK3ekFyBoFAwyOVVkS3jHHGl2PAUUBiLm+vE/hO77PE1Y7bHa7IJTIbHSujkP GoiRcbph2w8cFOLY2qEtk2pQCq55kNA= X-Authority-Analysis: v=2.4 cv=MsRiLWae c=1 sm=1 tr=0 ts=6a305403 cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=A7FZhrvmqJkW37y3txMA:9 a=6Ab_bkdmUrQuMsNx7PHu:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552376824158500 Content-Type: text/plain; charset="utf-8" Next commits will be breaking changes, so bump min version and version accordingly. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 6 +++++- plugins/plugin.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 4eb1d2cd85c..435a14f5a00 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -80,11 +80,15 @@ typedef uint64_t qemu_plugin_id_t; * - added disconinuity callback API (for interrupts, exceptions, host cal= ls) * - added syscall filter callback API, which allows skipping syscalls and * setting custom syscall return values + * + * version 7: + * - add userdata to all plugin callbacks, allowing maintenance of state + * externally, and easing interfacing with other languages. */ =20 extern QEMU_PLUGIN_EXPORT int qemu_plugin_version; =20 -#define QEMU_PLUGIN_VERSION 6 +#define QEMU_PLUGIN_VERSION 7 =20 /** * struct qemu_info_t - system information for plugins diff --git a/plugins/plugin.h b/plugins/plugin.h index 6fbc443b96c..9179da43851 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -16,7 +16,7 @@ #include "qemu/queue.h" #include "qemu/qht.h" =20 -#define QEMU_PLUGIN_MIN_VERSION 2 +#define QEMU_PLUGIN_MIN_VERSION 7 =20 /* global state */ struct qemu_plugin_state { --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552208; cv=none; d=zohomail.com; s=zohoarc; b=FniVJwqf6nWRQ9x7ITIXCRDow6IJNXDOWASIddeWeu9iLnYSx2rFdNHsWKw4ynoR/ARIiFUUDt5b2S/R+01cER7Aog1Za1bwJxiDTSPDmOzwwwAjOk2nNxYSElxhFCkBmxs0OA2Uh3FPEL2aBXvKgnSMWIs8jRWDNkBF0N3aMMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552208; 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=/Xy+DxpLUxJOai0mGUPw8MSLTlKawJ4baeII5y6IQeo=; b=G/OKhCHVNHAimhfdEr5SgL0SL7dOKWZRJURa9c1EyU53Zs2Hpizxa3Cb9MLWVwaJz7f+sUh77l3mG1nw0pppDNugzcxbvpaApoWkrz4fQnHCuCZhnAw8/2XGRH9QlqHVqfIxMm72mo/RTd3m0p6YhmIB/eYWjNjZlom6/F4S1p0= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552208480943.2844833273225; Mon, 15 Jun 2026 12:36:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD66-0002QN-2Q; Mon, 15 Jun 2026 15:35:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0002NM-Gj for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:45 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD5u-00017x-My for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:42 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1Hb41393707 for ; Mon, 15 Jun 2026 19:35:32 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eter22n80-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:32 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-139553dd8acso3745165c88.0 for ; Mon, 15 Jun 2026 12:35:32 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=/Xy+DxpLUxJ Oai0mGUPw8MSLTlKawJ4baeII5y6IQeo=; b=XdZ0XrNi0Z1QBJEeuNrkeheyi1Z 2V1jVH5+PPr9v8K2SPccFFI4/onM+O46IKKHpxKQXxx5Eh2Mvio0RwCKs1V+iXip 0XjNsrh2cQ7O749QI3ZGdKIjFeHMM18Qx3GhSiRq5bsaTHuNbe4lraDfIhWx1yP7 dPpqIpR0KqK6ptRrQ42EOk+5Ig2XeemQQu5b4JPHe7nbwREHG8Ac8EevWHq6CkRX Ad2EHuMS0sgFMGSZ5gjz2n88nz/zCfM2r09sLDBhU8mCed2TfY+EbQwwG6XN5B5c G3DMPNaATnpKfztJVxfGrgTFlluhA6Z30E+LJf5xQx3JH1RgwrjHd23VYDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552132; x=1782156932; 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=/Xy+DxpLUxJOai0mGUPw8MSLTlKawJ4baeII5y6IQeo=; b=EYDj/SEWgNihFGxuGPKoZ/lAwQKT2X5fIN+3BtDXIwTokYlad7S4dOFKjogR9MhOD0 KV+8BenwC8+5uq3iG94ZlQiqh4GvHD3MNXxKLdjH6E2qX57V8E74Bo9wYu9KARiUUV5C 9eZ2BGeqoUOdzJoCP3RgMvv9eGIX3DKES4UTmTNalbkoTEp2XJD4+yUQhZvV0SEd7Ygf 7jKkIFQgUg/IAeU7C98Dt5RW2pQYvEJ3Q1onxOiGwKpiiFJ3JCr8e/0PBzzaY5TKr6Im jTUk7me0mJigqEL4bXA/L4gqLghpMKgmH7nHbuGCRMjWwlbsPdNPZGjJZDR5ZcwTDyRk tJ8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552132; x=1782156932; 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=/Xy+DxpLUxJOai0mGUPw8MSLTlKawJ4baeII5y6IQeo=; b=E+virK7q5iYjUZeilAQNZE9kHVGbh5iwoUxbJl4F0SSE748IK1ZBd0cwRkYM/ahSu1 Qf0nv1Jgueu0LOja8Hms1Jc6iicITxamPADKKrPHp/wMGJiZ5GJsVxbFix7EKVrFxQ0B Akp63elwurJuPtsMGEkgQ+fTiPvntpxhg32TJ7hSvI+BFdu4ueY3L/ScRnLubl8bHy5A HeP5Rf2u4Qdrh3iMWZaV9h7ls3Vy52EA75eTwolWZ4cyRUu5wGxfFVQKQ977uXUT1MIP LUHqMub+nNGMQ7aE9r3fPkyVZYiRM7BNZFe51Q4HxDanS+GLSI3KOIF/23AIYUeUAiLP Gstg== X-Gm-Message-State: AOJu0YzFJKefDkCxwOKQhRm5KAhO0980AxXzoA89VYlt3fDwCRcn262Y tzleNZTGKuFlCb0u+YzTsK0/n8Fn8lwU0bCDAG3P9GaCZ1mwl4AdyO5c48N5EMorAxD+uoayFdB BiBwNIGE8yhAPG+TRODKAGzh2Hu3tClSOL4j3K0vGtlHak1WCbXXCPJ9P3i06+8+fpc28 X-Gm-Gg: Acq92OF/nkhARWvDRKtjEI4pjAKYrOOT8FYtnK7BjtLKXEdZOq69xHlVazCyUWew3oa hpOeVmQ+caOvV/FqY5tA1twqs68eENH4T0UJ3xopjTgiQeWno0XMR0jnwDlyeBPGhM3DA9PAFT0 OTxBy1lNhxkEU+0dbPgd1vje9mXAx5PxynRXeoOQikIhVhOoquQycQe0TetRCj7EriCejLxCBUJ IwHLayiF3fu2h+3lAchNlM9J4bhL+clg4E+8fB5hJTEdtstAGg+cKtKISWWS7MMpp8oJ6inyz8w 1n92cWo3+77HVNzChVYdGj14ZlRrRxa9lsAS6PbktnPI3pkh4n2F8RLozPpXrNqSl1Rw6S/6xSo ivLkuidzR1/nFlpm/AqI5OaGClRUQozxoH83ScZ3bLYxoCn/6B4GMJuiraSI8HGbQRg0igve3cs Ptl6otAw== X-Received: by 2002:a05:7022:f94:b0:135:d749:5761 with SMTP id a92af1059eb24-13985e95689mr248241c88.8.1781552131544; Mon, 15 Jun 2026 12:35:31 -0700 (PDT) X-Received: by 2002:a05:7022:f94:b0:135:d749:5761 with SMTP id a92af1059eb24-13985e95689mr248220c88.8.1781552130982; Mon, 15 Jun 2026 12:35:30 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 02/26] plugins: add userdata for qemu_plugin_{uninstall, reset} Date: Mon, 15 Jun 2026 12:35:01 -0700 Message-ID: <20260615193526.2883349-3-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXxJJs6XwjNqES 5ZnOmARvcS3kmAqZ4agIl4jD4P8iKvZuXB1yRHFx1VduFAXWXWnOgezPCUyRMjN2FFaF6cdM3oI QgENeRz4t0oX5my9x3uAkgvtsdqsY3k= X-Proofpoint-GUID: _EVQ56GrpqO6_UWN-mxFYmAlYzcnihgN X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0Zo6xaqQaQFj Jwl+8/BUJ+SqD/DCbvba2ZMPtfAtXmLwGfXs7X52jf17ctIlYIRjMiVjfFK5IBHijR6y7LqCThD NNBrR6r0YpuQFdyf7l9i4SND8OBF1+VSMDBbjFAt3r+5YSlFZT/wfx7SI15Dksjcs6GRI3PHnHG VrgGqniQlbLo9C2Tnz2R2sCuFHgQZBoLa25BSTu4wZEBETexfGyxsD7edv9aCr4JCfAlSVpeoTq an+4h+r87ZLGIb3iHARHDuMkiO1DQ6KlM+Mf6Ei0q51vT8dOKGNhB06C4dR6MCT2IfThjAWqPBl aKsUgA5mtHwE2Z217IG+iFIDgojYfgDGaH6Z8HrAN6SEklZyDgp/gvPmPTM9i/rlvRMlG/xXrW+ 5o1OJKmYOFKzqViC4fpjrSIRhgWCzmWoTnPS+5kwzIrbngeF4AgZumpTczVstQFKoumRd2RgKG5 UsKYFzBFPAuL0GF3Z/w== X-Authority-Analysis: v=2.4 cv=F4tnsKhN c=1 sm=1 tr=0 ts=6a305404 cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=_u34yJfUH-Co13bc16MA:9 a=O8hF6Hzn-FEA:10 a=vr4QvYf-bLy2KjpDp97w:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: _EVQ56GrpqO6_UWN-mxFYmAlYzcnihgN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 impostorscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552211293158500 Content-Type: text/plain; charset="utf-8" We do both at the same time because they internally use the same implementation. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/lockstep.c | 10 +++++----- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/api.c | 10 ++++++---- plugins/loader.c | 13 ++++++++----- plugins/plugin.h | 3 ++- tests/tcg/plugins/reset.c | 8 ++++---- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 62981d4e098..36b003ead2d 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -77,7 +77,7 @@ static char *path_to_unlink; =20 static bool verbose; =20 -static void plugin_cleanup(qemu_plugin_id_t id) +static void plugin_cleanup(qemu_plugin_id_t id, void *userdata) { /* Free our block data */ g_slist_free_full(blocks, &g_free); @@ -98,7 +98,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_string_append_printf(out, "Executed ~%ld instructions\n", insn_count= ); qemu_plugin_outs(out->str); =20 - plugin_cleanup(id); + plugin_cleanup(id, NULL); } =20 /* @@ -189,7 +189,7 @@ static void report_divergance(ExecState *us, ExecState = *them) } qemu_plugin_outs(out->str); qemu_plugin_outs("giving up\n"); - qemu_plugin_uninstall(our_id, plugin_cleanup); + qemu_plugin_uninstall(our_id, plugin_cleanup, NULL); } } =20 @@ -212,7 +212,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) qemu_plugin_outs(bytes < 0 ? "problem writing to socket" : "wrote less than expected to socket"); - qemu_plugin_uninstall(our_id, plugin_cleanup); + qemu_plugin_uninstall(our_id, plugin_cleanup, NULL); return; } =20 @@ -225,7 +225,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) qemu_plugin_outs(bytes < 0 ? "problem reading from socket" : "read less than expected"); - qemu_plugin_uninstall(our_id, plugin_cleanup); + qemu_plugin_uninstall(our_id, plugin_cleanup, NULL); return; } =20 diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 435a14f5a00..11213c2ca3f 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -221,6 +221,7 @@ typedef void (*qemu_plugin_vcpu_discon_cb_t)(qemu_plugi= n_id_t id, * qemu_plugin_uninstall() - Uninstall a plugin * @id: this plugin's opaque ID * @cb: callback to be called once the plugin has been removed + * @userdata: any plugin data to pass to the @cb * * Do NOT assume that the plugin has been uninstalled once this function * returns. Plugins are uninstalled asynchronously, and therefore the given @@ -229,12 +230,14 @@ typedef void (*qemu_plugin_vcpu_discon_cb_t)(qemu_plu= gin_id_t id, * Note: Calling this function from qemu_plugin_install() is a bug. */ QEMU_PLUGIN_API -void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb= ); +void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_reset() - Reset a plugin * @id: this plugin's opaque ID * @cb: callback to be called once the plugin has been reset + * @userdata: any plugin data to pass to the @cb * * Unregisters all callbacks for the plugin given by @id. * @@ -243,7 +246,8 @@ void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_pl= ugin_simple_cb_t cb); * callbacks until @cb is called. */ QEMU_PLUGIN_API -void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb); +void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_init_cb() - register a vCPU initialization ca= llback diff --git a/plugins/api.c b/plugins/api.c index 2d5fe9327f7..91c9a24a6b2 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -51,14 +51,16 @@ =20 /* Uninstall and Reset handlers */ =20 -void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb) +void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, + void *userdata) { - plugin_reset_uninstall(id, cb, false); + plugin_reset_uninstall(id, cb, userdata, false); } =20 -void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_simple_cb_t cb) +void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, + void *userdata) { - plugin_reset_uninstall(id, cb, true); + plugin_reset_uninstall(id, cb, userdata, true); } =20 /* diff --git a/plugins/loader.c b/plugins/loader.c index 0dbe7bea263..0d587c344c4 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -253,7 +253,7 @@ static int plugin_load(struct qemu_plugin_desc *desc, c= onst qemu_info_t *info, E * call a full uninstall if the plugin did not yet call it. */ if (!ctx->uninstalling) { - plugin_reset_uninstall(ctx->id, NULL, false); + plugin_reset_uninstall(ctx->id, NULL, NULL, false); } } =20 @@ -314,7 +314,8 @@ int qemu_plugin_load_list(QemuPluginList *head, Error *= *errp) =20 struct qemu_plugin_reset_data { struct qemu_plugin_ctx *ctx; - qemu_plugin_simple_cb_t cb; + qemu_plugin_udata_cb_t cb; + void *userdata; bool reset; }; =20 @@ -338,7 +339,7 @@ static void plugin_reset_destroy__locked(struct qemu_pl= ugin_reset_data *data) if (data->reset) { g_assert(ctx->resetting); if (data->cb) { - data->cb(ctx->id); + data->cb(ctx->id, data->userdata); } ctx->resetting =3D false; g_free(data); @@ -357,7 +358,7 @@ static void plugin_reset_destroy__locked(struct qemu_pl= ugin_reset_data *data) g_assert(success); QTAILQ_REMOVE(&plugin.ctxs, ctx, entry); if (data->cb) { - data->cb(ctx->id); + data->cb(ctx->id, data->userdata); } if (!g_module_close(ctx->handle)) { warn_report("%s: %s", __func__, g_module_error()); @@ -383,7 +384,8 @@ static void plugin_flush_destroy(CPUState *cpu, run_on_= cpu_data arg) } =20 void plugin_reset_uninstall(qemu_plugin_id_t id, - qemu_plugin_simple_cb_t cb, + qemu_plugin_udata_cb_t cb, + void *userdata, bool reset) { struct qemu_plugin_reset_data *data; @@ -401,6 +403,7 @@ void plugin_reset_uninstall(qemu_plugin_id_t id, data =3D g_new(struct qemu_plugin_reset_data, 1); data->ctx =3D ctx; data->cb =3D cb; + data->userdata =3D userdata; data->reset =3D reset; /* * Only flush the code cache if the vCPUs have been created. If so, diff --git a/plugins/plugin.h b/plugins/plugin.h index 9179da43851..c901016b8c1 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -76,7 +76,8 @@ void plugin_register_inline_op_on_entry(GArray **arr, uint64_t imm); =20 void plugin_reset_uninstall(qemu_plugin_id_t id, - qemu_plugin_simple_cb_t cb, + qemu_plugin_udata_cb_t cb, + void *userdata, bool reset); =20 void plugin_register_cb(qemu_plugin_id_t id, enum qemu_plugin_event ev, diff --git a/tests/tcg/plugins/reset.c b/tests/tcg/plugins/reset.c index 1be8be2a4b2..6ea675b8095 100644 --- a/tests/tcg/plugins/reset.c +++ b/tests/tcg/plugins/reset.c @@ -14,7 +14,7 @@ static qemu_plugin_id_t plugin_id; static bool was_reset; static bool was_uninstalled; =20 -static void after_uninstall(qemu_plugin_id_t id) +static void after_uninstall(qemu_plugin_id_t id, void *userdata) { g_assert(was_reset && !was_uninstalled); qemu_plugin_outs("uninstall done\n"); @@ -24,7 +24,7 @@ static void after_uninstall(qemu_plugin_id_t id) static void tb_exec_after_reset(unsigned int vcpu_index, void *userdata) { g_assert(was_reset && !was_uninstalled); - qemu_plugin_uninstall(plugin_id, after_uninstall); + qemu_plugin_uninstall(plugin_id, after_uninstall, NULL); } =20 static void tb_trans_after_reset(qemu_plugin_id_t id, struct qemu_plugin_t= b *tb) @@ -34,7 +34,7 @@ static void tb_trans_after_reset(qemu_plugin_id_t id, str= uct qemu_plugin_tb *tb) QEMU_PLUGIN_CB_NO_REGS, NULL); } =20 -static void after_reset(qemu_plugin_id_t id) +static void after_reset(qemu_plugin_id_t id, void *userdata) { g_assert(!was_reset && !was_uninstalled); qemu_plugin_outs("reset done\n"); @@ -45,7 +45,7 @@ static void after_reset(qemu_plugin_id_t id) static void tb_exec_before_reset(unsigned int vcpu_index, void *userdata) { g_assert(!was_reset && !was_uninstalled); - qemu_plugin_reset(plugin_id, after_reset); + qemu_plugin_reset(plugin_id, after_reset, NULL); } =20 static void tb_trans_before_reset(qemu_plugin_id_t id, struct qemu_plugin_= tb *tb) --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552253; cv=none; d=zohomail.com; s=zohoarc; b=WIqkdcEDWO7VAPyhUxws7IZayF1o6Fj7a6jGd1GgHKib/eD2rxIINvBpZ0Qq4G06jVxE3Dg5LghD2m2RwgJ2D8G8zC/W6nYarebIPIvi+lkm8I+iP+yBnSEHKPNvgoRMsuig+zhEs6ofpDRSVAWxM9iGJD1mvbBIEDBcQvfq/c0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552253; 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=/OyPY5qd/+OIP4Mmj974ZNY6OrTTznWE834Wr+6NIaU=; b=jncbA1gusOR/AaQ+KIpLTaiof3sv3SnsxpBXQcrO3zpZl93/Z92nVNoNAd/PGmiP1iRGpgaApSBgtRmgaFvs+UZkKE8plrTDPqy5bgWnOg5RZA0RO/EzGjoSCUDy16roMSRWLj9ggPrUXMJWzd5H3+e7XTK7QPcIzI/L+kjYoqU= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552253764463.6057726927007; Mon, 15 Jun 2026 12:37:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6Q-0002Un-NF; Mon, 15 Jun 2026 15:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0002P9-Rn for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-00018S-8W for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:47 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1JPM1220312 for ; Mon, 15 Jun 2026 19:35:34 GMT Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etevx2k1g-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:34 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-13986163c34so36314c88.1 for ; Mon, 15 Jun 2026 12:35:34 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=/OyPY5qd/+O IP4Mmj974ZNY6OrTTznWE834Wr+6NIaU=; b=QczVwSC8p/EZusA5AarOtTjRDaz PYae3szDw9XuEe+rCLRBdnVQS51iCZ3Q105D9Q/4GFkG2RH+eTcpoAt5JbkCeDWK l1paPWonKeJdFa9FFbdqtj1B6y+YxqMKhsW03lD/LUOl/dzMuBD+qGsDXHdCgiyj g7RYTHVJ8W2pxxY8hsdAaEORGCKtY7f8vww6nyesanBVjvjB1ELoLqLC04B007oV BodVgSfXER98e80Llv0r0Whu2gXKqvOmV/thepyC19p8+vJXo9W109qWOmd6HCAi 8E7xl8eEeibzkplRsoumun8pEoL3ojnXqST/TN3h7ViTRqNU9q2bn4rVDSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552133; x=1782156933; 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=/OyPY5qd/+OIP4Mmj974ZNY6OrTTznWE834Wr+6NIaU=; b=h8C3ngT7SCixeT+fRmwG2dqFPueSD4Mlb0c1qegmeYHsDE041TxUqGJ1bCfogtF8kb dC2hKVcgQeNKhYec+hgqv7/z0/1fwWG6eiHGjln/NsvxOz+hyMorr7QGQOExsVxr3zoh 1IcDcXGAFQMYopKgVjxHfauDZC7L7vysmuES8pBcq6cawrcEIK6jxy7TTW3+yKXljJZh C2o4LiKhEIKQg4fAzCfH6ms4y1m8/bOvEuclkcPBjQbeEMCqUgWUyboL+rCpQGS/DK6T WmqxJgApZt2xwReSJvXm2YNLkofp8Vki2gntt26yUdW8D3/uMBwuNB3LUecnc8mXxYZK mdHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552133; x=1782156933; 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=/OyPY5qd/+OIP4Mmj974ZNY6OrTTznWE834Wr+6NIaU=; b=Pzv8rT/ExuqtbE/4dEHnWYBp6iXPuwHpszZBHzwE6q+QkdUvJQAnUIbm3f6YTrCSRN FgwbLR6cETEzZQXfd0ELQ3vnXsP2+4smBBzfD677Oeb8iIX25Yrorq/JNEvqoVFi3Imq GUVPMgANJpZXCKhwrd9PCZNIZOhOQlDlAho67bxUQgUCGTqDhrv3xNHDYydR82PSW5fj cx+aW7Ty/crYIgK41ZRRWRJIoJPVHEHpkTyym45HNu6ID9TVUEUc6zgwre0axMchIf44 5jxRmzqAi+RhVcaFguZZri98wmjV12FsXVyySNNmlsKAybq6L+T0kCHmA0jYS7oeAZav omHg== X-Gm-Message-State: AOJu0YyGLzvvtDTcSUFMkR5H7yx56SqAL/C4MKuy4AdDmlB5IcPNm5mB KbDVAISMCCz7hQU6LLZx3efXX9z89xddLzAiInJc6AioGFyOvxOnrs9se7yUURLapG+zv2Nax6/ XsEKcMQlH8bwz8M11WyJ9gunQRt15EQEmbXAz30rhDBRqSM9KqxdbIMpsM/UDvkOVHRht X-Gm-Gg: Acq92OFUBurw94B6DR53lzTVqX47DvB185ZHbfrU+yJGig2qGABpgAmtjB0jZkn+NdH WK5HARQz1HWX8Xp6FY8SoYQkuFVgieksSyHzgFx1SCRQfg3NCvrrOH1kQAaamm/VK+bdIxunUi7 L5tbKEOq9JW5FIb2MfGHLiIKw+rFizr/AIMamGN88dS0GgSiciux2F283ftsMnWPqjLT+OaGn1a JCgRqQV28o/DAgC+uBEVOGHvi2hO3ZD0RUoNzutkVfCSsrRp69U7gOqkgsax/z012stVftYrnnp sx+4NqODOMjrGdAULy7EopKdoDgulgQff7jVTrIuxCqDqHcGQeJJ7mMqaG6q68GTXuYETVnxoxC Q9rIIeuZ0cskqsi71Y09J3gWsdRTfLSI8zLKv7Q1vkrRNULIX00IVCC3KTW8XRy3QFlsYzuh3Oi qk20JKdA== X-Received: by 2002:a05:7022:622:b0:136:5e4c:7aba with SMTP id a92af1059eb24-13985ebe992mr268310c88.16.1781552133481; Mon, 15 Jun 2026 12:35:33 -0700 (PDT) X-Received: by 2002:a05:7022:622:b0:136:5e4c:7aba with SMTP id a92af1059eb24-13985ebe992mr268275c88.16.1781552132630; Mon, 15 Jun 2026 12:35:32 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 03/26] plugins: add userdata to qemu_plugin_register_flush_cb Date: Mon, 15 Jun 2026 12:35:02 -0700 Message-ID: <20260615193526.2883349-4-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: ygW2Xh7keUGmyOpc3TZ9j7NprHjzEP0S X-Proofpoint-GUID: ygW2Xh7keUGmyOpc3TZ9j7NprHjzEP0S X-Authority-Analysis: v=2.4 cv=f8t4wuyM c=1 sm=1 tr=0 ts=6a305406 cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=jbUUBHnpNWWeZ8W5LfIA:9 a=Fk4IpSoW4aLDllm1B1p-:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX8coRgkCfviXu p4/PL63TpPT9DSv/3vFYr+eY2Syg+kwRLSMAFieViTRizsIN8KAfz5+W+Z+INcDYoQ1X4ASTnh7 xh5swtwSE2B1s8gWDhTXKe9plL9P2As= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXz7wY7pYbhaxD lr40d1CQwR0dnzHxWMTsNRzn3GHo2O8/7k+svsRdQ+ObOCTmFdKjtPUmJR3kCxQIc4U8aZuurSJ PSCrOHy2XgYERFhVJHHwJcbihbGmCtwmOX44/VBPOx6aCqe9fbdbwm/1HnhMZQKY1IFbskueQsl oo0GfJqrUFIa4IPKspEu8fYhTBF+WVHLzOs8gFCusFEdI8StY7odh/j534P63YCYLppldkGJknB 1kqo6zt033yYY/wF1/oojWl14Pfc7g3mJ+DXmRk80s7YBsam55N0hqLv/QBX33vf8EuCHhScfFY TLu/9K+mxR19XRPQl8KD5c14lHgY2P2zrg/2Zghx3Ylh/S7G2kvL0CObA9XUHBH7k7CEWD+S20Z +U2Df01gtRQMr4WrnFFYEE8vSQtaaRLEc9WzWud3ZxHxLVsDYy8LKzfpuhRY0CDnP70aWnQ6JJ0 AisKcVNE6g20sX5etWg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 clxscore=1015 spamscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552255018158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +++- plugins/core.c | 31 +++++-------------------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 11213c2ca3f..499441bde23 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -973,6 +973,7 @@ void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, * qemu_plugin_register_flush_cb() - register code cache flush callback * @id: plugin ID * @cb: callback + * @userdata: user data for callback * * The @cb function is called every time the code cache is flushed. * The callback can be used to free resources associated with existing @@ -981,7 +982,8 @@ void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, */ QEMU_PLUGIN_API void qemu_plugin_register_flush_cb(qemu_plugin_id_t id, - qemu_plugin_simple_cb_t cb); + qemu_plugin_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_atexit_cb() - register exit callback diff --git a/plugins/core.c b/plugins/core.c index 2324bbffa3d..21a3c5b15cf 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -131,29 +131,6 @@ static void plugin_vcpu_cb__discon(CPUState *cpu, qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } =20 -/* - * Disable CFI checks. - * The callback function has been loaded from an external library so we do= not - * have type information - */ -QEMU_DISABLE_CFI -static void plugin_cb__simple(enum qemu_plugin_event ev) -{ - struct qemu_plugin_cb *cb, *next; - - switch (ev) { - case QEMU_PLUGIN_EV_FLUSH: - QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { - qemu_plugin_simple_cb_t func =3D cb->f.simple; - - func(cb->ctx->id); - } - break; - default: - g_assert_not_reached(); - } -} - /* * Disable CFI checks. * The callback function has been loaded from an external library so we do= not @@ -166,6 +143,7 @@ static void plugin_cb__udata(enum qemu_plugin_event ev) =20 switch (ev) { case QEMU_PLUGIN_EV_ATEXIT: + case QEMU_PLUGIN_EV_FLUSH: QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_udata_cb_t func =3D cb->f.udata; =20 @@ -690,9 +668,10 @@ void qemu_plugin_register_vcpu_discon_cb(qemu_plugin_i= d_t id, } =20 void qemu_plugin_register_flush_cb(qemu_plugin_id_t id, - qemu_plugin_simple_cb_t cb) + qemu_plugin_udata_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_FLUSH, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_FLUSH, cb, userdata); } =20 static bool free_dyn_cb_arr(void *p, uint32_t h, void *userp) @@ -706,7 +685,7 @@ void qemu_plugin_flush_cb(void) qht_iter_remove(&plugin.dyn_cb_arr_ht, free_dyn_cb_arr, NULL); qht_reset(&plugin.dyn_cb_arr_ht); =20 - plugin_cb__simple(QEMU_PLUGIN_EV_FLUSH); + plugin_cb__udata(QEMU_PLUGIN_EV_FLUSH); } =20 void exec_inline_op(enum plugin_dyn_cb_type type, --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552209; cv=none; d=zohomail.com; s=zohoarc; b=JRR1a7r3EpGJycj/VTA5Qn43iTjdDudqzCg85FE2203QLeF1vfSo100Ux/8X6A4MVOSoiSyJ8Dj1t9C0J+ufqWG6BPzmeCAgFXegxNUiYmvAu9/TUMglLO4+u3zWs0jG0wPEQ2MYjTy9rn3qkckLENUBb6N0LtLYeuLTInd0VCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552209; 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=Ejk2F2ptZ5cGsQkciGpQQLG73upgLrn32qRb1yp676c=; b=W7RumqoZMTyfQTjDsMuryAAJeWDcqkXWOtTd8qaz0MdVAXw9G/hdnbyJIJNTR+i0g7DQCsef1eU7vdOemUoUGwi+yWo0XmYaAyQs2K1yZD05iKXnbO8T+n6NF2D4aEU2l9YTyiKIjLjFBLuSXD9G4kuDqH+99FHRLbVGveZQufQ= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552208985982.4643005132107; Mon, 15 Jun 2026 12:36:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD68-0002RG-UN; Mon, 15 Jun 2026 15:35:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0002NH-H4 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:45 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD5w-00018j-IG for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:42 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIx6OD3578149 for ; Mon, 15 Jun 2026 19:35:35 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ete982s5g-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:35 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1382674ba2eso3368918c88.0 for ; Mon, 15 Jun 2026 12:35:35 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Ejk2F2ptZ5c GsQkciGpQQLG73upgLrn32qRb1yp676c=; b=iEGz0OqUjLVdTseLe4cYxyfEUoB yiHTUbrpCZ1gkTgXTUunKK2aE7ExwOjNaafA7Z+VwhTrzbDjRDFpS1GYlcUwkAOI GjMd/bkBJQdPMvUF9AAd8XkqzNvDAJDPbuTR4kqKJrcvDOVj4hC2EAbWUdbminCS 1yzBxl4URPYtwDdG6yVbndv+y1qJEhcrIz8wl6wUQ3cyk6JMAQeA0I2rSz/Jb4rK JeN+erlCKZbVyMH/sArdQhO1Prt0B8DkUfgEDYgJ9kryK2Jzg2S3dCibuFxf0zqI 4Ov/tX3VLP+vSKn0C8qy6eee8TPMTgz0C/FJgs2JPqzxFgul+uHl4378TbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552134; x=1782156934; 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=Ejk2F2ptZ5cGsQkciGpQQLG73upgLrn32qRb1yp676c=; b=dxpQpFbZfxKpyjzSUkLmtytf4Y76tg7ncFf2TnX08LLUzZwfqQ4yq/98M3XTPUTf3Z dTIpkwL693VZOWlVXeBs8lG2DU2MeEwF7QUZ8ppzzUCYylVTwrgy3ov0HtjefxH3DFAU iXdddbytEB2sCypjexh+Rn/0LxO/v2vT093lCDL3D/H8YFtjdcvLUYgw6obO6nnunyUa fcM1MLnEGaGrtIZqSfTkvRyoAoUwREqIGz+xT/Y5B0QHW75MkPahuDjm3WJ8Igs4Ktx3 me5wiGaUBqZE8ZdnMn7QL6EtmmyqqhF6LA+NaAC9G2h8nlC7fVFpwY99cx7+lslCrTb+ v8HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552134; x=1782156934; 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=Ejk2F2ptZ5cGsQkciGpQQLG73upgLrn32qRb1yp676c=; b=oCIzLuVunb/hRFVQn5PsPy0jSEsTcO7pYyxohTQROZ63zY20ETNnjHa6y7u9My4XaQ B28iv5TFQw7nqZLZd0TSSUFWB1MN6vT2l9DJRq+tnYQNTWvAXB9QSiMB8q4hNRALunS4 Gh7Ay90K8uh8P8bZxreHfm4uKosy3OmovmbrGH8VZm+Um6wF9dMpaw6+F7gOcOSMR9Gw 2W1yLp1ouC2P664dH0v3682cb+WzxVDibKBkaeCE3lE6rLByKKltElJKFThQuqn8yFoD fgDSbW0MkbBP8EZesH048rjxhU+e4tkTXpTHuHD9aeiPNUYUz7sVovmeQEcHcnDmUY6S giZQ== X-Gm-Message-State: AOJu0YxFldUQUkSr4HhAJpOokzwHflQesV4k68kChCs9apoIHuNp1CF8 TOlkpyhz9DZo/7HQBsmg+wCcifmCOXHzAP9OF7K7h2I/+M77qo7iO/39PQWeYKqDSfdvodkDfkq g9fPcFyHDNClkSaNlUtIYxRAdIEmq4QaNOEHZ/Yu+qgMxcCYU930zMPl0BXDBFKg/sikK X-Gm-Gg: Acq92OFFNQ1u3SqP/nESxYYdPmOTzdILZV3/hL8wt2zGYA3xOcbIhN0ldKSGQl7HLNa VoAHlGbeA7BE1DEtPi4R9FK64ANfZOxYXmL1ljMk8ggs36q7LupMgJjJ5XhBQA+0oPXt0Nf0S2j RQzsUUl+M/A0tveC8axgGkdHrj8ypcRMuQbiMMnE81dGcHMCEeQZ3hmG5hXXUD8qyQxY4bGGN+w VIEJDpIScPK/Z/zAVWWmNi93RGXU6qiLwgnvjh9Ft7wplCrWzEGfddNjeCVrIJ+44cSqZpU0bCO 1OBXuujRnPCy0jKOK2sOwyTvR4WFUEQ/6ozUPW9Ru6acfYS8rkRYMSEmUUn7z8avh2LMkrdMllD SZL5ghTuCRkfKI7/ori8wSkpGxHOCgGoGFHPAuqJ9E4YQc8n9ZEGPlNFFBP9zaioQbFsw6lmIMD a6M+U5Yw== X-Received: by 2002:a05:7022:607:b0:132:5d42:55ba with SMTP id a92af1059eb24-1384bb00787mr6198157c88.16.1781552134444; Mon, 15 Jun 2026 12:35:34 -0700 (PDT) X-Received: by 2002:a05:7022:607:b0:132:5d42:55ba with SMTP id a92af1059eb24-1384bb00787mr6198146c88.16.1781552133937; Mon, 15 Jun 2026 12:35:33 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 04/26] plugins: remove type qemu_plugin_simple_cb_t Date: Mon, 15 Jun 2026 12:35:03 -0700 Message-ID: <20260615193526.2883349-5-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V5tNF+ni c=1 sm=1 tr=0 ts=6a305407 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=v0NQEDj6idUmN-g72lQA:9 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: eFF6bdbRy7svL4ZVIDJpOJiWEP3Pa838 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0DjB9NTvG71F VdpQuk9Misvd/76n3OC/aJqj29C/cXXwIjOWwArYIlJDRI0QU+TAf+IGVj188Tyb1kl9IwJ2xXi 8jdkUOrfXKs7PT2/2+kXmB6KlnB6xRY= X-Proofpoint-ORIG-GUID: eFF6bdbRy7svL4ZVIDJpOJiWEP3Pa838 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX1gRpsh4he0fy 1GvQAct9hp/K+8Ef2q8btZrFm2S6Y/xZVcWvRr5iD2UsvmClGWXYzfjNWuOHtSsjZn/Q2lhbyg0 gDJBs0hqDUkWcT9b+zIg3xtkS+HLmJzOTkxeNp664GFR/lf3moUeXygH6CsQuoM03hAwCyLg2E1 oE6nm64+ZWL9aWcFqy60wZsPN4EeKYPJK6MaT5rOg7LEF4sk90iah+7TpWBBZfkrCsD5yQnqzMp +7YUCfQ1t8Dgn53TPyPBViJATIyo6gAJR47Z4/Oe3cTqDmdScUBPd+lUpiGvQWYlYySA5HBRxOg oTgprM1FKSp2O6WL/orOalzSSLO5/psP3fEkgztrniNCsKgz4ScsSR0TRcPlrqVwu57NNrfWkP+ 0I5mJOfKQo4Z1Ycocpnpx8bwspsvV2r4EMvzNK0kj278Rx98HwGmlOr4tnaNR++BjX7hxpJlKwg +MnG/Kcx9thNiccybGg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552211154158500 Content-Type: text/plain; charset="utf-8" We removed all usage of this type, it can now be removed. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 8 -------- include/qemu/plugin.h | 1 - 2 files changed, 9 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 499441bde23..3c6f32bacfe 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -140,14 +140,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, const qemu_info_t *info, int argc, char **argv); =20 -/** - * typedef qemu_plugin_simple_cb_t - simple callback - * @id: the unique qemu_plugin_id_t - * - * This callback passes no information aside from the unique @id. - */ -typedef void (*qemu_plugin_simple_cb_t)(qemu_plugin_id_t id); - /** * typedef qemu_plugin_udata_cb_t - callback with user data * @id: the unique qemu_plugin_id_t diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index ddd77bd82c9..dac08cdc60c 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -55,7 +55,6 @@ void qemu_plugin_opt_parse(const char *optstr, QemuPlugin= List *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; --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552208; cv=none; d=zohomail.com; s=zohoarc; b=j4ecZzLiZSrcmGGbSt7RhfT6bjQYiLtnimnyi7IcF29FPP1vLewX4p42tRuU9nXelRmOlxSkhNZdTSIBPuzuRol7A5A0rUsXS6QOT7qFz2USQBMXx20TMk+/v05WDTq5qX0bDjE7LeDV8jXkqScxfmY5KvTUyGvs4kTeY9nzmR4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552208; 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=Be902IJp2ixq0DdSWpqxRkw2vyU1Rw7SS3KxMwU9nVE=; b=cD9R1Vm2Lz9LBfaM4RX6/KrxS1yw8KA/2MejLGOUwjWC+xXOUOMy0jZvts2twXEva2tlk9OmWwJkyqZOyjQgxjV+EPTWLZgWLUpTkLtL+BpaZJ+JAqRhtVak44frnOpxvub53+jtBbAkZXUbhU4jrV+VdxRxPYhs2tFWSLaik7E= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552208490958.9765546457562; Mon, 15 Jun 2026 12:36:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD67-0002R8-Dg; Mon, 15 Jun 2026 15:35:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0002NO-MA for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:45 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD5u-00019O-IH for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:42 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ17tf1454047 for ; Mon, 15 Jun 2026 19:35:36 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etd2cb4bp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:36 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-304dd917645so7795158eec.1 for ; Mon, 15 Jun 2026 12:35:36 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Be902IJp2ix q0DdSWpqxRkw2vyU1Rw7SS3KxMwU9nVE=; b=UuTvG7idtrBZ5iGQX5utKuVa0Vh oJRj6CWE1sEon04MPJizgzYiAPLopdnU/5uLCAtlYg4j9YTdVZiWQV+QERbX6AmO voD1S/qqNUMjLQ91oy7CK5abTKtZFFExESJG1SPQvZctQbQGFNUZcCwHDavvPR3P CdZ0HMwqjLWgSmAMiyGM+6muOtkc2+RUiEW+4M+cAREhzZd235+r3jLQfmyfNp3c TtxJDZ1/wjzFBFdd1kX28f03Kb7+qOFMezXKK5pEIVUKAzyrNt5BcFTujFPaEWyb 433kvYbHngMOJMGw6PL7lnOdF6M7vcRzxfV4GLlJyRYYzYdGOsusjjMjN7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552136; x=1782156936; 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=Be902IJp2ixq0DdSWpqxRkw2vyU1Rw7SS3KxMwU9nVE=; b=GRR6qCBaR/Lrc+C22rPmhLF+NvGn16Uzq1jA+hb8LFS0rTZUKLmAF54iGBm083/t6H wql2zkzt5/A/TkB/R9whxeaL0lwmCFY1WqeQqi8zW4t+1Fm3+pvPxO7Qpfi5tBFo7mBz eyk1eO7bTdvpcjCPeMuTOFnjEu2EOwvdxH6QMqoulDsNI1Ym0j5nSnTQYqcBVfqiMQ93 1gJhZFwT/HIhgqONV7vtBBsOlIChfzJtm7gWzXTMMi/bjqYlnBjOabBYb2zUEZC2Y9wN Ilv94t+SDBp5sCSheJYwWwtfhLrS4E3smb+ZF5P60gBX+MHvbpXY99FeXJxasOau2D5q H8QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552136; x=1782156936; 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=Be902IJp2ixq0DdSWpqxRkw2vyU1Rw7SS3KxMwU9nVE=; b=h9CDZBSjcFAOYS3+zUnjJWl8Ozw5dP79kq0G4DVVWkx2YzJbn8JggoBEI20e3ZBApj r5aWnSP6Ny2Seu7hTZ+EbF5Xi3pd1vSwRAWkbXc49XCWdJZ3E9kCx8xfZkf40k4PtrMI 4rLDZAycKOSmEwINrB2IyWzyLLBcPxIN/b63VZbDzGlXZGAysh1EtCZUFlDdwtcgiHpE ceILjf99S7QZ0fc1IjwbM8QjitSUHaUtytby8Q+wYppRJGZ66IKH8EEawDESkXUBwrNA VzBx9uPLPIdz4m46kLGZQ6ps1jRoHtmnlKGHUcW8V4T8aKOz7u6uxWxjUAV6e020TkNX Tzvg== X-Gm-Message-State: AOJu0YweZ+ASm51Um3K19oNbWWbKfYFULwmGROfNA3f9oIt2lI8AZNXH vaE1F8FnnvThfUl5EaW8BjrVqKB1YCC14UG1YH3Bd3YVZ2aN86I2IzIMTo26schJOwcQCwmRG63 fROQ7WOHilvHZ0poNw6sEJpWiFY6EWtnAxTGHhkSeES8DkIYhnoI7KTSmjXBtipuntqB6 X-Gm-Gg: Acq92OF9rpts6BePd7Vg63lmmGrNJpASo4mnJphoBC+UB2AVsrotan9X7Zp5IneJYn8 lkvPFnhPOmZnBAtCJxMJQXsv1sXayPpLBI8G+yS/+GTVlnYoigB7gENEkPZQucqtFyu2WQ8lNZj ARI+ZIEaHTCGsMTqLBevU6EbtcYrjeO/+DkOek9ZzE+NqQb9Foq6iy5pJ6xrQgO5sOInky006bW mKVd7cv+KST77GNk810OQqSMNa9Yh4SWRsEQQ2276cnYftAdLdHdStjLHgwcttwZebgnZPwtBuO B872Auittez8KpsQS3J08dfF9pXEEQV3iXfpur8tHB5OHpKlifWDEsvoEqi60a+MzPMne7ba3pW CuBuvh5sU3zwFewYr+Gr/gYKlSJGncnDmC/Fwb3EJPvppShLLy3Siy0G/lKuA1xPNnVkx/I7afo 1ZvIUhcQ== X-Received: by 2002:a05:7022:43a9:b0:136:c565:e847 with SMTP id a92af1059eb24-1384bb84114mr6954305c88.32.1781552135550; Mon, 15 Jun 2026 12:35:35 -0700 (PDT) X-Received: by 2002:a05:7022:43a9:b0:136:c565:e847 with SMTP id a92af1059eb24-1384bb84114mr6954290c88.32.1781552134955; Mon, 15 Jun 2026 12:35:34 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 05/26] plugins: remove qemu_plugin_id_t from qemu_plugin_udata_cb_t Date: Mon, 15 Jun 2026 12:35:04 -0700 Message-ID: <20260615193526.2883349-6-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX5RBDKwoysyNY B+NpsWcHzxdJZDfbIFrU2ezS+9OB3QqpeeenL5O65nsvchEIGlwbZF3xrtGUjQnBHYnsljJffHM PFvKNYtMuKcn8OEwDv86UvCxYuyxOvnJ7fWqMayhWTbzvigvUpP77WR8wZ4HFcrPX8oGmcfuBXE IiadlXT1r67DYlasf7OAeJFfcy+mQ4DeF0TzdpX3pbg3LhmwlrqRW1h+Z3i3+Y8na5XlqC5FpI8 3zv0MU/G037OdsswDsWFpFrblKKvnGio4Wt5gU3cazMRUZLpj+YtEj0Zs62vGHHW1fu5V0erueO QqbOiFs0aQcTI/x9n2u46OVqNXFG7lTkWpGulYIq15RfyNj2AZ5t/nast5YjfWWg/++mDHGY/vZ 2BQzg+GY8aQla/HN7Kzq2IzSw+T4bq2cGTXJRPfiRpQtwTXTILRmMCYOJgBPeVPZy4x4yiE72wL fENMqnc+k65zMafZUtw== X-Proofpoint-ORIG-GUID: bQ9UHSmDPN7gTamMhyceIevwe-QjFXcM X-Proofpoint-GUID: bQ9UHSmDPN7gTamMhyceIevwe-QjFXcM X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXya7WwIcRJjvB AXPR43arcGTrOozDpDghOrVCDhHdAoKYeUpegTjrYz/7CfZi3BuHyW8OhuNKVNwdT74xPP61Qs+ yKh4WQvKkb5XvhrKIqBmFrICg2aWQbY= X-Authority-Analysis: v=2.4 cv=MsRiLWae c=1 sm=1 tr=0 ts=6a305408 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=fy20bCZK_bgFVnb4qsoA:9 a=PxkB5W3o20Ba91AHUih5:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552211159158500 Content-Type: text/plain; charset="utf-8" We can now rely on userdata being always available to pass down this id if needed. In our plugins, only tests/tcg/plugins/reset.c was using it. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/bbv.c | 2 +- contrib/plugins/cache.c | 2 +- contrib/plugins/cflow.c | 2 +- contrib/plugins/drcov.c | 2 +- contrib/plugins/execlog.c | 2 +- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c | 2 +- contrib/plugins/hwprofile.c | 2 +- contrib/plugins/ips.c | 2 +- contrib/plugins/lockstep.c | 8 ++++---- contrib/plugins/stoptrigger.c | 2 +- contrib/plugins/traps.c | 2 +- contrib/plugins/uftrace.c | 2 +- include/plugins/qemu-plugin.h | 3 +-- plugins/core.c | 2 +- plugins/loader.c | 4 ++-- tests/tcg/plugins/bb.c | 2 +- tests/tcg/plugins/inline.c | 2 +- tests/tcg/plugins/insn.c | 2 +- tests/tcg/plugins/mem.c | 2 +- tests/tcg/plugins/reset.c | 7 ++++--- tests/tcg/plugins/syscall.c | 2 +- 23 files changed, 30 insertions(+), 30 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index 5913cc6c637..f2b1b258a90 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -28,7 +28,7 @@ static char *filename; static struct qemu_plugin_scoreboard *vcpus; static uint64_t interval =3D 100000000; =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { Vcpu *vcpu; =20 diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 56508587d3a..f41ddb0aa43 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -694,7 +694,7 @@ finish: g_list_free(miss_insns); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { log_stats(); log_top_insns(); diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b5e33f25f9b..4d00879ccad 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -134,7 +134,7 @@ static gboolean filter_non_branches(gpointer key, gpoin= ter value, return node->dest_count =3D=3D 0; } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) result =3D g_string_new("collected "); GList *data; diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 5edc94dcaf6..458c0d2084d 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -86,7 +86,7 @@ static void count_block(gpointer data, gpointer user_data) } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { unsigned long count =3D 0; g_mutex_lock(&lock); diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index d00d9c4ff39..d347ac25b6f 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -400,7 +400,7 @@ static void vcpu_init(qemu_plugin_id_t id, unsigned int= vcpu_index) /** * On plugin exit, print last instruction in cache */ -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { guint i; g_rw_lock_reader_lock(&expand_array_lock); diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 8ecf0339974..92859872ac9 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -70,7 +70,7 @@ static void exec_count_free(gpointer key, gpointer value,= gpointer user_data) qemu_plugin_scoreboard_free(cnt->exec_count); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report =3D g_string_new("collected "); GList *counts, *sorted_counts, *it; diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 9d48ac969eb..a6d83b06c75 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -73,7 +73,7 @@ static gint cmp_access_count(gconstpointer a, gconstpoint= er b, gpointer d) } =20 =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report =3D g_string_new("Addr, RCPUs, Reads, WCPUs,= Writes\n"); int i; diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 42bddb6566d..75728896198 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -172,7 +172,7 @@ static void free_record(gpointer data) g_free(rec); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report =3D g_string_new("Instruction Classes:\n"); int i; diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index a9838ccc879..b7f96117e94 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -106,7 +106,7 @@ static void fmt_dev_record(GString *s, DeviceCounts *re= c) g_string_append_c(s, '\n'); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report =3D g_string_new(""); GList *counts; diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index f110c565bc4..7614ae1eafd 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -124,7 +124,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) quantum_insn, max_insn_per_quantum, NULL); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *udata) +static void plugin_exit(void *udata) { qemu_plugin_scoreboard_free(vcpus); } diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 36b003ead2d..c1c2b0aca8e 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -77,7 +77,7 @@ static char *path_to_unlink; =20 static bool verbose; =20 -static void plugin_cleanup(qemu_plugin_id_t id, void *userdata) +static void plugin_cleanup(void *userdata) { /* Free our block data */ g_slist_free_full(blocks, &g_free); @@ -90,7 +90,7 @@ static void plugin_cleanup(qemu_plugin_id_t id, void *use= rdata) } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) out =3D g_string_new("No divergence :-)\n"); g_string_append_printf(out, "Executed %ld/%d blocks\n", @@ -98,7 +98,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_string_append_printf(out, "Executed ~%ld instructions\n", insn_count= ); qemu_plugin_outs(out->str); =20 - plugin_cleanup(id, NULL); + plugin_cleanup(NULL); } =20 /* @@ -393,6 +393,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, our_id =3D id; =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); - qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + qemu_plugin_register_atexit_cb(id, plugin_exit, (void *)id); return 0; } diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index b3a6ed66a7b..40f8fd313d7 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -93,7 +93,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qem= u_plugin_tb *tb) } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_hash_table_destroy(addrs_ht); qemu_plugin_scoreboard_free(insn_count_sb); diff --git a/contrib/plugins/traps.c b/contrib/plugins/traps.c index a741580fbf8..4b879a8212a 100644 --- a/contrib/plugins/traps.c +++ b/contrib/plugins/traps.c @@ -44,7 +44,7 @@ static void vcpu_discon(qemu_plugin_id_t id, unsigned int= vcpu_index, } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report; report =3D g_string_new("VCPU, interrupts, exceptions, hostcalls\n"); diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index f974090e23e..a071a34ea75 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -928,7 +928,7 @@ static void vcpu_end(unsigned int vcpu_index) memset(cpu, 0, sizeof(Cpu)); } =20 -static void at_exit(qemu_plugin_id_t id, void *data) +static void at_exit(void *data) { bool system_emulation =3D (bool) data; g_autoptr(GArray) traces =3D g_array_new(0, 0, sizeof(Trace *)); diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 3c6f32bacfe..d7d972103cb 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -142,11 +142,10 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, =20 /** * typedef qemu_plugin_udata_cb_t - callback with user data - * @id: the unique qemu_plugin_id_t * @userdata: a pointer to some user data supplied when the callback * was registered. */ -typedef void (*qemu_plugin_udata_cb_t)(qemu_plugin_id_t id, void *userdata= ); +typedef void (*qemu_plugin_udata_cb_t)(void *userdata); =20 /** * typedef qemu_plugin_vcpu_simple_cb_t - vcpu callback diff --git a/plugins/core.c b/plugins/core.c index 21a3c5b15cf..b0532e8d0de 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -147,7 +147,7 @@ static void plugin_cb__udata(enum qemu_plugin_event ev) QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_udata_cb_t func =3D cb->f.udata; =20 - func(cb->ctx->id, cb->udata); + func(cb->udata); } break; default: diff --git a/plugins/loader.c b/plugins/loader.c index 0d587c344c4..b10ebe8cc05 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -339,7 +339,7 @@ static void plugin_reset_destroy__locked(struct qemu_pl= ugin_reset_data *data) if (data->reset) { g_assert(ctx->resetting); if (data->cb) { - data->cb(ctx->id, data->userdata); + data->cb(data->userdata); } ctx->resetting =3D false; g_free(data); @@ -358,7 +358,7 @@ static void plugin_reset_destroy__locked(struct qemu_pl= ugin_reset_data *data) g_assert(success); QTAILQ_REMOVE(&plugin.ctxs, ctx, entry); if (data->cb) { - data->cb(ctx->id, data->userdata); + data->cb(data->userdata); } if (!g_module_close(ctx->handle)) { warn_report("%s: %s", __func__, g_module_error()); diff --git a/tests/tcg/plugins/bb.c b/tests/tcg/plugins/bb.c index 36776dee1e1..8a854408aaa 100644 --- a/tests/tcg/plugins/bb.c +++ b/tests/tcg/plugins/bb.c @@ -40,7 +40,7 @@ static void gen_one_cpu_report(CPUCount *count, GString *= report, } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) report =3D g_string_new(""); =20 diff --git a/tests/tcg/plugins/inline.c b/tests/tcg/plugins/inline.c index 73dde995781..1d17884b40b 100644 --- a/tests/tcg/plugins/inline.c +++ b/tests/tcg/plugins/inline.c @@ -121,7 +121,7 @@ static void stats_mem(void) g_assert(inl_per_vcpu =3D=3D expected); } =20 -static void plugin_exit(qemu_plugin_id_t id, void *udata) +static void plugin_exit(void *udata) { const unsigned int num_cpus =3D qemu_plugin_num_vcpus(); g_autoptr(GString) stats =3D g_string_new(""); diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index e6c5207cd69..12421054f67 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -190,7 +190,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) } } =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) out =3D g_string_new(NULL); int i; diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index 6b0732dc0fd..5cdf71c7e49 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -68,7 +68,7 @@ static gint addr_order(gconstpointer a, gconstpointer b, = gpointer d) } =20 =20 -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { g_autoptr(GString) out =3D g_string_new(""); =20 diff --git a/tests/tcg/plugins/reset.c b/tests/tcg/plugins/reset.c index 6ea675b8095..ef5a32781b2 100644 --- a/tests/tcg/plugins/reset.c +++ b/tests/tcg/plugins/reset.c @@ -14,7 +14,7 @@ static qemu_plugin_id_t plugin_id; static bool was_reset; static bool was_uninstalled; =20 -static void after_uninstall(qemu_plugin_id_t id, void *userdata) +static void after_uninstall(void *userdata) { g_assert(was_reset && !was_uninstalled); qemu_plugin_outs("uninstall done\n"); @@ -34,8 +34,9 @@ static void tb_trans_after_reset(qemu_plugin_id_t id, str= uct qemu_plugin_tb *tb) QEMU_PLUGIN_CB_NO_REGS, NULL); } =20 -static void after_reset(qemu_plugin_id_t id, void *userdata) +static void after_reset(void *userdata) { + qemu_plugin_id_t id =3D (qemu_plugin_id_t) userdata; g_assert(!was_reset && !was_uninstalled); qemu_plugin_outs("reset done\n"); was_reset =3D true; @@ -45,7 +46,7 @@ static void after_reset(qemu_plugin_id_t id, void *userda= ta) static void tb_exec_before_reset(unsigned int vcpu_index, void *userdata) { g_assert(!was_reset && !was_uninstalled); - qemu_plugin_reset(plugin_id, after_reset, NULL); + qemu_plugin_reset(plugin_id, after_reset, (void *) plugin_id); } =20 static void tb_trans_before_reset(qemu_plugin_id_t id, struct qemu_plugin_= tb *tb) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 5658f830879..938646f9359 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -207,7 +207,7 @@ static gint comp_func(gconstpointer ea, gconstpointer e= b, gpointer d) } =20 /* ***********************************************************************= ** */ -static void plugin_exit(qemu_plugin_id_t id, void *p) +static void plugin_exit(void *p) { if (!statistics) { return; --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552265; cv=none; d=zohomail.com; s=zohoarc; b=NpH7+TDY3ciSxS3tZc0f5I+aj5SKn3iZDUHtxcu6nMcHPTtE01QWYbsB+rRwQfAsNIjAw3tGFTgWAPNnke1r+Venu6sDQowZOR8M1wkHlseaUAu3vD+fqSIk8MaHM79e3NP5ytd22NtZYdd0suPPoQilD7Tr7jTlby4rQSyCje8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552265; 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=yzn3qiSePtnw0NdxwaJmJsTzmyovlVn+lcKr9UC3cRU=; b=GdEtDVxQq72+auOzhwpIhHbDTXHnOlypZ2lFFMNlnTEOwhfaNqmmOYEhCjb8zkbRUieEBbY6NGWQ6B2M5ALA7nJdBcKFE0Gf06jFD2PgAyp2Bo+8jQ/QJ23HQoQZ1uto6hSp5Kdrdol1dG1Q88bKloJadIiM4ilh/jkbA6fsGAI= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552265718955.887296083999; Mon, 15 Jun 2026 12:37:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7W-0003cY-Na; Mon, 15 Jun 2026 15:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0002Ow-6r for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD5z-0001AP-2R for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:45 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxOms781835 for ; Mon, 15 Jun 2026 19:35:37 GMT Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetjtnqs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:37 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-137fc6f8e9fso3914753c88.1 for ; Mon, 15 Jun 2026 12:35:37 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=yzn3qiSePtn w0NdxwaJmJsTzmyovlVn+lcKr9UC3cRU=; b=cEL5k2kBNFMMHWle+V8KeIoyMu6 +oW7+ztlHjRGfuY9RxsB8xT6RRyDXYFMCW3+FBQKL6rvrJ6LaPMA7Jkb43FF2WU2 l2P9ZirRNri3qj7HmtF+EufdAfJURAefKeKvk8S47Y9Tr8gO2L/0+khBi3OAU8hR RB+etZqHDBM2yOmAdPwTPv+snFoeVfz4iZN4xRdvtBL34IZkYye1mtuncgHR1dei 6NOJ1npZeiy67beXkPvJsliMB4ZxB9ObSpbIh6iJiLOkObtnyIiUTmwZM0ejXANr yaDd0T56G6mHClU6ye6REw3rjEqDgWVQNMpwB1JkwRGNWinEvZti7KgCAWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552137; x=1782156937; 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=yzn3qiSePtnw0NdxwaJmJsTzmyovlVn+lcKr9UC3cRU=; b=IbyM+saULMr9VY7OXtxqD2OZz0cDmjrs3jCEBvjGDp4qezqb1LjmMRiCwSyDkjfl7i ZAGgyQitRLs83yuZekluJYQ0D/gJLYkFxRWTy5aGom8pKPRw50dt9hXmAzZnyKx3Pvrf tk9sr1YfF7oKqp1HQrNkh/IGfortYU64AkytWUG6W8L66z7SumyLXXhmj9qbm+BpPeS6 MFtAzUdAVZ0FUn6cSDZHvrAjbqscP0il44uNu+NsSu8jQPySf3f+K01gN6rU7hwKlmi0 Rg8EwMP3dDm98ljZKz1gWNgZ0Fhh483ZMbS27/kpqF6Nf7DUQQFPuphjj9cHA9T9zMH2 w83w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552137; x=1782156937; 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=yzn3qiSePtnw0NdxwaJmJsTzmyovlVn+lcKr9UC3cRU=; b=Qizxj1h8AgRDDZscbJbFv3/Y4iAEaWDXeWYRaueqT5bYrhSarOXM5kQkd4kC/SQPD8 6lfCm2beDE9aUpKrlUQE8/lbygmMniMI5TW9d1EpnpVs9MZkPLVVknMxoBTPcbhJpIlW 2F9B/vcYzvAhXxWemxYIj74Q1wzv1vKOZcdY/YOFQ+R+7aHnyekxa26IP7kzGnMOBs1X /1Ge4mhh6VwrMviHi4SnKBZ9lq5G42KLcBrKyY0oG9U/76Vk0I336lu0eiQKdukHCn0h SslNW8sHnqpHpELYq3HMILuS2CaA+IXsLJNK1gTkQo01Q0mbF0/ky5H02iYjlLfB0mNt dDuA== X-Gm-Message-State: AOJu0Ywz0tLVdYWgkktWbTUfNL2UKwOWfGQStOzJjSKGRIzBOnGpa+jV VCQEoVgs3iPYYQKlUT9wHsmU2NC7r4AAjyK+mwZyFlONXD5+9CsxlhPykTBkJeVfdbwROIGgPgO 8CkVoe3qk9uW3weGDAQdfXQuyfbL799z+I3z2Ii0WunXk9Lj0h1pt4Z9d7LfFukDoZorw X-Gm-Gg: Acq92OH8a9vns1u+cMVqPVFJeVBX3ltai9EIzfrOCOBOAVIp34Sx7V+xyJK0Nyi9HPM TK23V5FvEIt4a8DBGlSoWKtbUAxmJKfVu4qouPFtOphxfHQVi5f+SWQ81B8ArC9SQ7wLZt/0Yj1 HMFAdK0xSfjNDHPqri24z3hlLJOWLdPbh6UorZXbdRlI+o1HHnQ0SUWYHACZxCRH6Y7XckHMx6m Psx1F9rQW1IQn55kWTOYOBTMRRNGQ6aUl8fz8tfRv426mXRntDBV+/NpofTJVKUA9BssgfxskVQ 2/kcRoB7rudY5FdwYiywcK1aphR7ZVwVA9bCnECSwdrP4fSYTIGTZ2wfw0UYzj2+BANyXfIqxfK nk/IhdFQWpY+aebN6WevHeztOo4JdIP4xJFWoqyYnrkokG8XOoAqAO9eBSPEFOJ6+jRS37GLR4x 1mDh3/9w== X-Received: by 2002:a05:7022:608:b0:128:d577:dc21 with SMTP id a92af1059eb24-13985ebb2ccmr250616c88.13.1781552136814; Mon, 15 Jun 2026 12:35:36 -0700 (PDT) X-Received: by 2002:a05:7022:608:b0:128:d577:dc21 with SMTP id a92af1059eb24-13985ebb2ccmr250603c88.13.1781552136241; Mon, 15 Jun 2026 12:35:36 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 06/26] plugins: remove qemu_plugin_id_t from qemu_plugin_vcpu_simple_cb_t Date: Mon, 15 Jun 2026 12:35:05 -0700 Message-ID: <20260615193526.2883349-7-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXy3YKnyI2PqMp OLYWKAKSHvw7O+ZFUfHe2xjL3lja44EH8VCYyeHJMlGK1xTXnDQsETqWanrxmIwBlgB++Ix7RAh EM7+0m8ixgjgk/NIgZlEzT7OBKQbF5+/29kUgrK1/jrOGLW1gip0+2VkngdSabBxvlMc1aTbG1I y0Gi0TFahKvdv6Je/OXHJFjCBWARSb+3CGZo+Bp+eO839P3S2u9ZCUAQ58y4wwPqaYz8Mx1rE9f a9x2o3UvMPR2DZw3CX/6fWE0KUmVj8mUcAijlNaaXouzIRgvo86/1BnjOiIoyHpgjwRfuwHVxgj QhNnhD5rSc4Da2DmP9XErP232eFBSdj9HDbp8h3qA6ctRlpQP+rP2HS4R4STSmhMkdOW4KGvJt9 LcdMwfVLuUyPHenOFCApllITXJt6l9D305ZX4qcvH6BFcFZ3jwprdI4643h1jDx7etqVqUQKtpP LkZByn+VTTfAc0hGgWw== X-Proofpoint-ORIG-GUID: xEckL9qgg3Z16lOlt9kJG7LpQKuqgh7y X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXzyCEUTrIKwC1 Mt46BPozhfRpulFnpenLtWQbO8LhtqElmaU6rpCcgoVEwE9Nm7S2jWWpFNXI3m8XQmvKan5GBbx qr/Ej5b0OBboAMfMLK8hDi0IY+0USUc= X-Authority-Analysis: v=2.4 cv=HttG3UTS c=1 sm=1 tr=0 ts=6a305409 cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=mDV3o1hIAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=rXe6YV4CopgQa2I4tT4A:9 a=Fk4IpSoW4aLDllm1B1p-:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: xEckL9qgg3Z16lOlt9kJG7LpQKuqgh7y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552267119158500 Content-Type: text/plain; charset="utf-8" Not used in all our plugins. Future commits will remove qemu_plugin_vcpu_simple_cb_t completely, and replace it with qemu_plugin_vcpu_udata_cb_t, so id information can be passed using userdata if needed. Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- contrib/plugins/bbv.c | 2 +- contrib/plugins/execlog.c | 2 +- contrib/plugins/ips.c | 4 ++-- contrib/plugins/uftrace.c | 2 +- include/plugins/qemu-plugin.h | 4 +--- plugins/core.c | 6 ++---- tests/tcg/plugins/bb.c | 2 +- tests/tcg/plugins/insn.c | 2 +- tests/tcg/plugins/registers.c | 2 +- 9 files changed, 11 insertions(+), 15 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index f2b1b258a90..72cc896a0a6 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -60,7 +60,7 @@ static qemu_plugin_u64 bb_count_u64(Bb *bb) return qemu_plugin_scoreboard_u64(bb->count); } =20 -static void vcpu_init(qemu_plugin_id_t id, unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index) { g_autofree gchar *vcpu_filename =3D NULL; Vcpu *vcpu =3D qemu_plugin_scoreboard_find(vcpus, vcpu_index); diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index d347ac25b6f..398aa4a1f3f 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -382,7 +382,7 @@ static GPtrArray *registers_init(int vcpu_index) * As we could have multiple threads trying to do this we need to * serialise the expansion under a lock. */ -static void vcpu_init(qemu_plugin_id_t id, unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index) { CPU *c; =20 diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index 7614ae1eafd..32fd86c87ac 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -89,7 +89,7 @@ static void update_system_time(vCPUTime *vcpu) g_mutex_unlock(&global_state_lock); } =20 -static void vcpu_init(qemu_plugin_id_t id, unsigned int cpu_index) +static void vcpu_init(unsigned int cpu_index) { vCPUTime *vcpu =3D qemu_plugin_scoreboard_find(vcpus, cpu_index); vcpu->total_insn =3D 0; @@ -97,7 +97,7 @@ static void vcpu_init(qemu_plugin_id_t id, unsigned int c= pu_index) vcpu->last_quantum_time =3D now_ns(); } =20 -static void vcpu_exit(qemu_plugin_id_t id, unsigned int cpu_index) +static void vcpu_exit(unsigned int cpu_index) { vCPUTime *vcpu =3D qemu_plugin_scoreboard_find(vcpus, cpu_index); update_system_time(vcpu); diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index a071a34ea75..438cebf2831 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -874,7 +874,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) } } =20 -static void vcpu_init(qemu_plugin_id_t id, unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index) { Cpu *cpu =3D qemu_plugin_scoreboard_find(score, vcpu_index); cpu->ops =3D arch_ops; diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index d7d972103cb..8aaf404504b 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -149,11 +149,9 @@ typedef void (*qemu_plugin_udata_cb_t)(void *userdata); =20 /** * typedef qemu_plugin_vcpu_simple_cb_t - vcpu callback - * @id: the unique qemu_plugin_id_t * @vcpu_index: the current vcpu context */ -typedef void (*qemu_plugin_vcpu_simple_cb_t)(qemu_plugin_id_t id, - unsigned int vcpu_index); +typedef void (*qemu_plugin_vcpu_simple_cb_t)(unsigned int vcpu_index); =20 /** * typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback diff --git a/plugins/core.c b/plugins/core.c index b0532e8d0de..217d6608c1d 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -96,8 +96,7 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum qe= mu_plugin_event ev) /* iterate safely; plugins might uninstall themselves at any time = */ QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_simple_cb_t func =3D cb->f.vcpu_simple; - - func(cb->ctx->id, cpu->cpu_index); + func(cpu->cpu_index); } break; default: @@ -306,8 +305,7 @@ static void plugin_vcpu_for_each(gpointer k, gpointer v= , gpointer udata) { struct plugin_for_each_args *args =3D udata; int cpu_index =3D *(int *)k; - - args->cb(args->ctx->id, cpu_index); + args->cb(cpu_index); } =20 void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, diff --git a/tests/tcg/plugins/bb.c b/tests/tcg/plugins/bb.c index 8a854408aaa..f29b466dab2 100644 --- a/tests/tcg/plugins/bb.c +++ b/tests/tcg/plugins/bb.c @@ -56,7 +56,7 @@ static void plugin_exit(void *p) qemu_plugin_scoreboard_free(counts); } =20 -static void vcpu_idle(qemu_plugin_id_t id, unsigned int cpu_index) +static void vcpu_idle(unsigned int cpu_index) { CPUCount *count =3D qemu_plugin_scoreboard_find(counts, cpu_index); g_autoptr(GString) report =3D g_string_new(""); diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index 12421054f67..80f7cbb2967 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -84,7 +84,7 @@ static Instruction * get_insn_record(const char *disas, u= int64_t vaddr, Match *m /* * Initialise a new vcpu with reading the register list */ -static void vcpu_init(qemu_plugin_id_t id, unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index) { g_autoptr(GArray) reg_list =3D qemu_plugin_get_registers(); g_autoptr(GByteArray) reg_value =3D g_byte_array_new(); diff --git a/tests/tcg/plugins/registers.c b/tests/tcg/plugins/registers.c index 6d627c70371..94776d887fe 100644 --- a/tests/tcg/plugins/registers.c +++ b/tests/tcg/plugins/registers.c @@ -21,7 +21,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGI= N_VERSION; * registers that cannot be written to, which would fail the test. * See: https://lists.gnu.org/archive/html/qemu-devel/2026-02/msg07025.html */ -static void vcpu_init_cb(qemu_plugin_id_t id, unsigned int vcpu_index) +static void vcpu_init_cb(unsigned int vcpu_index) { g_autoptr(GArray) regs =3D qemu_plugin_get_registers(); g_assert(regs !=3D NULL); --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552320; cv=none; d=zohomail.com; s=zohoarc; b=dLNiL4Mz20SFG5nK/ZmLChZjNO9MjfTlLbtEt2Kf+24jKZwl2dst1x1P0YkCC8NNoMdatiiYTjq8hjuXoQRZ9evnCg5Tnsxv9xY/HAh8NpCew81t4mi2os2HL2Ro9cg5TpCcZtLjdDks4LIt/B7FDVo3f7Y4luxvvyBZI85DVEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552320; 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=t2bYWvc1JcuRE6kIhJNG9vEcyanzDaz0CZ8YQ1WeCdM=; b=Tcja9y8uHVCzHYckQ2PiseX+rFesQGDSWJLWulEyy1vUsQJ/NTSDPnP49hIgqLaM5TulV8HNyRgU+RQi2ClRH/AqaepWnhhJSzEXkQZbrFgQo4B0BWZ7atFilAGAYTKNK4VkG4M2Pr7dwHaHrfiXe4U+3XPX8OX1gWunB0vNPgA= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552320051176.80504494977515; Mon, 15 Jun 2026 12:38:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD68-0002R9-4y; Mon, 15 Jun 2026 15:35:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD61-0002NU-DQ for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:46 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD5w-0001Bi-N2 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:45 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1URU1433453 for ; Mon, 15 Jun 2026 19:35:39 GMT Received: from mail-dl1-f70.google.com (mail-dl1-f70.google.com [74.125.82.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etgvhj46c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:39 +0000 (GMT) Received: by mail-dl1-f70.google.com with SMTP id a92af1059eb24-1382f39e4b5so2455204c88.1 for ; Mon, 15 Jun 2026 12:35:39 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=t2bYWvc1Jcu RE6kIhJNG9vEcyanzDaz0CZ8YQ1WeCdM=; b=CFrUcnpGgLuC+Qkf+ICAB0+1c+v hWT/GfEh5u1Pd7LYir1e4GE2SeUGqZKBwtUYhv0VbqjaYzfdiBRuVbk98RgylaEH xtDqm5LmQNf9eQqf0uxJfywBf3wyXWm8M0IXyU6mAbXPY/VSyA45Zw3Za/vgm/5t tl6wXTsB1J5o1npiuZKhdPqdI8hjZlS4RY0Ukiuwcd6btym7Ij1onIbaIWZSrA+J 2GoGeI4USEM5iGL1NSzDuYlZBXTTEmNghdBWdYXppcGNpWztX9oXclGogWMoM6ax S4WP2ddgeneWMjHDde6lPu+gZ8qmZBtsmb7qgUkA+fOEW6ke6eZg7wZwvDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552138; x=1782156938; 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=t2bYWvc1JcuRE6kIhJNG9vEcyanzDaz0CZ8YQ1WeCdM=; b=iI/2gdiJhJKJL/ngUpWnKS5S3QtmIWwJJDinsDiNkVdxxnUN3tg6rx87cVRK2cBfOK Nswl0uOG4nSys6MpiY/piHMc6JPVW6GGB0CWZPgmM65SuGbbNPNY39BLxRHZMH6VIFmO GgE0D7LtISb33cPPoN4NPdDBQC430xREn/FJdlqlDGab33zFNlqgMqQSEPvNhWeI74Qc FSXW8VpLlIMQAIQMBWnBHIsaVe5AVYLcYm5GMCnyhw1T0rufJJhkxPwbWP/zfJue9IrI Th2LK4KrP5YjqQ1HxVOpLfJv0lNswbRUyThIjZhrJGD/kzJmeaaVusM5sR/EWCtuw1J8 hfpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552138; x=1782156938; 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=t2bYWvc1JcuRE6kIhJNG9vEcyanzDaz0CZ8YQ1WeCdM=; b=AH/6Xx3SPbV7W5Gd2186MYNEJXg0jRDvthgdkHz5bVg7LqO5SkVwAgz/xVnOcBG6/H BN+cuMfEP0G1YvDka9Oegp4WrgUUwbjsMHrAuyLLogH36KQBXe8ciYPcA7MsQxgr4i2Z qeT2RmiNxMR/YL69k5Vt4sDQLcrMztaJWAS36WgGTJrQLKvbG6S+EkwRoMQbQTaI4IqG UY/ijgPxezeHio5uGm4WMGHhgssVwUoDTR42SdB0rdCWkRli0zMNsen83RpVlVRQkeDC 0yvh2Wcb+57qROKZwJvW2+e5UjFKATYir2zBAf4cEfwsOg1D8zDKofFW0o65fklqex7a hOPw== X-Gm-Message-State: AOJu0YyKbxlE0Qt0TkzBfUlx2SQlc7pFDE5+tu2ky4iU/2d2SqVLdwVv Z2NGzKs5L4PpSwGZFJ6A+KdDtCujcvlC3XHzEZ19FXP+osd1tdzTxg43ICMWPXrbl9OQrYJXhbP 4cvwiyc1/QBfMX3fE6zYtmVuF1relv5QFAkV0SNDwq9++Jgk6VR4sKgHX8XEyIz3hWNPG X-Gm-Gg: Acq92OECSMRySftwbn7My1JOsQCSb2bVQuWwBsgnFk4E+/9Bh7YInGzOiXzzzF5kwjs bYzpbplAbpOlB27hgeBYJZTY7Y4m6cxGhPbz6iX/2ypEew8cWmzI81Wz5eoMAmeDTla82BKMnRo 3MbX+2S0+UyS5lNEzPON1aFMZqQTQ5rK7xxS8M5bw8y6LVsRxjpEk89xwJeym8Fh/CGJRNRUFFO MGT4cDzaReHFrByxVRPVPgUfXwhn3A4pZdsjb1DJI2+tm0rtZx54fcTak3nMpIoTQKPMXgntvjK MmU5ADsKdLqyVZos4pwTCNp5ZgfWNwYQ/BYOXjX5bQLB/RXliSvFJ33pTztJ8U2j16A2DJKjFgk 2G6xMcBYZ+CEueOs4xG59n/lyLM52/bIWmTz28hGEAvLY7pb6ER6GlBZdpvpRijNbko1jEen56w SD5VZxPg== X-Received: by 2002:a05:7022:78e:b0:123:3c24:b15 with SMTP id a92af1059eb24-13985818f2amr409486c88.19.1781552138367; Mon, 15 Jun 2026 12:35:38 -0700 (PDT) X-Received: by 2002:a05:7022:78e:b0:123:3c24:b15 with SMTP id a92af1059eb24-13985818f2amr409468c88.19.1781552137803; Mon, 15 Jun 2026 12:35:37 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 07/26] plugins: add userdata to qemu_plugin_register_vcpu_init_cb Date: Mon, 15 Jun 2026 12:35:06 -0700 Message-ID: <20260615193526.2883349-8-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0YnnVTAbyQjy /z3k90QfUtr1cdDjcktk6y0WGhr507Wa/yL1KN06zLWWeREC1duGaddnFOPv5dLfdS0cRuP4ryn XBxryDWfSV6F1f4sSfQdtYvRyw0G8CQ= X-Authority-Analysis: v=2.4 cv=Zqnd7d7G c=1 sm=1 tr=0 ts=6a30540b cx=c_pps a=SvEPeNj+VMjHSW//kvnxuw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=mDV3o1hIAAAA:8 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=g9HC7tbVjW3t9h3uCicA:9 a=Kq8ClHjjuc5pcCNDwlU0:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: qnxR5BR8FsK-i4qfqAm1cOT5bnNpwYl4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX8NlSUfsgwSYn LaMjvx5Nf73JPFS5mEOwX32rSICFkwmKypoHayXHS9u6aEFHxjTp+QpMLQAH/us4MgG1GrmKUaP ABiL9yMvVIdVCu0oRg0xGaYChCYzMa/u61ln9s9wI2sliHeY7JSdPrEnnJd7/BRLz4SAdhgPS78 BNzX7OlOj+plmGMt3Ff41AmKcrCC8REaH7febgN3RUKJZzV/lrUsKuqmrVRcElrlDI5WqDT24lG xta4wxrbjWWH56avkQFxHnQBAZ2uBg0vlLwHWhTkfYPhR5yNCXaVwA40/wwDM0CnbOfrRfWzqL0 y5skNH/nYnLFBM7FqOQpI0C4FFuuFuo6E3FWRTz56mDmJ2JzlYjfyZTq3LHqFiLqZyxGyjzOQPO Q+RHEuXcxUR/5Zkw+EBB+ajsNHNfLa7cvkpHIC2Zs6xP8qMsPj2UuKzU9PhkkyhK/ZWRJlOXG1x f6D5szs7DMUnMRmnYRg== X-Proofpoint-ORIG-GUID: qnxR5BR8FsK-i4qfqAm1cOT5bnNpwYl4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552320472158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/bbv.c | 4 ++-- contrib/plugins/execlog.c | 4 ++-- contrib/plugins/ips.c | 4 ++-- contrib/plugins/uftrace.c | 4 ++-- include/plugins/qemu-plugin.h | 4 +++- plugins/api.c | 5 +++-- plugins/core.c | 25 +++++++++++++++++++++++-- tests/tcg/plugins/insn.c | 4 ++-- tests/tcg/plugins/registers.c | 4 ++-- 9 files changed, 41 insertions(+), 17 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index 72cc896a0a6..0ad1301a1de 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -60,7 +60,7 @@ static qemu_plugin_u64 bb_count_u64(Bb *bb) return qemu_plugin_scoreboard_u64(bb->count); } =20 -static void vcpu_init(unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index, void *userdata) { g_autofree gchar *vcpu_filename =3D NULL; Vcpu *vcpu =3D qemu_plugin_scoreboard_find(vcpus, vcpu_index); @@ -156,7 +156,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, bbs =3D g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, free_= bb); vcpus =3D qemu_plugin_scoreboard_new(sizeof(Vcpu)); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); - qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); =20 return 0; diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 398aa4a1f3f..2d02816a184 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -382,7 +382,7 @@ static GPtrArray *registers_init(int vcpu_index) * As we could have multiple threads trying to do this we need to * serialise the expansion under a lock. */ -static void vcpu_init(unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index, void *userdata) { CPU *c; =20 @@ -481,7 +481,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, } =20 /* Register init, translation block and exit callbacks */ - qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index 32fd86c87ac..1290a624489 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -89,7 +89,7 @@ static void update_system_time(vCPUTime *vcpu) g_mutex_unlock(&global_state_lock); } =20 -static void vcpu_init(unsigned int cpu_index) +static void vcpu_init(unsigned int cpu_index, void *userdata) { vCPUTime *vcpu =3D qemu_plugin_scoreboard_find(vcpus, cpu_index); vcpu->total_insn =3D 0; @@ -207,7 +207,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, g_assert(time_handle); =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); - qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index 438cebf2831..8be8409dce2 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -874,7 +874,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) } } =20 -static void vcpu_init(unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index, void *userdata) { Cpu *cpu =3D qemu_plugin_scoreboard_find(score, vcpu_index); cpu->ops =3D arch_ops; @@ -985,7 +985,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, } =20 score =3D qemu_plugin_scoreboard_new(sizeof(Cpu)); - qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_atexit_cb(id, at_exit, (void *) info->system_emul= ation); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); =20 diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 8aaf404504b..bb4569a2291 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -242,6 +242,7 @@ void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin= _udata_cb_t cb, * qemu_plugin_register_vcpu_init_cb() - register a vCPU initialization ca= llback * @id: plugin ID * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a vCPU is initialized. * @@ -249,7 +250,8 @@ void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin= _udata_cb_t cb, */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb); + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_exit_cb() - register a vCPU exit callback diff --git a/plugins/api.c b/plugins/api.c index 91c9a24a6b2..68b564bb9c2 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -71,9 +71,10 @@ void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin_= udata_cb_t cb, */ =20 void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb) + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_INIT, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_INIT, cb, userdata); } =20 void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id_t id, diff --git a/plugins/core.c b/plugins/core.c index 217d6608c1d..48db38fe924 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -89,7 +89,6 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum qe= mu_plugin_event ev) struct qemu_plugin_cb *cb, *next; =20 switch (ev) { - case QEMU_PLUGIN_EV_VCPU_INIT: case QEMU_PLUGIN_EV_VCPU_EXIT: case QEMU_PLUGIN_EV_VCPU_IDLE: case QEMU_PLUGIN_EV_VCPU_RESUME: @@ -104,6 +103,28 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum= qemu_plugin_event ev) } } =20 +/* + * Disable CFI checks. + * The callback function has been loaded from an external library so we do= not + * have type information + */ +QEMU_DISABLE_CFI +static void plugin_vcpu_cb__udata(CPUState *cpu, enum qemu_plugin_event ev) +{ + struct qemu_plugin_cb *cb, *next; + + switch (ev) { + case QEMU_PLUGIN_EV_VCPU_INIT: + QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { + qemu_plugin_vcpu_udata_cb_t func =3D cb->f.vcpu_udata; + func(cpu->cpu_index, cb->udata); + } + break; + default: + g_assert_not_reached(); + } +} + /* * Disable CFI checks. * The callback function has been loaded from an external library so we do= not @@ -271,7 +292,7 @@ static void qemu_plugin_vcpu_init__async(CPUState *cpu,= run_on_cpu_data unused) qemu_rec_mutex_unlock(&plugin.lock); =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS); - plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_INIT); + plugin_vcpu_cb__udata(cpu, QEMU_PLUGIN_EV_VCPU_INIT); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } =20 diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index 80f7cbb2967..d9f94888d6f 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -84,7 +84,7 @@ static Instruction * get_insn_record(const char *disas, u= int64_t vaddr, Match *m /* * Initialise a new vcpu with reading the register list */ -static void vcpu_init(unsigned int vcpu_index) +static void vcpu_init(unsigned int vcpu_index, void *userdata) { g_autoptr(GArray) reg_list =3D qemu_plugin_get_registers(); g_autoptr(GByteArray) reg_value =3D g_byte_array_new(); @@ -296,7 +296,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, qemu_plugin_scoreboard_new(sizeof(uint64_t))); =20 /* Register init, translation block and exit callbacks */ - qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; diff --git a/tests/tcg/plugins/registers.c b/tests/tcg/plugins/registers.c index 94776d887fe..0e41734435f 100644 --- a/tests/tcg/plugins/registers.c +++ b/tests/tcg/plugins/registers.c @@ -21,7 +21,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGI= N_VERSION; * registers that cannot be written to, which would fail the test. * See: https://lists.gnu.org/archive/html/qemu-devel/2026-02/msg07025.html */ -static void vcpu_init_cb(unsigned int vcpu_index) +static void vcpu_init_cb(unsigned int vcpu_index, void *userdata) { g_autoptr(GArray) regs =3D qemu_plugin_get_registers(); g_assert(regs !=3D NULL); @@ -74,6 +74,6 @@ 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_init_cb(id, vcpu_init_cb); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init_cb, NULL); return 0; } --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552213; cv=none; d=zohomail.com; s=zohoarc; b=ZNJGPDqhIjkNJ78nujO8IAU+T2YixmNPJ6IZnPlKhdMH9qwuIja2z/stfX/4CaCLuaHIDdn4ghInPzvjjBn635DL6Z9b+r1ACZdsfHFG/1KLSi7MRdKZCXiHt3oNH8nzeI2U5WiYazVAlELixiiNl4RLKSR95HYyYehVd3MPciA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552213; 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=QBs8hcj5K4It44y13S9/c8NGqkWalfz+udaJQow+pPk=; b=FB22ClQyuc33ZHgO0Niqrt09XCuaUKS3fHjB8x0RlZk5bHrNXDc1YK1DTTDurz06U15q2HL8nzNnU8GxcM9WU8YQtvxgjnmxW2sveLTTbKI0eO4oSeBGLigZCI7sejNO/rW2IoAbLXTDO/vSVi4UzpTtpRf3RZLQZChX0oV9yyM= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552213438907.5053502604562; Mon, 15 Jun 2026 12:36:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6Z-0002bE-Uv; Mon, 15 Jun 2026 15:36:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD64-0002PD-8u for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0001C1-6L for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxJFF781720 for ; Mon, 15 Jun 2026 19:35:40 GMT Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetjtnqy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:40 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-139553dd8acso3745830c88.0 for ; Mon, 15 Jun 2026 12:35:40 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=QBs8hcj5K4I t44y13S9/c8NGqkWalfz+udaJQow+pPk=; b=FpjzWZhbbTECbbkIA7o69ONHfbc nqMB2TA8KjWYzpkcZm/ChC3lMOk7HqVCwfSFUhfi4j7ZMfBUfdUhxZBz6+hJhOfX sDxMHfKXCxh/gAD49/AER5r7McoDTS09ZxqvOyrbCkabvQLpTc+mqaj00r0PLdK9 tgUWraElEPwc2snC7EuuMTJOLVntJUUZTruaNJTdDDRJli4GXXHrtN4d7V2KFzgz mpXsAgpmaflox9AB0PL6QpJXKWzF64EJ3LYPf92ceffw8GLf+KvEjyyIFEIAWPQO ZR0KYENrAmGhAkJcVYyAcuvKf5MOjq/HRbu98oE8ARAXs7JWr4mTuD129wQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552139; x=1782156939; 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=QBs8hcj5K4It44y13S9/c8NGqkWalfz+udaJQow+pPk=; b=VPG/XFmfYEst7SP65udcN+wIfXaESYU1WSuzAR4+To4Fv1mZCtOswOfBENForwH21l BlZsKeWwpdhMzFD50cXE+PCp/9hFJYz4g3UEaTooZlsZddHDJi3LIyG/c5jWofISRQUL 9q6VezW/0bnRNpNOPxZRI4nstv/ycAjMTQD0hYnNxJvtUCEYRvfYnbjQCPC5qP7bP/I6 d6RCigAQGXmWp7t1o7EV5xmBslKe8wMgLyH0pLsqsGPCJ90g9J6ZiwL/j+OjXlFidNqu 6UrFwwJRL6cG2WlqjHTssN761E1f1DTRJSt5sEvirkWikfIc1JQrKY5kZwdYUlcu9pHu 8n3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552139; x=1782156939; 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=QBs8hcj5K4It44y13S9/c8NGqkWalfz+udaJQow+pPk=; b=ZFxoC23oUgkoNKeb3Qa7Wwc8DOcRkUe0eXRL886Xu8KXA7GlmVuQq7ADzMjtMEe9jm +G8MtWGMB0NQOg3Ob5m+7UCjGpJKpZesGg4FJBHQJMah3hkOA90lE7AgO7qAdGBGLO3q tutKGdY4EDsKMF/ERCXxulHvG8XOcndGYkdY0zeFiYKbhP20OwJBX1woPmV2Mlgqq40n rxeEmrB5FBatS0ShxE+PCbgjRTgkOTt06agXmJcoCDvnVQkjvm+gS4KyUFbv6EzrdG4/ n6ZSU3/omgkKAflODXaUHnT9LwVqos2ZG4NcektyD08/5XoBNcYwvwj4Ov7eW8xaUU/2 /nLg== X-Gm-Message-State: AOJu0Yy+Q3qdCsJFepvTirYG38fGEbt/4tAF67vmllhNm8zh0G7MXf8b srzJWSVMYvYL2eZATnaNkGtGTNaIHN0w9qbtkcBHQM/05Q4jdBIM4P1W5ITcTifk6cfzV3rUOj6 r/4Cg6XfspLiKaoOt9JieAeqijpaPYrVR6kzXjmXLkOOXhxX2OyQ5vSXal1u7hgDzbXuw X-Gm-Gg: Acq92OH0a9rj4iMXerJjcQYyEKI8iEuzBxbiQ8PeTC+jgi0aqaslxtR3+CAb9scHA16 8O6lJXtKKYo+QuRDTcMIMy27X8/Mmv96kO9xHj1kvCzZIaF2lne4+suL0GE8kHPXc0YLy5JlqGf qtoQhTVD6tDQQcvoQwtiDSQ636ksYerWXPB1FBWS5ew5Lf6aOhUmd9eLxoz48gNt9x43bZTRtLY 9a7V6cAT8jFUtJ8IXfcGM9bfoLaZ0FVGDoIfXtP9TbaAHiU6Ta+nUs5MIoS7bhFq7gmgicqbl0L erfe2m8T0x2r521Sl4gP+mwLrTzjJFiSgGZpPx+S946VdOzIJPQnkflmaCZk1JJm6wfY7iqvgFa IxSaNK24TjYwBcD5rCJs331yA/8zU03lMxv6Okt0tKBQEbSuzIatLifMxAoXPrhX2MGCEkHwJKS kSdZ9NSA== X-Received: by 2002:a05:7022:98e:b0:138:236a:c521 with SMTP id a92af1059eb24-13985e96053mr224970c88.2.1781552139458; Mon, 15 Jun 2026 12:35:39 -0700 (PDT) X-Received: by 2002:a05:7022:98e:b0:138:236a:c521 with SMTP id a92af1059eb24-13985e96053mr224946c88.2.1781552138912; Mon, 15 Jun 2026 12:35:38 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 08/26] plugins: add userdata to qemu_plugin_register_vcpu_exit_cb Date: Mon, 15 Jun 2026 12:35:07 -0700 Message-ID: <20260615193526.2883349-9-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX3s/UmbuKaLpj y9iunLc/VRctQzQ0wFrTAXkbAojEZwBizSXa6ICXaV1SFgPCHiDHkNgP7piz8wZo6aW9cM5dilo 13BU6wK8Q9eeDWy/Wuzg2S1FNDllQT7u+4Ewbix9j16D2J+jIZHjCFDC02Qf5byNXo38D/Valmu 22/sXSFXw1reh1SPrSI6B8aGct76n+t/lejpv4f7uWN7SRkeZRySFYeGunyHhZ5QmZ5vwsGGg8K Askm2g505SLXLmaUp7aLhGYfIjGPl0jv+HgRLDMUfjKyzkMkWLZvpp2nQjCdrLjQCnbXQKomHNq e/bQEYBa2IdZ03aFBLrL3Y2TVcOTrXNZGb9F2tjz+p3XnWYf3Th0tkNm39TVUd8q6FfgoPREMkM CBNgUvlq9tlOKavVBxOcI5oTKtjgU9vid+q4WOTpvBXOYrAFmwvFtEubZF1u3S+ygM/y9dunLue /Z9BuSAGqSixnhknq9Q== X-Proofpoint-ORIG-GUID: xyJyBipzviRr1k_1x4oUVNADlq9owJ59 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX6ElRlzfoKpRD pYa4lsQPeonWbcz21M+wTsTLZ26SMOfVQA9IEolRjl6z3h1VAS7pbKD5CDG0GUhpSeQRpkxunOs rCPmshbxlUHDLSFD29cWS8j1MrLXIUg= X-Authority-Analysis: v=2.4 cv=HttG3UTS c=1 sm=1 tr=0 ts=6a30540c cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=0jW8HPKGe0YpTzYbc6QA:9 a=Fk4IpSoW4aLDllm1B1p-:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: xyJyBipzviRr1k_1x4oUVNADlq9owJ59 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552214916158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/ips.c | 4 ++-- include/plugins/qemu-plugin.h | 4 +++- plugins/api.c | 5 +++-- plugins/core.c | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index 1290a624489..2c110906731 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -97,7 +97,7 @@ static void vcpu_init(unsigned int cpu_index, void *userd= ata) vcpu->last_quantum_time =3D now_ns(); } =20 -static void vcpu_exit(unsigned int cpu_index) +static void vcpu_exit(unsigned int cpu_index, void *userdata) { vCPUTime *vcpu =3D qemu_plugin_scoreboard_find(vcpus, cpu_index); update_system_time(vcpu); @@ -208,7 +208,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); - qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit); + qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 return 0; diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index bb4569a2291..d4f8a99027e 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -257,6 +257,7 @@ void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t= id, * qemu_plugin_register_vcpu_exit_cb() - register a vCPU exit callback * @id: plugin ID * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a vCPU exits. * @@ -264,7 +265,8 @@ void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t= id, */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb); + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_idle_cb() - register a vCPU idle callback diff --git a/plugins/api.c b/plugins/api.c index 68b564bb9c2..849790fe13b 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -78,9 +78,10 @@ void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t = id, } =20 void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb) + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_EXIT, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_EXIT, cb, userdata); } =20 static bool tb_is_mem_only(void) diff --git a/plugins/core.c b/plugins/core.c index 48db38fe924..c7dda9b2ff1 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -89,7 +89,6 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum qe= mu_plugin_event ev) struct qemu_plugin_cb *cb, *next; =20 switch (ev) { - case QEMU_PLUGIN_EV_VCPU_EXIT: case QEMU_PLUGIN_EV_VCPU_IDLE: case QEMU_PLUGIN_EV_VCPU_RESUME: /* iterate safely; plugins might uninstall themselves at any time = */ @@ -115,6 +114,7 @@ static void plugin_vcpu_cb__udata(CPUState *cpu, enum q= emu_plugin_event ev) =20 switch (ev) { case QEMU_PLUGIN_EV_VCPU_INIT: + case QEMU_PLUGIN_EV_VCPU_EXIT: QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_udata_cb_t func =3D cb->f.vcpu_udata; func(cpu->cpu_index, cb->udata); @@ -307,7 +307,7 @@ void qemu_plugin_vcpu_exit_hook(CPUState *cpu) bool success; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS); - plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_EXIT); + plugin_vcpu_cb__udata(cpu, QEMU_PLUGIN_EV_VCPU_EXIT); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); =20 assert(cpu->cpu_index !=3D UNASSIGNED_CPU_INDEX); --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552208; cv=none; d=zohomail.com; s=zohoarc; b=juOKb/SqqtcHIU9AoZhD+6nIUH0aZM7rlDr2rPEg9OCjoCMIFFhymMNjM9naqcb3hJxNKLyu4Ej52cZDHideooU41KKUQyiFWzIxf1jFVojSTUeUJ+2WJU/S5aOL1b2pfcDj18+qTGWUlGGe64KD1msmDsp2jaAymRPr0ftp90M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552208; 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=RJFWVPkG9QrZJmZNctfVzSlroAJyL4r2vLEikBq53Qs=; b=U6662W8zaF0/DpXNsjnZPs8f7S+cm6jeXSpTBAO0WAZ7wgQZIbcFrhR4yv12yZmJhOsaTIa0Ctymgqm/o9QklyNcq/hi5ppCooEooSX5rzUAA/gztiUklB0ULZ8UN+n1Vi2i2ao+pEGtALhmYmJ4676Sicxe1iOAypNo8YsU3to= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178155220872243.60491127217256; Mon, 15 Jun 2026 12:36:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6Q-0002Uo-NQ; Mon, 15 Jun 2026 15:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0002Oz-GF for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0001EG-3p for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:46 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1afF1367854 for ; Mon, 15 Jun 2026 19:35:41 GMT Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etegutnfm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:41 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-30b877ee493so1082406eec.1 for ; Mon, 15 Jun 2026 12:35:40 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=RJFWVPkG9Qr ZJmZNctfVzSlroAJyL4r2vLEikBq53Qs=; b=RpzABoCz0abvMPBdeIdej0/VJDm Kp0s70XFgblT7UNnleNZgWeVzap/XctOitbszLe2c5Cr+dvENyjyC38cLyK7b4q6 go7s7w4GPZ3Z7DmuKRYMGvAAO9l6wAsOyUsyi4DnKn5Tje5S+lmnXLgs7lOSvtle TXFGTMnLQIrRZf8+1orBfGst1qmhl3uLwyaxRFZmJy4/TdXzhRvFo4mth0IhJQwO f42Sow3rCPt1s1QbUmmfSvYdok+Tfp7RhKpvnOANF3BRFAwmJyR7fbluPyaqlTyP W1QJRiLwZDHR2g+VYTrfIG58THelVSqcTrYGF5sbwuCsE99HJdAPZVEaTFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552140; x=1782156940; 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=RJFWVPkG9QrZJmZNctfVzSlroAJyL4r2vLEikBq53Qs=; b=iG/XrbcUYsWdiG2i2fBII5BZOKdQ8chOzu1bHspPVvThdvzHDf62W0PduuzaGCq0YF mT+qAXuxgFxaMT/To/vhaV7afhe1D+RsTckRCM6sYfKiahNRubCwn8x8OpKx8CBQECYd 6u62VzgAdRmM4Wr2hw6Hq6zQvDLpIdmvFgr/WMOny2h2luXc6wfk/NaP9kFTKyLKvA2N 7JMrTRMrkH/rP39jR7RPnRFdqrMvl/OhKwllgids4hOjTtncbp+CBNIssylk/Kkd6xJp MPWP1NeAhyp27Fnaf40jNcQTpuxmHI4QR1EmpRZryS2rrO05Dz6dVw8LA09cywCxj/TP 2Wrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552140; x=1782156940; 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=RJFWVPkG9QrZJmZNctfVzSlroAJyL4r2vLEikBq53Qs=; b=qtStidMOGwr8rMqXj2MzjWpTPAIV4THnENaGYDIIk2wb0CUgtl4OC2Va/MwL/osN/i W6bsM04uyDnKZN56RJcecKuJVRPwlXu5jaUsJOeibxs+aTpAXHT6Wh4rkjadruarxxh0 krcJPtqu28caqnGMtSOpKKRLGVjmDZTsad5rocJj2P/3iEbTWYdoaxr/5uvLGu/eZRIp 3yECLp5KR/rY0uqHY1ZrPifSuQcMBkuWiJLcWMwvlEPfEmSBo51DLYkx86MjnChcZ6fH 04XjGyJXq7AP2ayeT7I/8Ha44iqrIepbqyn5uIOikSWR2Wbnu4E8P4hWCOA9iYidHNFY m0Og== X-Gm-Message-State: AOJu0Yyx4G+QJLeSn1orhNmJObgFTCI+2I27bflKYgCgcwAL6xhSg4Sm mz28Kc/JuYFItuO4i0yKm2d+bZXulebFw/BPH3cZpEPvJwDh/UJ4S1vIsVopHh0Hs1r/i08gsCu QqVfKvej6TtZcRQnfVELMJoLL+xFzaiPQ9qJ9vKVm3BpyE8THHca+Pmly/3CnqsjgcKnQ X-Gm-Gg: Acq92OFluyQ9xTrmgNYPhwpxH4pUVAMoEEcLX10tFnjH+SD4c6mFNYwcsZhLL3aUQvW 68l/sxebEn1NWlwZNpHYI/vUGxey6lLufAmuxLsboA56L7EdBJM1TeSKIy99g76K8kKPHw81z9/ pJJFcFtq+g1YBccDyLf0UfGwm5g47wy24sITkLme2Bo7KIb9y7YF7/y12TwOo1B/uwkPWGKBcAX g12oKRGOiaBWqMReMPqUJvRzAhq9fTw0mJiN2Rj5CbcFilyPa6Z+9UnFreKes0rxUZEollO+som sOj8C/dXUKFgtQkFIq3zckOn4nMgK4tVE+iGOL06yaCeAsZwOGrfIyoXbywwNU5wAZr/jMR+fec A8Qj5Z6eGaP/k+2gwTbAvy8Thimnq3E9f1FfCK8epwkuPIrbZUsCLRRlGjJDCEIXqKI0+bbjc70 caVWKBYw== X-Received: by 2002:a05:7022:ba9:b0:136:aebc:24f5 with SMTP id a92af1059eb24-139857f4e3cmr408433c88.15.1781552140170; Mon, 15 Jun 2026 12:35:40 -0700 (PDT) X-Received: by 2002:a05:7022:ba9:b0:136:aebc:24f5 with SMTP id a92af1059eb24-139857f4e3cmr408421c88.15.1781552139679; Mon, 15 Jun 2026 12:35:39 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 09/26] plugins: add userdata to qemu_plugin_register_vcpu_idle_cb Date: Mon, 15 Jun 2026 12:35:08 -0700 Message-ID: <20260615193526.2883349-10-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX9i9LaFQ/XYkr yLivUNfI7DZN/qx7YEzhMPVj80HplgpI+I1tHVuQurtvtrrgDFyjzvgAW0FaJKOS9/ZLINHKv52 /vT8XKYcB3AMNthVqJiDiNPHhWIYtyGVFKnYSfXdzpZYPSmQgQzZ0iPxQM+XjeAA46P40Sj/rWA JY5Qx3Kd4Q6TdoiFpoM+ZwWuMricvRRAb3c5Sq4YqworY8wzU9y37NKgObUM2cjwDbnRKPhCbY1 eaEOfCPF3UE1ij/v/LDq3rdUID/Flgm3WJGRv0xHWDbtcs3wdE+PQv8GUDv/bwSViav9OG9SdVn Rdq3HbGS5cuLUKXMJBZyvP2hFpNJnfmQeFluxBGFR3epAilCTciY+hGsGT7W4YLKf16bpbKpgrQ syLDYnzrJClB8rFLAGIk/9KDRlZXWIAHlpc/tTDvQYRSAgLAFzn5+aRDzUx9YqwhkLfa52oKLSW OWuTTXLXu4395gvwyMA== X-Proofpoint-ORIG-GUID: A6y5oF7SGxlLiV8vnNOLdrLlI2QBGjBX X-Authority-Analysis: v=2.4 cv=HMvz0Itv c=1 sm=1 tr=0 ts=6a30540d cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=1QjUMDCEHWFJ5QTWXisA:9 a=scEy_gLbYbu1JhEsrz4S:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX9Zhlrxis0KFR d+FDT9GbVd1PTXkk28zdlhfq7xIP1Y1y5BMF3+/Hc8Plr9rjkZQ2zwhHgzta7ZdT/p/hBVlSGIj avpkB4vMufQen5uD8BSzvtuKXZHyvbA= X-Proofpoint-GUID: A6y5oF7SGxlLiV8vnNOLdrLlI2QBGjBX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552211155158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +++- plugins/core.c | 9 +++++---- tests/tcg/plugins/bb.c | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index d4f8a99027e..75d2a69a3bd 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -272,12 +272,14 @@ void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id= _t id, * qemu_plugin_register_vcpu_idle_cb() - register a vCPU idle callback * @id: plugin ID * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a vCPU idles. */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb); + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_resume_cb() - register a vCPU resume callback diff --git a/plugins/core.c b/plugins/core.c index c7dda9b2ff1..47244603786 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -89,7 +89,6 @@ static void plugin_vcpu_cb__simple(CPUState *cpu, enum qe= mu_plugin_event ev) struct qemu_plugin_cb *cb, *next; =20 switch (ev) { - case QEMU_PLUGIN_EV_VCPU_IDLE: case QEMU_PLUGIN_EV_VCPU_RESUME: /* iterate safely; plugins might uninstall themselves at any time = */ QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { @@ -114,6 +113,7 @@ static void plugin_vcpu_cb__udata(CPUState *cpu, enum q= emu_plugin_event ev) =20 switch (ev) { case QEMU_PLUGIN_EV_VCPU_INIT: + case QEMU_PLUGIN_EV_VCPU_IDLE: case QEMU_PLUGIN_EV_VCPU_EXIT: QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_udata_cb_t func =3D cb->f.vcpu_udata; @@ -627,7 +627,7 @@ void qemu_plugin_vcpu_idle_cb(CPUState *cpu) /* idle and resume cb may be called before init, ignore in this case */ if (cpu->cpu_index < plugin.num_vcpus) { qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_IDLE); + plugin_vcpu_cb__udata(cpu, QEMU_PLUGIN_EV_VCPU_IDLE); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } @@ -660,9 +660,10 @@ void qemu_plugin_vcpu_hostcall_cb(CPUState *cpu, uint6= 4_t from) } =20 void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb) + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_IDLE, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_IDLE, cb, userdata); } =20 void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, diff --git a/tests/tcg/plugins/bb.c b/tests/tcg/plugins/bb.c index f29b466dab2..ba605246eb0 100644 --- a/tests/tcg/plugins/bb.c +++ b/tests/tcg/plugins/bb.c @@ -56,7 +56,7 @@ static void plugin_exit(void *p) qemu_plugin_scoreboard_free(counts); } =20 -static void vcpu_idle(unsigned int cpu_index) +static void vcpu_idle(unsigned int cpu_index, void *userdata) { CPUCount *count =3D qemu_plugin_scoreboard_find(counts, cpu_index); g_autoptr(GString) report =3D g_string_new(""); @@ -124,7 +124,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, counts, CPUCount, insn_count); =20 if (idle_report) { - qemu_plugin_register_vcpu_idle_cb(id, vcpu_idle); + qemu_plugin_register_vcpu_idle_cb(id, vcpu_idle, NULL); } =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552238; cv=none; d=zohomail.com; s=zohoarc; b=epNKYv4xG12vQwHPwU8nlf2WHd85oXTPljmzSy9g2yP2qnMbmtHid1w3NqjAgpbVUs9K5fHqh94ZGTJnvDt53mmpcj9oT4FOjhrQ3sxBuH7t90MqU9VLlWVf2Y/e1XmOLUq0oklgMHWy5phH8Rfs5ChRvTPAjv4YLl+5LE/tzU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552238; 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=D2WZShCxOeBMbg6JyEuHBQvUsRPOhsAn5CaloYZ2nrg=; b=U37TXIHlPm/2dTUQ77BybQQgNsBmAXyQQAsS/s33z5gFb1DkoRXyc9IgYKfrbhKkNbeOeAVGluw3dSkW0Iux0mDtY0LChdjOElPfgkxGo52ru8LvWURzBH9MaGvu4sOY8hmfj6C8MguYkHrFzliZyBvA13Nyu/9p4rD0F+YHlYw= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552238662695.0604304943134; Mon, 15 Jun 2026 12:37:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6h-0002f1-QC; Mon, 15 Jun 2026 15:36:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD64-0002PC-5c for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0001LA-5g for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:47 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxEKP861125 for ; Mon, 15 Jun 2026 19:35:42 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eteydaky8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:42 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-1382f39e4b5so2455222c88.1 for ; Mon, 15 Jun 2026 12:35:42 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=D2WZShCxOeB Mbg6JyEuHBQvUsRPOhsAn5CaloYZ2nrg=; b=E1Hz4yI6xlD77KewWoIHp+BVAD0 bIzPKs8s4GkwoJoOVBgHFzvOwY+3K6X+VbVx5UUS/fWVLxFFeckQfz+YvG0nN+7S VjWZ0/n+voyyma9eEj0vFg/zJKdOz3Dg68iiK8lwgjlb0xsR333CkzMN9A6MdJn2 qnf+hSqgzLybWzYvbczDW1EYFUvjqiOaQTRnmpDo4j9MJbQSaPEVMu8qWppfeDGq jmSCQ7qv3AWUwnOz86hg2xPrFZYJd8lKGwIGfFILOnuabxyDbE525ZvdracgjA6O ST6rF6oxEpuqU30UmS0TbgW0SV5fHvhMEMQ/NZoDDG+svery3QduhWdmACA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552141; x=1782156941; 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=D2WZShCxOeBMbg6JyEuHBQvUsRPOhsAn5CaloYZ2nrg=; b=Z68TOeQvw8AxL5IsH8evsqGEG9cSS7tLdE3my+yki2DDqPAUqaI/KGL6LMb/aIuekV jdE/Vf7I5PCb/i1AHnVefodtwT9QHr/GaT8UG3F0kcz+7dPhG0Krs7q7GfMKA8AD1PCK u3aUKAS/F0dGh1f012zLft+9MKR4iBkFoFddIxgxY/iObq1pzHcE5r2L26FRuRUc01IO G+kA+CEbUMtQd6VdgAkrTZEzI3DOw/1pUfqZDABmUYzg0TFL3q+C9fcsJIwFJb/kfE1R +XklXBnToRGKWk2In6ZU9v8uV6OuozMhggC5xlE+YnfKjG2xfzRhuBsHVVAPtNK+pz/1 SS0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552141; x=1782156941; 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=D2WZShCxOeBMbg6JyEuHBQvUsRPOhsAn5CaloYZ2nrg=; b=GHZWRvhaM2/LWEhasAAUNHgL7Z474foqhMsHcLH+tEszN7aV9nviKi5BPhSuTQJWDI DUd7+PbCR6uFvsAoykmehr0OwxBpNnxlbPZoKkwEeG4TLqvQsw+pBYJhJg0gQxt3umEF K43po/C3bzcEqq7ftjdkcybM6QinEe5hSvC9g+Alk11YPWjwR69b0V0hG+/t2MjaAgeS +OnrCcZIo7wSssS/+W/tezfyRP6MCFQs0LN+tZbsW+hHbb/C+TcopGQK/ypqBm7NU6LT /vABgrDtlFN9lWaBHry/BlkMQAD/neJZn6vy+E7XPyn88NIkmj/zL3pxt/spEchS688Q 2QZg== X-Gm-Message-State: AOJu0YwrY+O1ml+X3uhi+9ag1a8AQ0Z/wGHc7ygi1NLZIpSD6eC1zbhw s3EssSMucF5AhWBaz1aybio7o2oTwF6Q5kEVvIba0cglc6xqMdToC7SMe9uNEbjQRCkExgoh5fi 4T5Pb6jOvl9rZZfDNrlwKUqgepWfLZYARfqTw3v65Pd8wAqAxm/lZd6EwQL52lGeIavYY X-Gm-Gg: Acq92OEVQyFqMcvWkNoWn4ZVq3i+/xjYUTNrBjEdXLiFbsuqP/bH7lGnGi1Eya3D4NN OYYGXgdVqTGuJYW+K88xLZne6uU9aLKGPYS5/mRAA9bfxxBW4pHl+zXaXMTNsodRQ3IH9uA1NyM xKa5mfJskAOrWGZVjWuSIVDRLhS1dlaooBhX/hvnKnbbcymxeSrIuCqtMrZv15IXzohYqbgL3Te vl40A2MH/FhoZRN/npjnb4G4fKtCfz06awBzHSVZP1OkOlFA43F/Y98eyOQzBrnfce1uYfM5NLZ cJyWXPegzexDAluKlYpBMskGAmVbpzu425o4aTSCjy7lbFI5H7pkzcBryjm5Bx1Vuw5rjar96Ca mYWjQEvFexXdR3AV2UA5reGU8qEvYbCitqbYbFbIDk7lPvo9EpMJIGJmHtF2pFDpOlR8r3h8V7W dwqpQpbw== X-Received: by 2002:a05:7022:23a3:b0:134:d3bc:b4b4 with SMTP id a92af1059eb24-139857b9d3emr400302c88.4.1781552141433; Mon, 15 Jun 2026 12:35:41 -0700 (PDT) X-Received: by 2002:a05:7022:23a3:b0:134:d3bc:b4b4 with SMTP id a92af1059eb24-139857b9d3emr400287c88.4.1781552140840; Mon, 15 Jun 2026 12:35:40 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 10/26] plugins: add userdata to qemu_plugin_register_vcpu_resume_cb Date: Mon, 15 Jun 2026 12:35:09 -0700 Message-ID: <20260615193526.2883349-11-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: a74k_CIUTPJKlFVrIVQnX4goNKGPRbNT X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX3FL67L4mCBRM i63fP7gbGCQxNMiObbbnU4xFHE09yOiajnEX7qXtyZUp1Lu49m6oPww31Xuy2+taHh6K014Zlv9 E6q1E28xNyrNgEiU2sZsOcSh4mKowQw= X-Authority-Analysis: v=2.4 cv=QrJuG1yd c=1 sm=1 tr=0 ts=6a30540e cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=jbUUBHnpNWWeZ8W5LfIA:9 a=vr4QvYf-bLy2KjpDp97w:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: a74k_CIUTPJKlFVrIVQnX4goNKGPRbNT X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX6yjblwIzV/wr BstuYKUpfKGZztZXVUMfh1bm0vwMKvoh1K63sHMtHuEq+pPohUrYaC5sZC6Q2v6PJsGIH5Q53Vk Two9/RrQWccrsvI9XnoRM9HLT5NcouDkdELO5ttAyA0y5NMiisU9+b1dr9UXVyGJA3eSU2iJEyo J2HIXv+COpcRgLxnWfzeUFxdXXV9tfwGMO64XK7JEW60mMVgFoMOW9hwhPuhGIC5vTjgO5bix00 4nNHiP/esvg0niFTvwP+nmc+0J08d6ULklLN8AI7asW4GlckhZFelyORajmG8EBI8YQeGMPYxSE BTF9ehpWWmR4ztp8qvluZ8juVwXCdfUgLdhOCv8V7GdFe9OfbA+UWsZxcuNxve7UP1YDsJEUjdx 6Zn0p8JPcoFFC8YPyZM3p9+LIsCYYoud+QbHET9bg9U0s+rpztFJ792vAsfyiFYmNC5OYiwOwn0 +Li4mHVBPsJzgh16DMA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552239007158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +++- plugins/core.c | 31 +++++-------------------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 75d2a69a3bd..8c146ea49c2 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -285,12 +285,14 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id= _t id, * qemu_plugin_register_vcpu_resume_cb() - register a vCPU resume callback * @id: plugin ID * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a vCPU resumes execution. */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb); + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_discon_cb() - register a discontinuity callba= ck diff --git a/plugins/core.c b/plugins/core.c index 47244603786..342357a7499 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -78,29 +78,6 @@ void plugin_unregister_cb__locked(struct qemu_plugin_ctx= *ctx, } } =20 -/* - * Disable CFI checks. - * The callback function has been loaded from an external library so we do= not - * have type information - */ -QEMU_DISABLE_CFI -static void plugin_vcpu_cb__simple(CPUState *cpu, enum qemu_plugin_event e= v) -{ - struct qemu_plugin_cb *cb, *next; - - switch (ev) { - case QEMU_PLUGIN_EV_VCPU_RESUME: - /* iterate safely; plugins might uninstall themselves at any time = */ - QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { - qemu_plugin_vcpu_simple_cb_t func =3D cb->f.vcpu_simple; - func(cpu->cpu_index); - } - break; - default: - g_assert_not_reached(); - } -} - /* * Disable CFI checks. * The callback function has been loaded from an external library so we do= not @@ -114,6 +91,7 @@ static void plugin_vcpu_cb__udata(CPUState *cpu, enum qe= mu_plugin_event ev) switch (ev) { case QEMU_PLUGIN_EV_VCPU_INIT: case QEMU_PLUGIN_EV_VCPU_IDLE: + case QEMU_PLUGIN_EV_VCPU_RESUME: case QEMU_PLUGIN_EV_VCPU_EXIT: QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_udata_cb_t func =3D cb->f.vcpu_udata; @@ -636,7 +614,7 @@ void qemu_plugin_vcpu_resume_cb(CPUState *cpu) { if (cpu->cpu_index < plugin.num_vcpus) { qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - plugin_vcpu_cb__simple(cpu, QEMU_PLUGIN_EV_VCPU_RESUME); + plugin_vcpu_cb__udata(cpu, QEMU_PLUGIN_EV_VCPU_RESUME); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } @@ -667,9 +645,10 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_= t id, } =20 void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb) + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_RESUME, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_RESUME, cb, userdata); } =20 void qemu_plugin_register_vcpu_discon_cb(qemu_plugin_id_t id, --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552267; cv=none; d=zohomail.com; s=zohoarc; b=EyxjBUTkOGZFqiVcI8JU/EVEcZWaMS2M0uCm4j1nH2jnb50W7xs/ksLbQD8K1Fa+BcS38PBQ9OtSI+XZRA0kBgYmG5cvB97XYzTjUmfBgKUygr0j48g5bloTi5NP1m5Mb/qOaDK5ajVHGVvx6SiKAZ9NpQBDd403F08J4pRpoeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552267; 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=r+a8fu1tleJmmUTuIuP/3HknQ8qhCGJWyLNi4ZoKaGM=; b=AXCWaT2Ds62oUVZd4B5uF773RHUh0sf7FnXFd+7wHoqrpaTBl6TrTqrZA9d52GzEseTDvGxRqbCS+Kj1YQ9juP100ap2IKXw9DNQn32sVmFmuUlOBUak9gQfbc9QksO2jE44pE4MsvND9p+Oe+OLizbtOq0zEqqZh12zvDnjDq8= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552267490472.8166762134339; Mon, 15 Jun 2026 12:37:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7Q-0003Y3-2b; Mon, 15 Jun 2026 15:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0002P0-Fs for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:48 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD60-0001Oi-4w for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:46 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1dOR1367868 for ; Mon, 15 Jun 2026 19:35:43 GMT Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etegutnfr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:42 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304dd917645so7795323eec.1 for ; Mon, 15 Jun 2026 12:35:42 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=r+a8fu1tleJ mmUTuIuP/3HknQ8qhCGJWyLNi4ZoKaGM=; b=YAoY0aQzpU5AONmoobJIS3c0Sgt dFjRK2umckVuq2HQnzVML4gecB7pdZr9sSl6m/ZoLUfbhIsP/SpUU/kapHkQ+kUA C72G+5jRSFl+JnM4wErWkNSxDupZSgMTfctYikZnURcc3G/Drrx8cAzKspwNEqSg D65kpetHmZYkgAPo1aKFWNZmUhwrb2wvrPME/6LqLLqjTdgvc6rP4+jT0dG4Hz2v etQlmug6/w3y33s89XM5r7oCeIiQVBWNtKDfjD1zFkJ8eBMpmXlH8hcmgU94cp4I LIybzsNupYiIujq9fAsLuBda5LfeSjMuwzsMwi2VPLkW59fSjGV27s9CKOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552142; x=1782156942; 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=r+a8fu1tleJmmUTuIuP/3HknQ8qhCGJWyLNi4ZoKaGM=; b=cXWqJGYCPJgixF/itq6puUY9A7NWZspkWymhS6pkyryvTZyvdmbwmYGOzx1opzaypD toZWfhiMVRJFvVviaN9J9I1kYfibWamvbQvYl7PvdmVT8/1wFUimArfzM6hYSpFLnk0L CHIlHRD//zeqXRtahcg64kMVmiZ16RPlA088MjGRm2aBuV0rgb5AYMReHiTgoIFSn7VW MkMmpx4xCYNuF8sZ9N2yiv5LaBx84niuGiWC2mkcJ6eWtNJXYrMVh9cKeGoTSO6lKazX r4bYGD39tnUrPTXFzlUObHTNw2wCZVqQj99cNJe1YGu45rUayGdPdSogCmJXg7hgwvY2 YOkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552142; x=1782156942; 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=r+a8fu1tleJmmUTuIuP/3HknQ8qhCGJWyLNi4ZoKaGM=; b=VixSmShDuKHuiEWyES+mxfvmiOyS4LRFxwE42xpgl6fjXhLOfPWDbFvMG6ksiYKCbM G8Qzz/wAgm2FNHxbSOv53vm9z2wR5FEPie7CuWQNy3aGLU9oYtOXjlnZlZn5snvVfI5R kiv8OnczKf+F3LvBvR89CQZ3DF6oB8qRkqY/6c4cfkEDh1hjyQqfzNiYM6vL6tBNTJyL KqeMv7Vt8eokoL/Yu3yeUf5ELP+LtGkShr7Owph6/2Q+xiUM3LPx7v+CXsPSYZsfRO6f LMHIow7oi9AA5UhRzkImOLAelhf7GPJ2JH8NFSglmLZ1VTuQEOAQIvGQvFdUKq7Mw80p uuIQ== X-Gm-Message-State: AOJu0YwFvwn6HK6njjURNJY3/ZiQ/ae3nzpEQG3V5Ujat7Brm8b7Z44Y ENU8kwihCVJ7+vV8/4hmc/+9QWAhjWL0EWRKjHHxnr30pUGnjlEQdX+RfXOrEP/XOEhE+bAK/Lz iQUHE5RkRZyfohHueto37U/mm5BOypmb2aM++v9W7xVzA61s1lqq+cC2gIRj9hhHTeEG6 X-Gm-Gg: Acq92OE+JN00wQIpcfnespCMOJJ3sesEmD3PkcDZ1CcS8nX8u27EnpG4qpL19qoDoYr vZB9YryBoh4FZLIK6nUFCEQPwDrwkx2NUbc/d9J7GP63uL5SeIw4NF9ok6CjpY3J/f5EczjmwWT Wqizd7k031/DRH5bCHV9otutoufHW22Z8UBw7IWW9ZGY53mDRDBBEUoyqqFMhA2gx14BDDfNIfh EmNW7U+KtXmLtQ2dyOYgfZHJPTFBhEW7WlXqisK9zNewEHyTksfcwng93iA0luRKfKjilHCRbee RShluz60nt4qHOQrqCQER1oswq2wqdPhZyrvfmKzq2ZlcUVbUOixLqfTvSewPJgThFer1pAQuga NXYrBxhY0yhCGQb9j0fyBhfveLr3aPYIk0JBNbScOITR3e37HNczrdhV78CBwE2pl3LhM1xv+ab LYLm0dTA== X-Received: by 2002:a05:7022:f114:b0:130:7246:10aa with SMTP id a92af1059eb24-1384bafee0fmr7143886c88.12.1781552142082; Mon, 15 Jun 2026 12:35:42 -0700 (PDT) X-Received: by 2002:a05:7022:f114:b0:130:7246:10aa with SMTP id a92af1059eb24-1384bafee0fmr7143863c88.12.1781552141615; Mon, 15 Jun 2026 12:35:41 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 11/26] plugins: add userdata to qemu_plugin_vcpu_for_each Date: Mon, 15 Jun 2026 12:35:10 -0700 Message-ID: <20260615193526.2883349-12-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXxXKP2T2dLC5R u88HSVPCAOt7bv1SLVMc2cn3muU90bQzDRdvHK/4aR2DfiZbkf/FTnoCkbl1JtP5PNu/X6adZCk muRuUMSLwQsR5J/Jc7yjH3w1C7LK82DYhfVTx+rBBcPex85hvxmMtZj995CZoNRYoeal3CBbi0E lRaiiB7VuCYNuH4p1IaRGgAVSVBNfs9DCG92Fdp2f0Yju52kfv5T7bMSpo5DlV46ShqUqsSLPmQ i6sZ3zMGGvJzDIKfcymED0Pt4kHf3jH+WpYkgFinHlrygrah1Lb5lwU7ZB9swTx8SXc4muVZrPi NAgqeOfE860eoeBk0A22hu2qP3cpgtDIAF53AqpY3YNJekHV5fWxXIWUlrZZbt4y4qIT/+aolR+ 6KTdVn0NXsbdvsp2d4Q6ggjbo/bWkrsti+wY+/G3Len9gudq+Zu2SqOwP6fGMf2Uok7L1pDAOLz jGVPrZkbCzk+bw7w7iw== X-Proofpoint-ORIG-GUID: AR-Zgxb1Xzs0Lg8Yn8kB43H0Vk2aa-xo X-Authority-Analysis: v=2.4 cv=HMvz0Itv c=1 sm=1 tr=0 ts=6a30540e cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=6uvAROY9rCAfoAu75HUA:9 a=scEy_gLbYbu1JhEsrz4S:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXw0XQQYTryYXG 2+zHzdWhMfm1nwk7I4bQ4pPFWnmoN9fr/T+MUcEiV5zO35T0zmbs29KqxvbIQkuh9W9L6KMblus bABD/6tTq9R91ym3AaIO8Nmgs6kacnM= X-Proofpoint-GUID: AR-Zgxb1Xzs0Lg8Yn8kB43H0Vk2aa-xo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552269113158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +++- plugins/core.c | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 8c146ea49c2..320644a2f0a 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -957,6 +957,7 @@ const char *qemu_plugin_insn_symbol(const struct qemu_p= lugin_insn *insn); * qemu_plugin_vcpu_for_each() - iterate over the existing vCPU * @id: plugin ID * @cb: callback function + * @userdata: user data for callback * * The @cb function is called once for each existing vCPU. * @@ -964,7 +965,8 @@ const char *qemu_plugin_insn_symbol(const struct qemu_p= lugin_insn *insn); */ QEMU_PLUGIN_API void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb); + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_flush_cb() - register code cache flush callback diff --git a/plugins/core.c b/plugins/core.c index 342357a7499..5b4ed0ce213 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -297,18 +297,20 @@ void qemu_plugin_vcpu_exit_hook(CPUState *cpu) =20 struct plugin_for_each_args { struct qemu_plugin_ctx *ctx; - qemu_plugin_vcpu_simple_cb_t cb; + qemu_plugin_vcpu_udata_cb_t cb; + void *userdata; }; =20 static void plugin_vcpu_for_each(gpointer k, gpointer v, gpointer udata) { struct plugin_for_each_args *args =3D udata; int cpu_index =3D *(int *)k; - args->cb(cpu_index); + args->cb(cpu_index, args->userdata); } =20 void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, - qemu_plugin_vcpu_simple_cb_t cb) + qemu_plugin_vcpu_udata_cb_t cb, + void *userdata) { struct plugin_for_each_args args; =20 @@ -318,6 +320,7 @@ void qemu_plugin_vcpu_for_each(qemu_plugin_id_t id, qemu_rec_mutex_lock(&plugin.lock); args.ctx =3D plugin_id_to_ctx_locked(id); args.cb =3D cb; + args.userdata =3D userdata; g_hash_table_foreach(plugin.cpu_ht, plugin_vcpu_for_each, &args); qemu_rec_mutex_unlock(&plugin.lock); } --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552263; cv=none; d=zohomail.com; s=zohoarc; b=cpCjN7KEt7Gq3iovjG0TDKsPuyXPnWnLqqHwRMgbrZQ5zOZEJNu9KnU0JA6rwsXOzVVyL8FpjAr5k8r1sJq5vq3WINYI59XMNwtz5UB4IN44hQtqSS96wpphbN7TLOsXzExjM28fayUXXYR331zyes9Xr6xXVVAy0MDxYgh3gwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552263; 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=BKZEN3raS7Q3k0uk0ljirFYhp5lfYqBU2MUCfY6EoSM=; b=Qgc3Fi9BA7zUucgowlYErVKiL9sA5vsRywNX+gzeLoU8X2Y7RPGoe+rr+sRHLD3t32OnIvMsLHzLRk7XGMbCPj41fETBSsvPUEZPch/BrHR7T9Gz8ABlK0h4RuDjpDyjZgJjnq97hTbnM4Sg8T8+Mj0F+D6hKMZJCOUH/QymQhs= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552263820802.7558771362662; Mon, 15 Jun 2026 12:37:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6Z-0002bF-Up; Mon, 15 Jun 2026 15:36:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD65-0002QP-Ao for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:49 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD62-0001QB-6b for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:49 -0400 Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1KcG1220422 for ; Mon, 15 Jun 2026 19:35:44 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etevx2k24-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:44 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-137fe4a3640so5732552c88.0 for ; Mon, 15 Jun 2026 12:35:44 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=BKZEN3raS7Q 3k0uk0ljirFYhp5lfYqBU2MUCfY6EoSM=; b=jqNm/SKHMBGPYbV3Sx2/udO88v8 tKOVHlH5TqjgWF14sy7IukR/DN1EvQgKFEL04P+Pu1CRZbUvbfbJ45sRwZwXCDXN WvttY1TmHfTZXZ/4ki+R5f+zi3UHQIHAzOT+REBVJ+dXf20+7UIsWnsKwe8JraXb Yov8AuimoWdWU+yLWF0+vSxKkevIhI+HLRPsvjt0ol7b/YVP0KqhEqFlB54B2SwS G+4S0Ulzt7hHth4WID+lsk6KjJoisnlQw9nAnRTHSeGpMzf8lYeKjBNpl1rvY9P6 JFF0ooXMxgrZCGEHKMOINz/Y2FnIkyZH0iUlw4x/gD1AMKCKtw+tM4GJMUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552144; x=1782156944; 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=BKZEN3raS7Q3k0uk0ljirFYhp5lfYqBU2MUCfY6EoSM=; b=AS0XP7zLCWCyhMxgcGAc+M3XWCJs4oQNboAriLwIt6Bxfk8N14d6u8Wwa6R16qGGmh RwH0N+eNgQ53GPVVNU8145vbg8ONjzIsy+ytLpWtGCjOIs6z/HqUPiDPy3V0ZsSVWNDW 17ufgOlv5OuRZUfrEWXrq6s7lazD+HO+BG4MBX7gUHdMNM6fFByVGTSTeJtdOoXDF3/F TbXJR30DlJzMHZqqx/g+z696hk41OUC5GrMSw96QgstMHpIGzyYY5P0AKIpojDVuLdUJ +hPi+xxn8P3x96n0mFgx34+6g0UsiZkxHjx6yOAGa8d99ILrmbIAsuSv9nz5cEGAvwuk effA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552144; x=1782156944; 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=BKZEN3raS7Q3k0uk0ljirFYhp5lfYqBU2MUCfY6EoSM=; b=rMc6h9ujdkT4u/mcNSR92GziGlXxCty4KwvPutHcN/0aPyBL018YDJVWAlsNbkVcmQ T78vHBUh3tLDZLO9AckDy7jAvXmvC1/Wj4OVKcpMd4rT74hARnQkjR5zKCHH579lUGcq 23CVmc4zeOeBk8zKH3/+MPEGhrmRvshkElDa+WBvHHxAfDddYG7xj5bUhpwUTM751WAc K/KQUlkvkIL77+IobfdcptG1ddIIUNUX2q2TMqqFldK8coxnM2gTYWI2iE2/UTvDzd+F Wo6iv0VK/QcsuOa2eKPuJN9ThAaqDPA+/S81QXTfm2Wg6Sr7PfCQMWanV0bLSnjTD0p6 6+Fw== X-Gm-Message-State: AOJu0YwvC8UFFLRlRJUsrQMMJFB/DBOZXJzgx+2ck/aLeP04mBM8ph8n qpPbcGkJxMA5LwWZz/0MFwwJFewr2cQRc20Y6KTIkqTCiiuGy++momY+yim661LWCh33AR00ANP lrcRIkYpCCV3ajZvCyV9uN2JKAYA/mfk9JxdnoWoH5nDSQ+S7LGgU56u7yxFqfg7nwYp6 X-Gm-Gg: Acq92OGCPXofEP3UGZXB2edyABcR6bpBcsbsuNKcFxCztELlFQvZxou6rE38VsvnzZz nDp4+2fjY0mQ7uH/9PqLxToxFjL8g7FxSUK8xXC+GGBvb17HM95lgRkiNN3WmEVjZ9Gb9IQjwWz sdvzOADElk6jL8VWVRReVL+HY4ccSdJTc9Ke9poxTjnijwhxftWu6y4586izQph+olukxVZjde0 Bp05OgQyTzDr6H+bNzr2eM2cKdN3iyeBpoO21ZZmEbXUAloT/kDcI73nZN4UY4+Qxtf2tTNvJ1D FETJz3N/FM3ouhO5VcrmD8kN3RmhY8JIRhBVfF2MuFTgRCzyGQXPuShwdAry78qrSdPi9CPcrtq pPbL9ba3GhFZv27JRU8EnkJdG570BAA8x8NZPbuo+/EifiYD2+ULHHTpO88E1fgQK0LxMivEDaP qNorpubQ== X-Received: by 2002:a05:7022:607:b0:138:56d:27e8 with SMTP id a92af1059eb24-13985ea8a03mr217245c88.1.1781552143709; Mon, 15 Jun 2026 12:35:43 -0700 (PDT) X-Received: by 2002:a05:7022:607:b0:138:56d:27e8 with SMTP id a92af1059eb24-13985ea8a03mr217223c88.1.1781552143214; Mon, 15 Jun 2026 12:35:43 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 12/26] plugins: remove type qemu_plugin_vcpu_simple_cb_t Date: Mon, 15 Jun 2026 12:35:11 -0700 Message-ID: <20260615193526.2883349-13-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: ia_kjgtDqFuzYQacm8EJJ6UrG-1FnLH0 X-Proofpoint-GUID: ia_kjgtDqFuzYQacm8EJJ6UrG-1FnLH0 X-Authority-Analysis: v=2.4 cv=f8t4wuyM c=1 sm=1 tr=0 ts=6a305410 cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=O-HLJylWCwHPwwrsMNEA:9 a=vr4QvYf-bLy2KjpDp97w:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXx3OiranczeEP okWX9fDQgcj54YKfGpylZTBz3FDvwdDj8zlGgm0DBzmBvnTy4lyEhzBgrrnsWOzr5WOXflZi95p 3eOjgZKFPcNUeEY2YcPkLOaGrXFanMU= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXzduP8TWE8dNo nOUno4XmGKd88+PnglruM++E5ocfKOjYQn8hxpPJtRIKaekqK7cFFAIb6vTgsrH1HmYuTiuaV4F D+QBbXuDNUWwZhh/XADCfgIaLD3M4R7sYjViaBquDim578+Z9bmwccuJPfccGdlzMkYjjSrlZZD 0b0tDFV0So7zsVC8vniqTAUx9sM8WYPAZ4tnA5k6LWj/O9/MvuByLobYs7tc3+6UjmsbqMe4CSo tKTe6ab+W2sUWkYfpngcdhwTZWKx9Cs8KfkLhG37IZtLthzS1Pi0JoH8rCpaB+FwHc3+K4NWI/g Q2HLmJvqr1v9/d1T0NbCA1cJl7uDjXkPTTOoWZXVNdmwtgAGbJnPGrvRMUUfrSQFyzYUjExidMC SEslGcz8T5oLNLs1I3N6m0GbZe2pXVSWZyqEGfBaNOMSLOLWSXmaWHRep6ULpf8ZPJ5lP4+mAOu AGEMgmaxqpmiR1/hSWA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 clxscore=1015 spamscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552265179158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 6 ------ include/qemu/plugin.h | 1 - 2 files changed, 7 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 320644a2f0a..cf937c60ee7 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -147,12 +147,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, */ typedef void (*qemu_plugin_udata_cb_t)(void *userdata); =20 -/** - * typedef qemu_plugin_vcpu_simple_cb_t - vcpu callback - * @vcpu_index: the current vcpu context - */ -typedef void (*qemu_plugin_vcpu_simple_cb_t)(unsigned int vcpu_index); - /** * typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback * @vcpu_index: the current vcpu context diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index dac08cdc60c..9356ee836ac 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -56,7 +56,6 @@ int qemu_plugin_load_list(QemuPluginList *head, Error **e= rrp); =20 union qemu_plugin_cb_sig { 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; --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552364; cv=none; d=zohomail.com; s=zohoarc; b=db7h3k09nqjv+MMF8jpR/1h4ljKTwcxL6n5Cm7haD62oOZDI7V98XqCS1S2HCwE7rFoOvGq/QdsE0HkF3gDCCZUcMJx1UeVoE2c0+gabTVfGfJOP9kIS1inAAF5lznHF+0Z4dnKcWC3IOEANdJgbdSafflsxsXj1b3pEBmkCxyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552364; 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=zGujvD7uH+yW2wYzQ7GOLuR+E3tz4/noxyDLwMFpBc0=; b=hYqI0apMgq91O7fio75CDN5LCMVJ/HdSBntN/ZZGqV31T3PsNnVVsEBCpUzP7RWMBRvlQyHVzv+pAElOEhfr/0/XJ6+BE/5Htdkk4Wv4+M1+IoPU26/v+gQ/LZewSb8JiDa1RaMYTOw4LoeYoRTMEA72XQ+HG3vlH6bO2eVqEME= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552364945780.3461653503749; Mon, 15 Jun 2026 12:39:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6k-0002gv-QZ; Mon, 15 Jun 2026 15:36:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD65-0002QR-Qo for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:50 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD63-0001Qs-87 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:49 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ17OY1393465 for ; Mon, 15 Jun 2026 19:35:46 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eter22n91-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:45 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304dd917645so7795472eec.1 for ; Mon, 15 Jun 2026 12:35:45 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=zGujvD7uH+y W2wYzQ7GOLuR+E3tz4/noxyDLwMFpBc0=; b=EMdBST8ANi8mMiKW88XKnl1qeGD nFfUf5aCCD9QQXJaP295PMq5HR2bAGo+dWFmgwPi1dkuSbA/5kchUGu605UVj2RG VkOErUtzdWlbVDsn0wsdzqi2GELtjIFi7q8WRmTP8whEtCtZ3VcOkP+3G1RmkRhT YLugn8H1svWzEInpITsy+3Vsb3UXCrfehjkUKMciaF0DZA4Srsv5gKF0wKsNF4fm 5OkUGoIUX9e/AA6xqjgR+mY0/kY3/vG0T+bY538VB6c34yejx4F9TcmqjOIg8iID xy6XUwsNITgodETQ+kVEnG6FwKpZ8gp+PITHrmYgk5cAvngBvtJJKZHNdRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552145; x=1782156945; 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=zGujvD7uH+yW2wYzQ7GOLuR+E3tz4/noxyDLwMFpBc0=; b=TKlbbKQ124kA6ep8Ugs6OBys1giVr5K0+sVz1kcye6XKmmF1WT3/RcT0EJzDY6//yw vyIZp25AyRa2KnbZYi3olyxVOvGD7E2mZYG1RrHAf8iX2/dtvXCbAri97jO3CSb9chyj uIckv9gZ7Nv+TlFkTa7iHFqnR3wpbwAcE9g33mg9y/40cdlRDNVGfWBcxMT3ivl/zUTQ 9nic+XWvzc32+XkjkkcwZs831Rh94b72ZKqtc6Wu8S4z4wYYixs0HE+kudCyAGQyz5BW wlRu2/VyzmpP1VQCNwXcITOhU2tEWGjZjPP+Y6l6A6pGD7+rZnFVhwoMHB9F0rOmwEPS z4kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552145; x=1782156945; 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=zGujvD7uH+yW2wYzQ7GOLuR+E3tz4/noxyDLwMFpBc0=; b=RerQTwZwnCCDklnJcUvg6kel4nFsEnsuz2ZLnrtDl7k9rv/KRJazfKuWKnre3s4Ar4 SPk/+Z3wUsSkXCj9XKEe/32FOrz+cw7p+l3aAeILKiMbuEVxKY4LVcwrwEbiMYhXA4ml Gh0CW9eMYGUf9NQgaDZyeOmG8b7y1eWg7IhoRWu70q4VPyDg4Ly+bnHfjFzG8E4PV3NS vlmgFaCrWA0dDWP4sFWENiMMcbh/wxPYvwf34IiYxr0PC5/FDOPbQzd8j6ZGVjPrmBr7 oZoOCPWe047CbsArXq12YdfiV2XxO573rXtg6HOQ8hdhgnIHMy0gwAPBGgN+Pjmkb/Ng 91fw== X-Gm-Message-State: AOJu0Yw4H1hGLzjbqXDx39+xQSRODXuRtU3hVrT3+kTStigxql/i4x65 s+izsnu9XNZ7F5vK1ZOYW2zqQPVINgRY7WIc4tSE3P2kbbX2SpXrEWFE8hvfSPjm+St5EQUi2oz l4ziT1/fOO0Lf/gHkcwa0XCZSfeIhr8rHGQl2tK6uerkAJ8H9XabP64AzSJ8qQE2j9ac9 X-Gm-Gg: Acq92OHwMCFSp3Cuhdq2HyjN04nXn4Exx5ImK6ZtuJVamOyTLjhOojKMS+BvvJ1v8lz 6TB7K+/z1OEM+kX5DozgRHnO+7zdXsZgMU4svqWcxYdjm0aF0gYAIwU5mUWT2Z58AnbUC5NeVUA ya4HWbSiW+cCpZ/ER2DMcuytREHgDXxCC1RjGmjC2biRbiLZihu0weZoQ02mKk206psM1SGd38B 8iIWqfBQ7hYfZEZmqKMhSY9/cDEyt19E7kFhdJ41+WzmCvgD/ZGLReycM1jc2zlyG19FIHUILsU bVYSG5m+DtbDKrqQwB3duucwT//lHy7cL27MRiGqc/mKZ7Z0fx3uq0HzPzOYNQfZkntI20Rm/AK +bp5C7EDzxmZ3rnummP14Zrr/tRqWA9pGM7JFM2bFfy0KTLavRm8VAJkJrG2/N1bMe0Luj5oTPO hOL8/A5A== X-Received: by 2002:a05:7022:f9e:b0:132:ac76:9772 with SMTP id a92af1059eb24-1384bb966a3mr6416582c88.34.1781552144796; Mon, 15 Jun 2026 12:35:44 -0700 (PDT) X-Received: by 2002:a05:7022:f9e:b0:132:ac76:9772 with SMTP id a92af1059eb24-1384bb966a3mr6416563c88.34.1781552144224; Mon, 15 Jun 2026 12:35:44 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 13/26] plugins: add userdata to qemu_plugin_register_vcpu_discon_cb Date: Mon, 15 Jun 2026 12:35:12 -0700 Message-ID: <20260615193526.2883349-14-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX6JEHrxSLwFuT bz51fQIe1bm8148wcwlLbUcMO5Z29fVBgtm23DpSae95e6EIjneUO+s5+M/zTQ1rpIjXX/n1Z0c cWSlv7eu1JuUuDhQ90mhUyK/y+G4KOQ= X-Proofpoint-GUID: Iesgk3zX9Y2Q0EClNkdXk47EcDmgVg2G X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX5x5+SJTe+b+I UHTyeZ4FgGEf4AoX6SF4bf8I/+3rYoSQbUNTqpL5PVxeQ717/pQumErNsNbUOPSUPqJumtkTwHu xzERZZL7c/fi1QhAATvgAXaXA0mPoSxfds6LV3F2M69JdZNo8uxlHcnLhLWuq7jwdXZgQH+tt43 qdBzrU0C4/XKl5VjU/1RTSKDoanXfkuANt+qD702oLEXvQozl/FzYKSGB+MaAx3YSujEql/livx 5Tn1UOHD2bj7TBcELAdSgaQuQIbk33ITFltqzJ09SVQaIdSFUElnTdvoP3psdk7qnxlUqw86yUs Zfg6e/Q/3vSdUWZy0+RNKMzoXX9UxgJGLttOBoMrAOEOxje9+14mWiic4Upiov4joKshPjOM18Z DUGUQLwuuoiZ1jKYEUlt8WkE8lHYdB8VfjTWgIZGdjMiJJrMrBdMZNviKlf/V9BKQHvlKOEAuV9 KZxjKSeFLPEELni5PFg== X-Authority-Analysis: v=2.4 cv=F4tnsKhN c=1 sm=1 tr=0 ts=6a305412 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=UCrIKau3vUVB3JaL4XcA:9 a=bBxd6f-gb0O0v-kibOvt:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: Iesgk3zX9Y2Q0EClNkdXk47EcDmgVg2G X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 impostorscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552366751158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/traps.c | 5 +++-- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/core.c | 12 ++++++------ tests/tcg/plugins/discons.c | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/traps.c b/contrib/plugins/traps.c index 4b879a8212a..4d59aa3c09d 100644 --- a/contrib/plugins/traps.c +++ b/contrib/plugins/traps.c @@ -25,7 +25,7 @@ static struct qemu_plugin_scoreboard *traps; =20 static void vcpu_discon(qemu_plugin_id_t id, unsigned int vcpu_index, enum qemu_plugin_discon_type type, uint64_t from_p= c, - uint64_t to_pc) + uint64_t to_pc, void *userdata) { TrapCounters *rec =3D qemu_plugin_scoreboard_find(traps, vcpu_index); switch (type) { @@ -75,7 +75,8 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_i= nfo_t *info, traps =3D qemu_plugin_scoreboard_new(sizeof(TrapCounters)); =20 qemu_plugin_register_vcpu_discon_cb(id, QEMU_PLUGIN_DISCON_ALL, - vcpu_discon); + vcpu_discon, + NULL); =20 qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index cf937c60ee7..03e7b2b1fb8 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -186,6 +186,7 @@ enum qemu_plugin_discon_type { * @from_pc: the source of the discontinuity, e.g. the PC before the * transition * @to_pc: the PC pointing to the next instruction to be executed + * @userdata: any plugin data to pass to the @cb * * The exact semantics of @from_pc depends on the @type of discontinuity. = For * interrupts, @from_pc will point to the next instruction which would have @@ -198,7 +199,8 @@ enum qemu_plugin_discon_type { typedef void (*qemu_plugin_vcpu_discon_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index, enum qemu_plugin_discon_type = type, - uint64_t from_pc, uint64_t to= _pc); + uint64_t from_pc, uint64_t to= _pc, + void *userdata); =20 /** * qemu_plugin_uninstall() - Uninstall a plugin @@ -293,6 +295,7 @@ void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id= _t id, * @id: plugin ID * @type: types of discontinuities for which to call the callback * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a vCPU receives a discontinuity e= vent * of the specified type(s), after the vCPU was prepared to handle the eve= nt. @@ -302,7 +305,8 @@ void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id= _t id, QEMU_PLUGIN_API void qemu_plugin_register_vcpu_discon_cb(qemu_plugin_id_t id, enum qemu_plugin_discon_type type, - qemu_plugin_vcpu_discon_cb_t cb); + qemu_plugin_vcpu_discon_cb_t cb, + void *userdata); =20 /** struct qemu_plugin_tb - Opaque handle for a translation block */ struct qemu_plugin_tb; diff --git a/plugins/core.c b/plugins/core.c index 5b4ed0ce213..0da7fbf929b 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -122,8 +122,7 @@ static void plugin_vcpu_cb__discon(CPUState *cpu, /* iterate safely; plugins might uninstall themselves at any time = */ QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_discon_cb_t func =3D cb->f.vcpu_discon; - - func(cb->ctx->id, cpu->cpu_index, type, from, to); + func(cb->ctx->id, cpu->cpu_index, type, from, to, cb->udata); } } qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); @@ -656,16 +655,17 @@ void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_= id_t id, =20 void qemu_plugin_register_vcpu_discon_cb(qemu_plugin_id_t id, enum qemu_plugin_discon_type type, - qemu_plugin_vcpu_discon_cb_t cb) + qemu_plugin_vcpu_discon_cb_t cb, + void *userdata) { if (type & QEMU_PLUGIN_DISCON_INTERRUPT) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_INTERRUPT, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_INTERRUPT, cb, us= erdata); } if (type & QEMU_PLUGIN_DISCON_EXCEPTION) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_EXCEPTION, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_EXCEPTION, cb, us= erdata); } if (type & QEMU_PLUGIN_DISCON_HOSTCALL) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_HOSTCALL, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_HOSTCALL, cb, use= rdata); } } =20 diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index 2e0e664e823..22114830fdc 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -98,7 +98,7 @@ static void report_mismatch(const char *pc_name, unsigned= int vcpu_index, =20 static void vcpu_discon(qemu_plugin_id_t id, unsigned int vcpu_index, enum qemu_plugin_discon_type type, uint64_t from_p= c, - uint64_t to_pc) + uint64_t to_pc, void *userdata) { struct cpu_state *state =3D qemu_plugin_scoreboard_find(states, vcpu_i= ndex); =20 @@ -214,7 +214,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, has_from); =20 qemu_plugin_register_vcpu_discon_cb(id, QEMU_PLUGIN_DISCON_ALL, - vcpu_discon); + vcpu_discon, NULL); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); =20 return 0; --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552348; cv=none; d=zohomail.com; s=zohoarc; b=HAEuTPOeXocq61oF4ZNPIhniG790XTM0o0lbrJKMKxpLaKRu042ADMdr96QPeXOR707Ujgyiaf2C+ygil+rG1HPJt5EKwa0SNr18BHByqxESPkeAyKDzVQODLC0aoS1F6a1zX/P67MFS/X40plC+Y4GmiyrWvoqbFA2rx++vmbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552348; 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=eLKXGMn2n62lJRcUytZ5WT38KcmBIzFIunI3KoTmHtY=; b=hwsyvnU5qhi/24MX6TJ1d6SVhJaCXznxELJeh/eIkJG7+9BZz9Xcw9CdQVQlWi+VcVqWuSfQOUxyYYnZTL25xdKFE/zVHuBUL3c59FRXtghAJNGkmJjXpBn7ZCQLQjNzboUa7d02/wt708N4AyDVMMr4G3uH3PUK26Ra8WK3TnM= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552348542930.470595278389; Mon, 15 Jun 2026 12:39:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6k-0002gc-M5; Mon, 15 Jun 2026 15:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6G-0002Up-F6 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:01 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6D-0001RD-Sw for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:59 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ17th1454047 for ; Mon, 15 Jun 2026 19:35:46 GMT Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etd2cb4cd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:46 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-304e7fc90b1so4233383eec.1 for ; Mon, 15 Jun 2026 12:35:46 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=eLKXGMn2n62 lJRcUytZ5WT38KcmBIzFIunI3KoTmHtY=; b=I/qpMh76TuPWn6QWcszOjV0zj7s S2P5uKvoKzG1OW4Id0FHJAG+8CWGqFjLqpkQIMshZP2IK9LfmsPqtai7125Kfd7K 7jlpcp479+pwEIsNkvlDuSyfsQwcjCKK7N6GlrXi7M/QKkECW7/svzdsHDdzimad ALTpQpN8jzHpsdnKCYNmW6H73hnCaeLdAcrT4eMm+fxb4HYKMw2JK80/QK1dG2jH brw5hPE/8xqjMHva1Y8oSqYl8G3hKIV2BplQOKCglsQU9/dGlKSaHeBEImKCSMYN Gcwv+Al2TBws/UwWPdrKQhPuvwE++RgXE3ggtlP8b/RQ66k3g0w4YuDLUJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552146; x=1782156946; 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=eLKXGMn2n62lJRcUytZ5WT38KcmBIzFIunI3KoTmHtY=; b=Eqh/guR/wNQEheYsK/5vSVrur91f3CCV1r1RTdAdCafjEM7/d3wnaz4tK9mJupMnlr erOE1OKIl6SID8cfpehjNidgFNn7gS3JUF/+HBRrvAXRhXT1PP/Jmo7PFzkn58OgO0DW yIPS0lptF9Zkv9hlrGTkcFUW8PYfnuYZ7iFZIMcDOHOxuHYBAapak9AYi++MuS3DDJin dTBPTWSfkHMSzadJbU78ZFSFrnRKeGkarUyV++dk9PFQDdzqdeXcVPYuPkGlLRgyD/Cw u35tQ0oW2hC+IN+P567AnYinrQUQvwRnOo74GpVLae5fno0O7sGLpEdo5/6OS9RZ2p7y TOZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552146; x=1782156946; 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=eLKXGMn2n62lJRcUytZ5WT38KcmBIzFIunI3KoTmHtY=; b=eSuUjVtQCoir1Wn5HAY80NxRcjNfvhTL4jDcZzTQbIkYza1Dopv0ndDwUcK5YTiflL CIJwJwJGPIbgofq76GWuctPOVWXwOnBmI6dF1gX+knaVvFkVAdfD6zMqs90SFCZPI48T Gud6Fm5DvRhKKuDsoW6YW7GN6xSXBKNsq+mDg80+ezO2hdPBXWtpzxWRZzR3gsW93wcj OY8qrFLvUoawq+v61LwwCkh6AC4e4gNuzHGu/zsL0gysOxXaF1sHu6XJGN15tw3JV9iw QPQw7/4HXgID7nTUo8kNTXENISKI2MzF2R9IQFAkrJRkbFR6O6icNtiOPXtMzruly1pJ 2RZA== X-Gm-Message-State: AOJu0YztsdWrLI4KXbEg20vxhtKNYE2YHEb5T3lfwDq7AaOCXfzt1kVn C51B93Ddn3n24++d59Mq3KIHCHuq+qu7MTqynhYa1Xb3ptaN0fUnTWWNV4YWKQw9s6+SibQGGco 3zT915Uti2c6wH8oYkQrrS0rD9CjnBWRJZVXlsEqzpvwkeTBkXVfCOgvtOkDgtF/gkMHY X-Gm-Gg: Acq92OFJMCEaLL72EdT5fUC1lExsJzMR0mxBkU+75PFdqc7CjF511bxkE/e80z63Bw5 Qd5ct/A7cMqTTvzIXGcrSIBPWD9VQU3TrmPYZywAfRXwkKLq7NLK8KJroz3HtSv4cD8uQCek3L8 mhCeiFgekkf666pionHbYsCESoFZF6meAPW7X1mT8zfsSzN5PnOfs/r2oRHupwtqcWgKjPmblZn mVMDi9Ah4pwOXXj99iVD/Mm21If5ynKUC1rQ7ihfpt6WVl+k1ieqfH45hSidv57qPGnS47Sl0gg z10EPLbU7pvBGSd6paPcm3jk3shgl9dZSCeMInEvfXFEKoza9CyuwNIENgSjHRvGWG7rkjeZKkP P9nglm82+mjY742444m7Ih+EbJr3GS97ugGOgrNpg/NueqzaloIiY19nQQZ6O7PhoKGqkoRSAlK nUw2l+kw== X-Received: by 2002:a05:701b:454e:10b0:139:7a47:ab68 with SMTP id a92af1059eb24-1397a47b13cmr2312345c88.37.1781552145770; Mon, 15 Jun 2026 12:35:45 -0700 (PDT) X-Received: by 2002:a05:701b:454e:10b0:139:7a47:ab68 with SMTP id a92af1059eb24-1397a47b13cmr2312320c88.37.1781552145096; Mon, 15 Jun 2026 12:35:45 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 14/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_discon_cb_t Date: Mon, 15 Jun 2026 12:35:13 -0700 Message-ID: <20260615193526.2883349-15-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXxR44SwY0qKSD 0WcnSmN6dWKHNC3hzwAn/4sqmebvWyMdMZuUPe+fE5LVaJ3hFpD30oimCYnoXRS8YHvivl3cQ+U 4x68+rb2Oc+0p88BcUOxOfOCqEBym0ZQ+ynNwBj7tI+XzrivPq2FPxef2wOc+us3VMtdubGbrQY JzAFJlLNMA7qD8b0pRnPH2uTIe/nzL/npK0i1dnUZt86qJCboylUCAoVW+s0Wuz0mIllZvF4x/8 NrC84KdrqkciMpes0TCCOpyVWunYMPfB/TTESnli4FJi0j3cfDgqvqjEumHcYM4Qp2gG2HbW1MC QvDcxq9ZpnukrN4M5bWkGToq2ax74KRAqST3xi8wmxBFPiDMFOC5H+mDFqrFoOR11uZgRcr98SI 2rsqM0JgOOj3Y0uHzxlzFUM7TcExjVTLaeqouZXG6oo/+okcxkg1YD5h/sIMgTHkcAGxU/qfLGX YGtjN9MOWGAPucORCug== X-Proofpoint-ORIG-GUID: 8HBo88NwxHHXGyWdB10WdnOGJgABTM6B X-Proofpoint-GUID: 8HBo88NwxHHXGyWdB10WdnOGJgABTM6B X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXyWInhQ0ZNOdB u1a8RqEQBjhxjYPjmm4i84pnbN+RueS/NS5QDrAZ8EReedQTHDIvlh5NJ3dboyTBDfiyQSUpEbo ++ID8YK7XVN4SM+fNiGYqiH4IGms4nE= X-Authority-Analysis: v=2.4 cv=MsRiLWae c=1 sm=1 tr=0 ts=6a305412 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=ZiyQStk_4VnRclnpaacA:9 a=scEy_gLbYbu1JhEsrz4S:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552350624158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/traps.c | 2 +- include/plugins/qemu-plugin.h | 4 +--- plugins/core.c | 2 +- tests/tcg/plugins/discons.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/traps.c b/contrib/plugins/traps.c index 4d59aa3c09d..b6df4455d63 100644 --- a/contrib/plugins/traps.c +++ b/contrib/plugins/traps.c @@ -23,7 +23,7 @@ typedef struct { =20 static struct qemu_plugin_scoreboard *traps; =20 -static void vcpu_discon(qemu_plugin_id_t id, unsigned int vcpu_index, +static void vcpu_discon(unsigned int vcpu_index, enum qemu_plugin_discon_type type, uint64_t from_p= c, uint64_t to_pc, void *userdata) { diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 03e7b2b1fb8..60d27d8d9c1 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -180,7 +180,6 @@ enum qemu_plugin_discon_type { =20 /** * typedef qemu_plugin_vcpu_discon_cb_t - vcpu discontinuity callback - * @id: plugin ID * @vcpu_index: the current vcpu context * @type: the type of discontinuity * @from_pc: the source of the discontinuity, e.g. the PC before the @@ -196,8 +195,7 @@ enum qemu_plugin_discon_type { * observable via general instruction exec callbacks. The same may be the = case * for some host calls such as hypervisor call "exceptions". */ -typedef void (*qemu_plugin_vcpu_discon_cb_t)(qemu_plugin_id_t id, - unsigned int vcpu_index, +typedef void (*qemu_plugin_vcpu_discon_cb_t)(unsigned int vcpu_index, enum qemu_plugin_discon_type = type, uint64_t from_pc, uint64_t to= _pc, void *userdata); diff --git a/plugins/core.c b/plugins/core.c index 0da7fbf929b..7e4ccd37b73 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -122,7 +122,7 @@ static void plugin_vcpu_cb__discon(CPUState *cpu, /* iterate safely; plugins might uninstall themselves at any time = */ QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_discon_cb_t func =3D cb->f.vcpu_discon; - func(cb->ctx->id, cpu->cpu_index, type, from, to, cb->udata); + func(cpu->cpu_index, type, from, to, cb->udata); } } qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index 22114830fdc..5ab645705e3 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -96,7 +96,7 @@ static void report_mismatch(const char *pc_name, unsigned= int vcpu_index, g_free(report); } =20 -static void vcpu_discon(qemu_plugin_id_t id, unsigned int vcpu_index, +static void vcpu_discon(unsigned int vcpu_index, enum qemu_plugin_discon_type type, uint64_t from_p= c, uint64_t to_pc, void *userdata) { --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552366; cv=none; d=zohomail.com; s=zohoarc; b=FmYgnQ263e5Ml+zwHw5Sbc1bEPlzZ3YzTOpS/tJmos0Vj8U3RQwVZ27QXYBx8z1IEj2GPnoFubsJ7ghMB50uKsNgbqZjxyOofbIosopFrYQCHMiQgiyjhaHxxooVmpbS6FacAXNn03dfNkvo/pL9Dk5G3UeqMSMwkkIGOlI1uiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552366; 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=lkguRjHGDUiBKma7C+rauY7bLb8ci0bl17hvuEjiXq4=; b=l9i9WaQwZ+nOVlLv5TZ6vOhK8TuHEBSbo+jZxLFdNJLKUFQytKze16cq4+k/6Wf75Abs6qJkJnQqCqPSPlNiivDyhlPDzhnufqHOmlWdY7P3n1sqb5PSyEY2cQ5O3hhy/TF9P2tKitNAjv5nTghtiXqdVQesfliSmcNZu5+SueE= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552366442747.18703383979; Mon, 15 Jun 2026 12:39:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7w-00056X-AC; Mon, 15 Jun 2026 15:37:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6K-0002Vp-3g for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6F-0001Sn-NP for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:02 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ2IUI1245700 for ; Mon, 15 Jun 2026 19:35:48 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetf2jcu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:48 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1382674ba2eso3369179c88.0 for ; Mon, 15 Jun 2026 12:35:48 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=lkguRjHGDUi BKma7C+rauY7bLb8ci0bl17hvuEjiXq4=; b=fWQzNcR5pVPHw5yfQdhuUeg1EFJ PYE6g4tH5HN6XQgeVJ15gbR5T5cSor0h+fG9GWSiY9CdXZigRz1qL76IDUEF4D8K G1tcHaAKBctQnA0Iyt/jmg724gQ/wk0JI7BTVIy712zFIPLksge9GbHoKz4WaPT6 kwJkBlRPznFZgw/XYGlBv+6arUuH+VuyW8wRoGnhmB2GtcSQS7QBQSlgThLQR0k/ LW6mlubIjV/Xsoq62dIZSbJRu6RkD2cPCU3TbRLCprt1hoM66JoqgH+xuMIKcT29 2seJ+UpmXi09tm81dnayPQE+pZm1nuy9fYzI7iu0SveeLdbYgPYNKi720dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552148; x=1782156948; 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=lkguRjHGDUiBKma7C+rauY7bLb8ci0bl17hvuEjiXq4=; b=V6qQz4Eq4LWrV32mbnv3xKWPv0ymOYbxAxP/Ri9DlcXUvoAqFvwfML8EldBoEp5BXb fdwrZhsRo8h1Neb3TqBwoJJFDzrXWRfsC5E0UUaGneekJVoEx2Q7ERXkW+ZnwqFcxy9U +kwuMh0BkdHOu6IthR7Nt/uiDQvndxiJ2rHRcyYlcfypuQmaTqbgpJAN2+dcc+E2t8xB 7qTyF1wCWYfwNxFvKmrxcX01vBU0nE2T2BCb3hqjutK/tcX4IAgzn/SxlOpI2P91NHdC x5Kin5aoLJIM85HADflA+Dq64fiDsE+HLZAPJZ/SfgwRswjRHlSFj+B5PY6Fa+Adn46t eBzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552148; x=1782156948; 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=lkguRjHGDUiBKma7C+rauY7bLb8ci0bl17hvuEjiXq4=; b=cwi9DGM6x4KuREK+1WpygxOurS9ujEsRMSCGPjbBmQAInWiDwcrLji3ZVlcPYvBwR3 Z/Kx4sXoCJPKWUFFrNHvNSJCXMBPOSGPDMaKl8MCXuOJtfqGHitHtzVrxvCqRJYjYiOX CibSh3fGWoh8CzMiXCArOeR43GYJS++rWwjRV5ScITcVdhIe6yhHXGOINzA7Xhjyh+mM PyFvTVSpCFZJ3+T/MTrtJkeYcOiPtpZPD7RYq3mKu5MI2cSpSfrL2LLrzVGpnDkDroY0 yudWZMvw4bcX60C1HjoWzmDgfsJR0iApkIWOhC6zXGVd27wwxjratNZsUxmwZI0uodLo qAbQ== X-Gm-Message-State: AOJu0Yx1w4dnXRQ1zuXmGndfumKjkG2qwrkGc7f9cXhcEadIVrvMeBMC kceIo6j4ZzNSif+4YLggE70kD/NQdyLIDpHmx4wmymWCXfOUqbFh0N2kHl6u6zOAKaP634RdfIT PCPiQ/zm5baVNZLUjfDTtCVJCaEuUIoAtYjuRjADwEWctEWbMiTEsABQWCwLTaFKV54kc X-Gm-Gg: Acq92OHz5zcdGnZ/rsKv0rqvIk+Vep4XwqUhfuHdDZSgV8sg0Apgn1d2Y1cZqDSYJrS 8tQeG2EIBoj9AnYs4P0NdY34iK5U0md04mr1O37ZKI58pjpXzNqyVAHRdnu4luAWoncdGu2+1zQ Kw3zaiJnAZ+vgNJm6tlcnnisCsYXC6yRq5OJh8Abfu4GsgAWadke11KLKcLWLZwSr8iUYoAFAdl oZshiwZcsXb0hEuo/syCqLpcLIMcED+JraFx1LpyjUkEnPHt+jEwEKP7VAiTqHXAZtiJiu6Zx1d 9/zKgINkXsPlW645W6ZCHQuGJRdPFxZSwKthO+Fs2HjsfZixXqAi7Hz6pVWNtOdzNWzpUMLFXNi zt9hywHVU/FZrd0FlsZrThPO3K56CmKerr+0ZnxbusBGXGaIqEJ5l61UV8nuOTsyuYTkMhT6IiM ZObB/bOA== X-Received: by 2002:a05:7022:4399:b0:137:eac4:82ae with SMTP id a92af1059eb24-1384bba55e7mr7369019c88.37.1781552147455; Mon, 15 Jun 2026 12:35:47 -0700 (PDT) X-Received: by 2002:a05:7022:4399:b0:137:eac4:82ae with SMTP id a92af1059eb24-1384bba55e7mr7368996c88.37.1781552146811; Mon, 15 Jun 2026 12:35:46 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 15/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_tb_trans_cb_t Date: Mon, 15 Jun 2026 12:35:14 -0700 Message-ID: <20260615193526.2883349-16-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=adxRWxot c=1 sm=1 tr=0 ts=6a305414 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=deo0yMGDrNm56YX46o0A:9 a=O8hF6Hzn-FEA:10 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 5tbOUccwGdKUT-HptFAfjKDwkQps2i_P X-Proofpoint-ORIG-GUID: 5tbOUccwGdKUT-HptFAfjKDwkQps2i_P X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX9mqT5R6GX39J s7sX9HmjoRlC3y+oFr3xFXym0BaK19cJRI+DD+XwZXzSzbst4Sdo7Oo1iRmlVm7I0dRo5fTdkIH rRZHmC/9YippMKtMrRUfh9PRes9HG6A= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX1BKBJ237tLi/ zvrh/bx2/Ikqx6GQVUHDMtWBiBIjBa7ulCJGezDeTDUD0WJRkZ4N2JWb1J+8H3CXSTa0unj4Ndt sh+8Oo8lMj6g8ILrmvwiGDlNPix2e6hJOd/DHRVoK26XvsCYIQ7QgZiKrzRPUP/UiFgprsZ7Ey4 7Zr36hJKKTyjhkApr7FCBudUhmiAxzIJpc9c/kJxuNTrwT6x1ZUqt6kRglNZKZ1Wpf0H/jRWDTh wBEt3UzkVKq+I32H4tnE8Beaikw2F7C4EKo9d9rhu+ckvDG/tkKbefKnmcjojQHK4UEUTwil3zl CqnNMM/7zmx06bNqvqEXWGwpC9zudookaVXckrZBEbMs67e/BnbelOgH5ObemnNBlwUP+Ffz2n2 vCDA5vuaOIQCVb/YQNsd4RgZ2H4EqurVDWH3rGWZAtmKddEL6R0DjoMpOeYfQ7gFZoNgNsAJxxB yXGihTJUXrpakFqKbOA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552366684158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/bbv.c | 2 +- contrib/plugins/cache.c | 2 +- contrib/plugins/cflow.c | 2 +- contrib/plugins/cpp.cpp | 2 +- contrib/plugins/drcov.c | 2 +- contrib/plugins/execlog.c | 2 +- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c | 2 +- contrib/plugins/hwprofile.c | 2 +- contrib/plugins/ips.c | 2 +- contrib/plugins/lockstep.c | 2 +- contrib/plugins/stoptrigger.c | 2 +- contrib/plugins/uftrace.c | 2 +- include/plugins/qemu-plugin.h | 4 +--- plugins/core.c | 2 +- tests/tcg/plugins/bb.c | 2 +- tests/tcg/plugins/discons.c | 2 +- tests/tcg/plugins/empty.c | 2 +- tests/tcg/plugins/inline.c | 2 +- tests/tcg/plugins/insn.c | 2 +- tests/tcg/plugins/mem.c | 2 +- tests/tcg/plugins/patch.c | 2 +- tests/tcg/plugins/reset.c | 4 ++-- tests/tcg/plugins/setpc.c | 2 +- 25 files changed, 26 insertions(+), 28 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index 0ad1301a1de..7e9e72477d7 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -102,7 +102,7 @@ static void vcpu_interval_exec(unsigned int vcpu_index,= void *udata) fputc('\n', vcpu->file); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { uint64_t n_insns =3D qemu_plugin_tb_n_insns(tb); uint64_t vaddr =3D qemu_plugin_tb_vaddr(tb); diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index f41ddb0aa43..c9d61de26c9 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -462,7 +462,7 @@ static void vcpu_insn_exec(unsigned int vcpu_index, voi= d *userdata) g_mutex_unlock(&l2_ucache_locks[cache_idx]); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n_insns; size_t i; diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index 4d00879ccad..9a850c8c0cc 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -297,7 +297,7 @@ static void vcpu_tb_branched_exec(unsigned int cpu_inde= x, void *udata) * instructions for their execution. * */ -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { uint64_t pc =3D qemu_plugin_tb_vaddr(tb); size_t insns =3D qemu_plugin_tb_n_insns(tb); diff --git a/contrib/plugins/cpp.cpp b/contrib/plugins/cpp.cpp index 0673c4f074d..34243cc922f 100644 --- a/contrib/plugins/cpp.cpp +++ b/contrib/plugins/cpp.cpp @@ -363,7 +363,7 @@ =20 QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { } =20 diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 458c0d2084d..2dc08512d44 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -119,7 +119,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) g_mutex_unlock(&lock); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { uint64_t pc =3D qemu_plugin_tb_vaddr(tb); size_t n =3D qemu_plugin_tb_n_insns(tb); diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 2d02816a184..8329112305c 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -177,7 +177,7 @@ static void vcpu_insn_exec(unsigned int cpu_index, void= *udata) * QEMU convert code by translation block (TB). By hooking here we can the= n hook * a callback on each instruction and memory access. */ -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { struct qemu_plugin_insn *insn; bool skip =3D (imatches || amatches); diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 92859872ac9..682b160019a 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -121,7 +121,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) * Otherwise a helper is inserted which calls the vcpu_tb_exec * callback. */ -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { ExecCount *cnt; uint64_t pc =3D qemu_plugin_tb_vaddr(tb); diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index a6d83b06c75..d8321a73303 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -148,7 +148,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, g_mutex_unlock(&lock); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 75728896198..feabc10bf44 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -310,7 +310,7 @@ static struct qemu_plugin_scoreboard *find_counter( return NULL; } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index b7f96117e94..fcc993015d7 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -242,7 +242,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, } } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index 2c110906731..a1fcba7c5d6 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -110,7 +110,7 @@ static void every_quantum_insn(unsigned int cpu_index, = void *udata) update_system_time(vcpu); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); qemu_plugin_u64 quantum_insn =3D diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index c1c2b0aca8e..dc527ad56e2 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -249,7 +249,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) log =3D g_slist_prepend(log, exec); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { BlockInfo *bi =3D g_new0(BlockInfo, 1); bi->pc =3D qemu_plugin_tb_vaddr(tb); diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 40f8fd313d7..222a3f92ae0 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -64,7 +64,7 @@ static void exit_address_reached(unsigned int cpu_index, = void *udata) exit_emulation(ei->exit_code, msg); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t tb_n =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < tb_n; i++) { diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index 8be8409dce2..a1b10f9cf59 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -838,7 +838,7 @@ static void track_callstack(unsigned int cpu_index, voi= d *udata) trace_enter_stack(t, cs, timestamp); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); uintptr_t tb_pc =3D qemu_plugin_tb_vaddr(tb); diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 60d27d8d9c1..8242e054054 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -417,11 +417,9 @@ enum qemu_plugin_cond { =20 /** * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback - * @id: unique plugin id * @tb: opaque handle used for querying and instrumenting a block. */ -typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, - struct qemu_plugin_tb *tb); +typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct qemu_plugin_tb *tb); =20 /** * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb diff --git a/plugins/core.c b/plugins/core.c index 7e4ccd37b73..0ae0dc49aec 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -488,7 +488,7 @@ void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu= _plugin_tb *tb) qemu_plugin_vcpu_tb_trans_cb_t func =3D cb->f.vcpu_tb_trans; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS); - func(cb->ctx->id, tb); + func(tb); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/bb.c b/tests/tcg/plugins/bb.c index ba605246eb0..713063f4945 100644 --- a/tests/tcg/plugins/bb.c +++ b/tests/tcg/plugins/bb.c @@ -77,7 +77,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *ud= ata) count->bb_count++; } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); =20 diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index 5ab645705e3..d2a163a5714 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -147,7 +147,7 @@ static void insn_exec(unsigned int vcpu_index, void *us= erdata) } } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < n_insns; i++) { diff --git a/tests/tcg/plugins/empty.c b/tests/tcg/plugins/empty.c index 8fa6bacd93d..5927507c18e 100644 --- a/tests/tcg/plugins/empty.c +++ b/tests/tcg/plugins/empty.c @@ -20,7 +20,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGI= N_VERSION; * This allows us to measure the overhead of injecting and then * removing empty instrumentation. */ -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { } =20 QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, diff --git a/tests/tcg/plugins/inline.c b/tests/tcg/plugins/inline.c index 1d17884b40b..3f5c49f5ede 100644 --- a/tests/tcg/plugins/inline.c +++ b/tests/tcg/plugins/inline.c @@ -223,7 +223,7 @@ static void vcpu_mem_access(unsigned int cpu_index, g_mutex_unlock(&mem_lock); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { void *tb_store =3D tb; qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index d9f94888d6f..a303275ea1b 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -138,7 +138,7 @@ static void vcpu_insn_matched_exec_before(unsigned int = cpu_index, void *udata) } } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index 5cdf71c7e49..24a3bce0bfd 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -266,7 +266,7 @@ static void print_access(unsigned int cpu_index, qemu_p= lugin_meminfo_t meminfo, qemu_plugin_outs(out->str); } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; diff --git a/tests/tcg/plugins/patch.c b/tests/tcg/plugins/patch.c index eba2f8b8d6c..8fcf0bd409b 100644 --- a/tests/tcg/plugins/patch.c +++ b/tests/tcg/plugins/patch.c @@ -130,7 +130,7 @@ static void patch_vaddr(unsigned int vcpu_index, void *= userdata) /* * Callback on translation of a translation block. */ -static void vcpu_tb_trans_cb(qemu_plugin_id_t id, struct qemu_plugin_tb *t= b) +static void vcpu_tb_trans_cb(struct qemu_plugin_tb *tb) { g_autoptr(GByteArray) insn_data =3D g_byte_array_new(); uintptr_t addr =3D 0; diff --git a/tests/tcg/plugins/reset.c b/tests/tcg/plugins/reset.c index ef5a32781b2..1fdf114e5e0 100644 --- a/tests/tcg/plugins/reset.c +++ b/tests/tcg/plugins/reset.c @@ -27,7 +27,7 @@ static void tb_exec_after_reset(unsigned int vcpu_index, = void *userdata) qemu_plugin_uninstall(plugin_id, after_uninstall, NULL); } =20 -static void tb_trans_after_reset(qemu_plugin_id_t id, struct qemu_plugin_t= b *tb) +static void tb_trans_after_reset(struct qemu_plugin_tb *tb) { g_assert(was_reset && !was_uninstalled); qemu_plugin_register_vcpu_tb_exec_cb(tb, tb_exec_after_reset, @@ -49,7 +49,7 @@ static void tb_exec_before_reset(unsigned int vcpu_index,= void *userdata) qemu_plugin_reset(plugin_id, after_reset, (void *) plugin_id); } =20 -static void tb_trans_before_reset(qemu_plugin_id_t id, struct qemu_plugin_= tb *tb) +static void tb_trans_before_reset(struct qemu_plugin_tb *tb) { g_assert(!was_reset && !was_uninstalled); qemu_plugin_register_vcpu_tb_exec_cb(tb, tb_exec_before_reset, diff --git a/tests/tcg/plugins/setpc.c b/tests/tcg/plugins/setpc.c index 8f2d025e245..44cea064783 100644 --- a/tests/tcg/plugins/setpc.c +++ b/tests/tcg/plugins/setpc.c @@ -73,7 +73,7 @@ static void vcpu_mem_access(unsigned int vcpu_index, } } =20 -static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb) { size_t insns =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < insns; i++) { --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552263; cv=none; d=zohomail.com; s=zohoarc; b=RD3FcV765odEXhpTp/jB6BPgPYGhLCIh58gA4iJk+t0sRXpSFesqRkMXn+2J0cA0mz53jv4BcXUOofv3pGAQr1J4GhepQID7tIzzwREmNL6k24rukLit96fWnonnhBmWvM7hHK8anCs5NqaIJF7qPu16a+Ifw+buwMJhB88uJug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552263; 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=upA4PpPE1Uqh9Vt0Yrv3GHr0oQKKlu64rTwcGUa6J80=; b=GQ9O5AgKvPYDNBQEvYB/CXCNlv1R7ycfSJOkoCBlf0/iTUVJhJSswikzvQVbn9J9E8pEFF0gx9tdf3rAs5X1RHyk1sgXGr+cAVFS86fOHMrJTu19X6mJBQMQ80OYfo0lDJ0a9tYQ91pSCAOJjFCCzlc9M9dmo3s19k6UGbF1/C4= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552263069355.3967363267375; Mon, 15 Jun 2026 12:37:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6j-0002fw-0P; Mon, 15 Jun 2026 15:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6B-0002SC-2Z for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:57 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD67-0001TG-B7 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:54 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxEXU884118 for ; Mon, 15 Jun 2026 19:35:50 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etfa72hm3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:49 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-137fe4a3640so5732829c88.0 for ; Mon, 15 Jun 2026 12:35:49 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=upA4PpPE1Uq h9Vt0Yrv3GHr0oQKKlu64rTwcGUa6J80=; b=Ig7YVOCd35xL9mHqLFw8PDyLvRJ Cg2fCB56KDYDzOUPUDAmMZIenQ2ijhf7Vo9Yswn6SnmnyaiLDd8dfLLKHnMeksof 81S9pVK05pNqFR4HRlHyZTK8p1UImoKokzfmFXC4gw0666wQbYIqJjrygfDF6JNV 2NY2OQ62orb8UOqkai1vH/HZRJVux/otObpbwb83pCSd7kJTOkxSwG50dkE+Z2pw ZoymYUw5hIrB9yE+xE9hW/3S4ykdHRxPSJ4Gtl1FLG8DQneRrDw5Ge2gn/3TTnz0 +7sPeOMi4/M+FtjDOkVQh100zvWHThEstA49rFg4cgG+79E2mddEAI+HJjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552149; x=1782156949; 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=upA4PpPE1Uqh9Vt0Yrv3GHr0oQKKlu64rTwcGUa6J80=; b=BMrfzPFHgKwPvRYrgB7HT0fT19zEOLafyx4YbWTSXlA6kBP0QjOEHJxEjuEcHPLisG BCtFyvdfqX3XurZ4lwJIUXbHc5et/THRgKRUsTHF3x5FonLj8KMFPATC2uxZQKyp6hG6 mnauivikHyoTeQy3W8ivJRLD+oLalmon4u9tPpHfbo+FtRbJ5nYn6s+0x4UBXkrr3V/k OG1Dr+J/rQtNoD6++4R9Z/gmz5X943snhDEsGg7yCXAA3sbSUXLlmYDpDNyb8euUCaSN YSdBh7EfuMqtgDQitHItuc8lzl58/ehQc6Rgr2KGPTtjSqToaOTSiJ8B+n65rZFWsi6q O7Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552149; x=1782156949; 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=upA4PpPE1Uqh9Vt0Yrv3GHr0oQKKlu64rTwcGUa6J80=; b=Obdgcsuc1aaUNR9uxtlGZvGOIR5p7JAjfgDljAKptBq9uxgpZbrr50W11+3bsIf79f nYqEC+7MzpuFvIE5Ipm/th8sJJerRPhMgFRPok04sLeCAS8hjS2yohh2pUdpC5psL9Fd UH27Dhk1ksixC+U55naOliesvVwvNa+5YbraEQFMule0Ztuk74gKrKSYODpfEMLJykTR +miHmNyNyvvkdmhoeoA2bDUOPrQwaMrk/B+CbedNyoIONRA0djPJXDnujmceZT3ZnlYC /pKOMeUIZIovd6NYwyKUC9JlKs5UriORO7GsFlyvpxAo9eKsv32wT9utn56q7iSgqe/W ou3g== X-Gm-Message-State: AOJu0YwjFtP+WdU1LOQXO/oNoXyFPOMn2eCc8/nra3OEvVocCTYWa96V rpry9SBBDS86EM+xF+vjTxiL3aEgT6cZlAb1b2o7EBmY/M3j/mK2KTr8qa2pKLyjcziJKzhRv7y SlS0ZGNBTlTyE79/IL4ojMRVNzoD6JxZvuMZyme4gVZlY4oH0Euz5Pul+7LCmSb4F/19c X-Gm-Gg: Acq92OHBLwSTnjkjh7KR4uwO3ck6xIFqqRrkhkbg/oxbA3qT9lH4tLxHZIV8de4rUch yOeQB+1BaVH0qAXv5rVRB1wcJZc00qmoPjyWGhfm4HTNdtwDl0FWsTaO0L6u+s/eiOqYkTcTp/L tRvZ6l9sJcbLrGNnElX31HUznwVLPJa21RyHn9TCIIwUd2I9ode88hZm1WrLmzTSnZyzjIv2VQ7 NtWjveYxYXR1DwptKZ//hDuxRiWyot4ftySdYxRSVixxxm7mqixaTo27KLDiq2B10gRpDVno5k8 H7aWAOPwWDY2XRDUigYbFPyO20k8tX11HmjwGrWQ7iWUo2USJNZYJmfgrSknnRhzIhg6dHb1qBj oeVBfER+uZEKpXm4FFbFfGlEE7RzpWV3YAEOWsqe4CD5Ald2NKAdyQRG/VjXXDo1eFH7mtXoXjA jzngNasg== X-Received: by 2002:a05:7022:1005:b0:138:364e:3224 with SMTP id a92af1059eb24-13985ec79b0mr165716c88.16.1781552148804; Mon, 15 Jun 2026 12:35:48 -0700 (PDT) X-Received: by 2002:a05:7022:1005:b0:138:364e:3224 with SMTP id a92af1059eb24-13985ec79b0mr165700c88.16.1781552148009; Mon, 15 Jun 2026 12:35:48 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 16/26] plugins: add userdata to qemu_plugin_vcpu_tb_trans_cb_t Date: Mon, 15 Jun 2026 12:35:15 -0700 Message-ID: <20260615193526.2883349-17-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: _lPO5moq0HGZJOhZFYz8O7M2jdv1tQjK X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXweG5ZxcXN1PO 1Kl87No2RBD4X8KsokWUl7az2eHW4Ri4DOp7WymjsE/z3Z8116ZN4hA34xFvDPBbXn6LMyjdPw0 cvvUG8ioLrgMAis6o9zTcHAXPxMv2Qs= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX+E4XJmKUo9ic wQbd7rIj+8NNwiE/Lx5PzOhIAPrwhi05rJ+wf4LiHZLEeNd+4HBnS2N4QSm4dta+XwcWoODt1U/ S7hYgJfBAN6BiwfkNpdHOtIWJoYwBO08ev7zvGf5jPqdYTVO/5TF4hnLK9mhcVrTeWWUQu0X7JJ sf+kIMgKqDuQSiKiKFUK+F8IcbqxgsgMIO4P+idNNeIdEFbUEbaMq710tqGCBBJYCsRGQEG0PN+ GFHzweQoFBfIZ+SOyN2Bk3XreX64/eeqzWitkd9soTfKokFIKT3Wfs/fNMGn2RM9gJsy2qPFz1q 4eLYRag8NPkx3JEmEtJDz4FC8GJpJvSeHTuWP1ZeftfINcer0+/gyJw5E3oVpLqzkG991tYilGX Nc5mee6q40VdwNpjhiWQfNJJjdgxLKV0WgOl43gEOKTads0lA0BAZo4D+eMOSnuiHdTq/2Uy8Q2 2NQFnBFIGQGGDHWmkTg== X-Proofpoint-GUID: _lPO5moq0HGZJOhZFYz8O7M2jdv1tQjK X-Authority-Analysis: v=2.4 cv=AN2yTM5Z c=1 sm=1 tr=0 ts=6a305415 cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=t56wdHKumdETyko2czkA:9 a=O8hF6Hzn-FEA:10 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 phishscore=0 adultscore=0 malwarescore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552265190158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- contrib/plugins/bbv.c | 4 ++-- contrib/plugins/cache.c | 4 ++-- contrib/plugins/cflow.c | 4 ++-- contrib/plugins/cpp.cpp | 4 ++-- contrib/plugins/drcov.c | 4 ++-- contrib/plugins/execlog.c | 4 ++-- contrib/plugins/hotblocks.c | 4 ++-- contrib/plugins/hotpages.c | 4 ++-- contrib/plugins/howvec.c | 4 ++-- contrib/plugins/hwprofile.c | 4 ++-- contrib/plugins/ips.c | 4 ++-- contrib/plugins/lockstep.c | 4 ++-- contrib/plugins/stoptrigger.c | 4 ++-- contrib/plugins/uftrace.c | 4 ++-- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/api.c | 5 +++-- plugins/core.c | 2 +- tests/tcg/plugins/bb.c | 4 ++-- tests/tcg/plugins/discons.c | 4 ++-- tests/tcg/plugins/empty.c | 4 ++-- tests/tcg/plugins/inline.c | 4 ++-- tests/tcg/plugins/insn.c | 4 ++-- tests/tcg/plugins/mem.c | 4 ++-- tests/tcg/plugins/patch.c | 4 ++-- tests/tcg/plugins/reset.c | 8 ++++---- tests/tcg/plugins/setpc.c | 4 ++-- 26 files changed, 58 insertions(+), 53 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index 7e9e72477d7..0e6ec673d97 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -102,7 +102,7 @@ static void vcpu_interval_exec(unsigned int vcpu_index,= void *udata) fputc('\n', vcpu->file); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { uint64_t n_insns =3D qemu_plugin_tb_n_insns(tb); uint64_t vaddr =3D qemu_plugin_tb_vaddr(tb); @@ -157,7 +157,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, vcpus =3D qemu_plugin_scoreboard_new(sizeof(Vcpu)); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); =20 return 0; } diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index c9d61de26c9..0a5349f131e 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -462,7 +462,7 @@ static void vcpu_insn_exec(unsigned int vcpu_index, voi= d *userdata) g_mutex_unlock(&l2_ucache_locks[cache_idx]); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n_insns; size_t i; @@ -844,7 +844,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, l1_icache_locks =3D g_new0(GMutex, cores); l2_ucache_locks =3D use_l2 ? g_new0(GMutex, cores) : NULL; =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 miss_ht =3D g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, i= nsn_free); diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index 9a850c8c0cc..319a7a7fc07 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -297,7 +297,7 @@ static void vcpu_tb_branched_exec(unsigned int cpu_inde= x, void *udata) * instructions for their execution. * */ -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { uint64_t pc =3D qemu_plugin_tb_vaddr(tb); size_t insns =3D qemu_plugin_tb_n_insns(tb); @@ -387,7 +387,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/contrib/plugins/cpp.cpp b/contrib/plugins/cpp.cpp index 34243cc922f..a0bb261fbe8 100644 --- a/contrib/plugins/cpp.cpp +++ b/contrib/plugins/cpp.cpp @@ -363,7 +363,7 @@ =20 QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { } =20 @@ -371,6 +371,6 @@ 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); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); return 0; } diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 2dc08512d44..5a18a8f48b4 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -119,7 +119,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) g_mutex_unlock(&lock); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { uint64_t pc =3D qemu_plugin_tb_vaddr(tb); size_t n =3D qemu_plugin_tb_n_insns(tb); @@ -156,7 +156,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 return 0; diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 8329112305c..74325495cce 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -177,7 +177,7 @@ static void vcpu_insn_exec(unsigned int cpu_index, void= *udata) * QEMU convert code by translation block (TB). By hooking here we can the= n hook * a callback on each instruction and memory access. */ -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { struct qemu_plugin_insn *insn; bool skip =3D (imatches || amatches); @@ -482,7 +482,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 /* Register init, translation block and exit callbacks */ qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 return 0; diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 682b160019a..ea746b513a1 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -121,7 +121,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) * Otherwise a helper is inserted which calls the vcpu_tb_exec * callback. */ -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { ExecCount *cnt; uint64_t pc =3D qemu_plugin_tb_vaddr(tb); @@ -186,7 +186,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index d8321a73303..56e5698ce1d 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -148,7 +148,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, g_mutex_unlock(&lock); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; @@ -197,7 +197,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index feabc10bf44..55db9ff8028 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -310,7 +310,7 @@ static struct qemu_plugin_scoreboard *find_counter( return NULL; } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; @@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index fcc993015d7..87b0267ffe3 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -242,7 +242,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, } } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; @@ -319,7 +319,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 plugin_init(); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index a1fcba7c5d6..6f7ac1587ec 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -110,7 +110,7 @@ static void every_quantum_insn(unsigned int cpu_index, = void *udata) update_system_time(vcpu); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); qemu_plugin_u64 quantum_insn =3D @@ -206,7 +206,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, time_handle =3D qemu_plugin_request_time_control(); g_assert(time_handle); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index dc527ad56e2..ed9d18460fe 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -249,7 +249,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *= udata) log =3D g_slist_prepend(log, exec); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { BlockInfo *bi =3D g_new0(BlockInfo, 1); bi->pc =3D qemu_plugin_tb_vaddr(tb); @@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 our_id =3D id; =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, (void *)id); return 0; } diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 222a3f92ae0..3babd014171 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -64,7 +64,7 @@ static void exit_address_reached(unsigned int cpu_index, = void *udata) exit_emulation(ei->exit_code, msg); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t tb_n =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < tb_n; i++) { @@ -150,7 +150,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, } =20 /* Register translation block and exit callbacks */ - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 return 0; diff --git a/contrib/plugins/uftrace.c b/contrib/plugins/uftrace.c index a1b10f9cf59..9b0a4963aee 100644 --- a/contrib/plugins/uftrace.c +++ b/contrib/plugins/uftrace.c @@ -838,7 +838,7 @@ static void track_callstack(unsigned int cpu_index, voi= d *udata) trace_enter_stack(t, cs, timestamp); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); uintptr_t tb_pc =3D qemu_plugin_tb_vaddr(tb); @@ -987,7 +987,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, score =3D qemu_plugin_scoreboard_new(sizeof(Cpu)); qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); qemu_plugin_register_atexit_cb(id, at_exit, (void *) info->system_emul= ation); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); =20 return 0; } diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 8242e054054..53daa09fc72 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -418,13 +418,16 @@ enum qemu_plugin_cond { /** * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback * @tb: opaque handle used for querying and instrumenting a block. + * @userdata: any plugin data to pass to the @cb */ -typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct qemu_plugin_tb *tb); +typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct qemu_plugin_tb *tb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb * @id: plugin ID * @cb: callback function + * @userdata: any plugin data to pass to the @cb * * The @cb function is called every time a translation occurs. The @cb * function is passed an opaque qemu_plugin_type which it can query @@ -435,7 +438,8 @@ typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct q= emu_plugin_tb *tb); */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_tb_trans_cb_t = cb); + qemu_plugin_vcpu_tb_trans_cb_t = cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_tb_exec_cb() - register execution callback diff --git a/plugins/api.c b/plugins/api.c index 849790fe13b..774b1b80214 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -195,9 +195,10 @@ void qemu_plugin_register_vcpu_mem_inline_per_vcpu( } =20 void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_tb_trans_cb_t = cb) + qemu_plugin_vcpu_tb_trans_cb_t = cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_TB_TRANS, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_TB_TRANS, cb, userdat= a); } =20 void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, diff --git a/plugins/core.c b/plugins/core.c index 0ae0dc49aec..f30009d50dd 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -488,7 +488,7 @@ void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu= _plugin_tb *tb) qemu_plugin_vcpu_tb_trans_cb_t func =3D cb->f.vcpu_tb_trans; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS); - func(tb); + func(tb, cb->udata); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/bb.c b/tests/tcg/plugins/bb.c index 713063f4945..90adb3ebd97 100644 --- a/tests/tcg/plugins/bb.c +++ b/tests/tcg/plugins/bb.c @@ -77,7 +77,7 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *ud= ata) count->bb_count++; } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); =20 @@ -127,7 +127,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, qemu_plugin_register_vcpu_idle_cb(id, vcpu_idle, NULL); } =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/tests/tcg/plugins/discons.c b/tests/tcg/plugins/discons.c index d2a163a5714..45f24397047 100644 --- a/tests/tcg/plugins/discons.c +++ b/tests/tcg/plugins/discons.c @@ -147,7 +147,7 @@ static void insn_exec(unsigned int vcpu_index, void *us= erdata) } } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n_insns =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < n_insns; i++) { @@ -215,7 +215,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 qemu_plugin_register_vcpu_discon_cb(id, QEMU_PLUGIN_DISCON_ALL, vcpu_discon, NULL); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); =20 return 0; } diff --git a/tests/tcg/plugins/empty.c b/tests/tcg/plugins/empty.c index 5927507c18e..286b3035e61 100644 --- a/tests/tcg/plugins/empty.c +++ b/tests/tcg/plugins/empty.c @@ -20,13 +20,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLU= GIN_VERSION; * This allows us to measure the overhead of injecting and then * removing empty instrumentation. */ -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { } =20 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); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); return 0; } diff --git a/tests/tcg/plugins/inline.c b/tests/tcg/plugins/inline.c index 3f5c49f5ede..436223db0e6 100644 --- a/tests/tcg/plugins/inline.c +++ b/tests/tcg/plugins/inline.c @@ -223,7 +223,7 @@ static void vcpu_mem_access(unsigned int cpu_index, g_mutex_unlock(&mem_lock); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { void *tb_store =3D tb; qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( @@ -303,7 +303,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, data_tb =3D qemu_plugin_scoreboard_u64_in_struct(data, CPUData, data_t= b); data_mem =3D qemu_plugin_scoreboard_u64_in_struct(data, CPUData, data_= mem); =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 return 0; diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index a303275ea1b..4ab30d6df8c 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -138,7 +138,7 @@ static void vcpu_insn_matched_exec_before(unsigned int = cpu_index, void *udata) } } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; @@ -297,7 +297,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 /* Register init, translation block and exit callbacks */ qemu_plugin_register_vcpu_init_cb(id, vcpu_init, NULL); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index 24a3bce0bfd..e56d10574bd 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -266,7 +266,7 @@ static void print_access(unsigned int cpu_index, qemu_p= lugin_meminfo_t meminfo, qemu_plugin_outs(out->str); } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t n =3D qemu_plugin_tb_n_insns(tb); size_t i; @@ -374,7 +374,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, mem_count =3D qemu_plugin_scoreboard_u64_in_struct( counts, CPUCount, mem_count); io_count =3D qemu_plugin_scoreboard_u64_in_struct(counts, CPUCount, io= _count); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } diff --git a/tests/tcg/plugins/patch.c b/tests/tcg/plugins/patch.c index 8fcf0bd409b..59215f8546e 100644 --- a/tests/tcg/plugins/patch.c +++ b/tests/tcg/plugins/patch.c @@ -130,7 +130,7 @@ static void patch_vaddr(unsigned int vcpu_index, void *= userdata) /* * Callback on translation of a translation block. */ -static void vcpu_tb_trans_cb(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans_cb(struct qemu_plugin_tb *tb, void *userdata) { g_autoptr(GByteArray) insn_data =3D g_byte_array_new(); uintptr_t addr =3D 0; @@ -245,7 +245,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, return -1; } =20 - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans_cb); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans_cb, NULL); =20 return 0; } diff --git a/tests/tcg/plugins/reset.c b/tests/tcg/plugins/reset.c index 1fdf114e5e0..949f2d6160a 100644 --- a/tests/tcg/plugins/reset.c +++ b/tests/tcg/plugins/reset.c @@ -27,7 +27,7 @@ static void tb_exec_after_reset(unsigned int vcpu_index, = void *userdata) qemu_plugin_uninstall(plugin_id, after_uninstall, NULL); } =20 -static void tb_trans_after_reset(struct qemu_plugin_tb *tb) +static void tb_trans_after_reset(struct qemu_plugin_tb *tb, void *userdata) { g_assert(was_reset && !was_uninstalled); qemu_plugin_register_vcpu_tb_exec_cb(tb, tb_exec_after_reset, @@ -40,7 +40,7 @@ static void after_reset(void *userdata) g_assert(!was_reset && !was_uninstalled); qemu_plugin_outs("reset done\n"); was_reset =3D true; - qemu_plugin_register_vcpu_tb_trans_cb(id, tb_trans_after_reset); + qemu_plugin_register_vcpu_tb_trans_cb(id, tb_trans_after_reset, NULL); } =20 static void tb_exec_before_reset(unsigned int vcpu_index, void *userdata) @@ -49,7 +49,7 @@ static void tb_exec_before_reset(unsigned int vcpu_index,= void *userdata) qemu_plugin_reset(plugin_id, after_reset, (void *) plugin_id); } =20 -static void tb_trans_before_reset(struct qemu_plugin_tb *tb) +static void tb_trans_before_reset(struct qemu_plugin_tb *tb, void *userdat= a) { g_assert(!was_reset && !was_uninstalled); qemu_plugin_register_vcpu_tb_exec_cb(tb, tb_exec_before_reset, @@ -61,7 +61,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id= _t id, int argc, char **argv) { plugin_id =3D id; - qemu_plugin_register_vcpu_tb_trans_cb(id, tb_trans_before_reset); + qemu_plugin_register_vcpu_tb_trans_cb(id, tb_trans_before_reset, NULL); return 0; } =20 diff --git a/tests/tcg/plugins/setpc.c b/tests/tcg/plugins/setpc.c index 44cea064783..595571cdfd9 100644 --- a/tests/tcg/plugins/setpc.c +++ b/tests/tcg/plugins/setpc.c @@ -73,7 +73,7 @@ static void vcpu_mem_access(unsigned int vcpu_index, } } =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb) +static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { size_t insns =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < insns; i++) { @@ -100,6 +100,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, { =20 qemu_plugin_register_vcpu_syscall_filter_cb(id, vcpu_syscall_filter); - qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); return 0; } --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552270; cv=none; d=zohomail.com; s=zohoarc; b=U24pbMB+hY9LVASunYEO4oaksWSbLlrUa1LLsTZiVZomJSLE2PowWIR5Za4qF52xkBZaRGLOdmBwj2Js7z2cS6nhOYkNOWokIp6bxiGK2gNoXHOdKEjGNtAMHKV/fx7VtxGFkioGRo32nqC36sfra9vSsn//ZgvD0IE1L2U3xO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552270; 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=8tWIfs0FLwh3dMhzjFESsMzes2YJYF5xtbWGWvC15s0=; b=PUqkkDQcKLfEZDX11yB1Uwl2c3hVffEZqGky23wSvW1TYZQnlNeMwp+jkYDU2k7lneh9dKfSUNA/KjWKjWK7EcMvKmuWMUCSkx0T6a4x73hFZV+B8AsmMSDMig6HQwIQKc9PVSUoovDRhQv9GT4rlei+Oy8sNhyvjXd/RRZpE+c= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552270067965.7373185767104; Mon, 15 Jun 2026 12:37:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6n-0002hp-V9; Mon, 15 Jun 2026 15:36:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6C-0002TZ-QZ for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:59 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6A-0001U4-Sw for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:56 -0400 Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIx0Io881748 for ; Mon, 15 Jun 2026 19:35:53 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etew0jn7s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:53 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-13980b6561dso3843446c88.1 for ; Mon, 15 Jun 2026 12:35:53 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=8tWIfs0FLwh 3dMhzjFESsMzes2YJYF5xtbWGWvC15s0=; b=Kk0215jM6E7VaVB9EHZwe48D8xZ whoqCtJSSakuUvjhPamxKha6LOgrpFAv7+DTEcJGmc6+b4nW4IxIliE1S3YFVWyf hfwM6syl21WaMhkf5YIkXc43P25T3Z910ERf2NboFy6A8dFT8rLbtvcgmBDFsmv7 Rzo3WewLgdOP7qKJIDkEj8PgU0fklwz7J34Y0peFdnL7849l/jjmahAga9RobP/z W7uH4FZiZiJ6iaDCYqZ3zObarXMh7F11yELO/8kWXQHMIQPdR1C7aLDYkG0zccyG fgPjv21l9KuArgX3dgsyVEqUaTawzadi7rmiR57fXjCidofN4+X2AEUYn7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552153; x=1782156953; 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=8tWIfs0FLwh3dMhzjFESsMzes2YJYF5xtbWGWvC15s0=; b=WQquOHUtFhakU+H8tRK4XFOGIQ38jSzUXSOWIa5z6NaRbCF5THsWoiWY+DO3xv84x8 RywtqmdcYaYyww80Hn1OxPLlQ9pDgeYtyV8LXI+VDyJqtT21jjeB4ui7Vy2qRYBzWyX4 sYhWjfUOluPq5UBqZIlQgHTpgEn9AdORgBS9usi/OZER0EGk37pYUfXFbxdtcLjN0kwN 8z3fahktU8mXqa9ydMupMjhyhoX+v2ErPw5Y8BFyNQ/uuXgFtfrIvzTJzT1Y9Oy+1HKK JBs/4E1fTWteaIc32dL3vLw7qDjaU3LhSxGo7KS8k0uNRbz5tsrZ8MmEgFop1U5LVwKo ReOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552153; x=1782156953; 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=8tWIfs0FLwh3dMhzjFESsMzes2YJYF5xtbWGWvC15s0=; b=goqdL01zEo1B5NQdUrj+O3d1TYIdXHj47Jy9F/ZUb7aXJjsQjAi0btDB+7lMMeTPaN Fand/AU6Q5QehPJHZHB/1wvCb4V4qdHeY2y3larDUMmqY9nsdaZ78Jh3OlZWGsC8Bh/i iYoHKBZqD2qiT1ZkJyMoYfTc0AVaeZdGUwlkrn0QkmdMZAkI7/JRoY7s6E+tWoGHugwi 5ECsOlkfCiHpgDoUAJTvIpHX2zVZsWzekfDfowxd9A4YtkkZY5r/h0u4amdHE7Q4UCZn f/syrgVBD4UoK2AYJ+N6gxWGweYQLC2pDQcgC1CnbdpU7nxdX111drv1RBmpzQ+GX8QU iKNg== X-Gm-Message-State: AOJu0Yw/7WV6bT0uwVoCSifLcSZn0bWoonJnf6oTIrHGStN62j2t4SvF ztZxuEqPscnrjHQXCtCz5u1gbREfAL8lwNT2B6NeWkjVLpxT+N6C9HmCAqSm0p3OTNYmM1t90ph cAMSY9dv2k7M8UUdGCmO20lYp0OHZrzKKyq7XpSvD7nMd4KJO2GEVnqh0ivah/+1wlDMQ X-Gm-Gg: Acq92OFQKavHvUZPBhV1lOThHio3ymooGNcK9L4eUL5NfBTN+pR1oYoijHsVBQ7fJ9z GDF2tuz9F0KCZD6DB5puoQj3iNk9aH8i3ulmxL2yAFpFYh1OApW1l236tIdoSvIgA0obqx/7wx/ YBHSEKyn6YgjxvW3ly0WUCkw9MxL72OaBQyGBXFBZb8psAYcqnyMKPWmHGGGT01mNgLHiB5gduz j6DKheNF0GexD6fed2KLw++2rnEwHSLa2STzCKR9w5yz0UqCfhqNzkVGxSQFDWlp1ES0ZjdHjmw 00fH0Jdv715Fpu6FXiD1b6Ywjg5VawzpuuHgcqEK/kIpF7/+bAtZJERNxRPKy7BDtV+xqHhRFQe 12DZ21DkXV0zIOHAYnj9YYhTzH0eV//mFFNkgmlKp5i8T3PP3YgVu8AUMW0ABHYBrP5l02MX1oJ JyEj9GHQ== X-Received: by 2002:a05:7022:6b9c:b0:136:90d9:f1f6 with SMTP id a92af1059eb24-13985f1eb7cmr221099c88.25.1781552152852; Mon, 15 Jun 2026 12:35:52 -0700 (PDT) X-Received: by 2002:a05:7022:6b9c:b0:136:90d9:f1f6 with SMTP id a92af1059eb24-13985f1eb7cmr221076c88.25.1781552152288; Mon, 15 Jun 2026 12:35:52 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 17/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_cb_t Date: Mon, 15 Jun 2026 12:35:16 -0700 Message-ID: <20260615193526.2883349-18-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXwhu/CMXX/yPW yklr+F1irdE7psA0BFWlL3a/DR1SGWr2wMaW2zqXRFjlssLt4+QM3Z4XfCnmKp1WPiPtKz8S3OA YHS9v2YB1JC6/zV4pRmthADoiQP2tpQ= X-Authority-Analysis: v=2.4 cv=QLlYgALL c=1 sm=1 tr=0 ts=6a305419 cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=XHT7D-x7ZMtFmikgfWMA:9 a=vr4QvYf-bLy2KjpDp97w:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0gz1ty28InG2 JMdjwIgZepe0rZfFUoOpdREFOeSU19YbkwCOPi0ygr3bfll/xMN7UUxJaGksxevvcfpKptIeQad iiAWct7WeMUc2CWG5D00mXLpLu7qVo2wZAX2J4294LbvvgCNf01625ijt4iY5OInThDzgS1Fbvs ebmvbsr7l8bH46n5JrHpXVJIdDZFSJXaU/WQxVodKPPVYa4En4WIeWQSVjYFOklAdvqc64Jn9qt sk5+HLJqy+p3ZNlOoGyy1a1LH1BUrJuh3tj2Jkqp0rxO1U7J1nKNxrqDDRRDp6Fuen/MJa3nA0Y Q6AtZZ9I9hd7jb45veCd8SwVOiFJVq/SfFYcewazqY387ol3ShLWRF/VpAn/da3w3Wzv5er8MtA mAonc/dwToqgB4rQhVogoNVjU/Bti0rJpJqwfiE4JrWbdReDsXJvjR/tKGVUzOmSGvegxSIUzm9 Vh+mxwi30KRbZgTO0kg== X-Proofpoint-GUID: 4YHyBa6adTtu3RN77uSWJ_IPOkcxsvC4 X-Proofpoint-ORIG-GUID: 4YHyBa6adTtu3RN77uSWJ_IPOkcxsvC4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 bulkscore=0 suspectscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552271045158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 3 +-- plugins/core.c | 2 +- tests/tcg/plugins/syscall.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 53daa09fc72..d82d996bce6 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -830,7 +830,6 @@ void qemu_plugin_update_ns(const void *handle, int64_t = time); =20 /** * typedef qemu_plugin_vcpu_syscall_cb_t - vCPU syscall callback function = type - * @id: plugin id * @vcpu_index: the executing vCPU * @num: the syscall number * @a1: the 1st syscall argument @@ -843,7 +842,7 @@ void qemu_plugin_update_ns(const void *handle, int64_t = time); * @a8: the 8th syscall argument */ typedef void -(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_in= dex, +(*qemu_plugin_vcpu_syscall_cb_t)(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); diff --git a/plugins/core.c b/plugins/core.c index f30009d50dd..c272f47b642 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -534,7 +534,7 @@ qemu_plugin_vcpu_syscall(CPUState *cpu, int64_t num, ui= nt64_t a1, uint64_t a2, qemu_plugin_vcpu_syscall_cb_t func =3D cb->f.vcpu_syscall; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - func(cb->ctx->id, cpu->cpu_index, num, a1, a2, a3, a4, a5, a6, a7,= a8); + func(cpu->cpu_index, num, a1, a2, a3, a4, a5, a6, a7, a8); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 938646f9359..bfe12ad5558 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -125,7 +125,7 @@ static void hexdump(const GByteArray *data) qemu_plugin_outs(out->str); } =20 -static void vcpu_syscall(qemu_plugin_id_t id, unsigned int vcpu_index, +static void vcpu_syscall(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) --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552367; cv=none; d=zohomail.com; s=zohoarc; b=fo9+MTG30G5ke8EBht6cdI25/TbbU1v+GFP/yQz+vIpRz59BoGKVK865DJZmFMhKhCcUyPuAVdwQuZwH/POOnk7aDcmS/M31EZ5wN3GIEWkqTf0yL+3SABVIraw12G3QFwKd7mqhuB3w8WawIif1XvRW4KzDm2aDN8zXoj9kNNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552367; 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=NkLysV+dJWqXafnbnPgwx8xeH9SklIX3pIVaVwWq0d4=; b=EF1GLIMYnim5oDlev+obX/y2U7787DNHzTRMcYGXitXSQffofSEAlDXFHRl+3w2hCr4EjTQ2KPUiAF18syc5ZJ78ILxWM3QARtMmGetpVH7DvFiDvdeO4zy8dU/Mvm0am2bf8gKcpifoLWnD1lukWgNF7eFmp4lOuIAI3rMy6VQ= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552367068859.0958931446903; Mon, 15 Jun 2026 12:39:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6m-0002hR-Fh; Mon, 15 Jun 2026 15:36:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6Q-0002X4-Ma for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6L-0001UN-RN for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:08 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1Nd41433346 for ; Mon, 15 Jun 2026 19:35:55 GMT Received: from mail-dl1-f71.google.com (mail-dl1-f71.google.com [74.125.82.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etgvhj487-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:54 +0000 (GMT) Received: by mail-dl1-f71.google.com with SMTP id a92af1059eb24-1394c3ee7f2so8344683c88.1 for ; Mon, 15 Jun 2026 12:35:54 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=NkLysV+dJWq XafnbnPgwx8xeH9SklIX3pIVaVwWq0d4=; b=onIAaNJXOkmpZEM1C0PwKcfd/1R l4d6UXv19Z6vS7iBRqPFH/DZRzOV1EQwDRo93TQUabhbw2Qy/137sPC5Mme4V0hg uoDWpIHQngw/f8qFqB8f6ocaSVJGTqbHoua6rwe5luVZIo/G0826dlg7D680IB5L e9yo8aShMYIgu4+/dzS2fau0yy6zDP4fb14olBAMecBayNiNbDZhQkREAYoTR1Cm 7EGh0CFhsjeNjNfVSDsOFnioTuz7N48gMdH+TGTQ1ljeRc4Vm7KBLAe/F9RFa8Rq YLdKZv1HalUbmVPHPsn7jhORz8pwgxqS1igXMZc+jfvRepMQH+uIEiSAJ1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552154; x=1782156954; 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=NkLysV+dJWqXafnbnPgwx8xeH9SklIX3pIVaVwWq0d4=; b=ZbiTVIZlluByWxN/aE/Cbm/qeoWn2ymhYFDo4Cwh6yRaJcmSov9wKwHhOzB+z369fC l/s5HwpvMMUsZGYAArXe2eSYAvpOPp/gRvlR94BWBXPBM/0zEWyI+t0lL9/dXxDFQz1m Ms/ukH1BGihuQ7dIOZj+5dn9jMV5PWVDN/Q9oHph9MtBwhsWMd1uLr005y4tz/J9xsII KlHpaTKTbcrutA39CujG175HBemJwQWRCn/UFyWIf0Z8xR6DlFzw0T2f9R1v4eiJC3ti rd4KCH04lp9aJl1wFw9gHb68ANrKSDeACxa1ukm5zdoQe1NfN8qTUt0C4J+LdNGOZ/jR Bf8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552154; x=1782156954; 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=NkLysV+dJWqXafnbnPgwx8xeH9SklIX3pIVaVwWq0d4=; b=Q/4QOSFuqI01296/aYc5rICOv/gFOrHGxqfrvjbPojQyOuDgZpgUyAdn4TnDtSTWsB VvMtE+hVqbz1ImxZjM+b/iara86JCPOjD3Cq0dfj7rB8hSD/l2ShTbIAduS0U7RKeyNT JFEeoy8XAm2mhwOkHMPYigONcaEDygCRY29DWGlQBXpDiv68V3Ro0fQJYPnUeuKAG/Xn e8KiZBqb5QS0uywGpvq27gKYnuWvPwaxJ29QpSTxvXL2EeaHfllJPzF6OuECdcLnV84Y Zs3TaZE/EdYvCFlMk41a/vmtsW+1fXaWostQbbGmDO2VT3RiNJEkVuQdANIOci2x9dLW rQfw== X-Gm-Message-State: AOJu0YwLnEWUCcslNQZIJ7M7Kw2mjxBQkJcWG4En/mlrHHwLhO/wR4Su UVuUoLcSXvRIpY4QuUhRq0DO6ia93dq1SroM/haPceeFVDbtosOYFik7j8P2sXOvGIWLvbQebtP U2S+eclfy4T7qIMSwNS7ySR3VjmV+549NADtbyZNzHhcxFzN32dOOJBtO4hxJqtqHHLMG X-Gm-Gg: Acq92OFfl573gKg3TSoyVddn7XHK+bMI/Io4OrBeRzrq76nhqTLW8wVCO6rZSNUvAGE eNgTPsdCZO05WZbA2Ja6bNXvZ3uviixPnruvYBIrwMspPMMtQuJ0/S0G5uIDHuxzW1ZX2v/ZEke q/HhPaWkuKlU7NziQcXC3wlnDxm+GZo8VW3ltXUw+NAzoP5s/0ViiYRWk+J89SvDciTXx3xpSUY jWRFh2KEOg5tjiH9qo9rLo+FpFxk8vXl8xjUVV7f5K4qLUB4jK8HIhePk3b1wgz4IT9oBmk/1YT Hh5YbE+2mh3s9illGJ76rhpyP9EDzIn4wWg69RY9u7hAdxTk27mU9r2clUUsWQOqocpQ3JW/pV5 b1VT0lmKxb2fUQ1vkpAIAbtPcYL8O/FYJcwBsKtdLBxN0atozF5RJ34wizPHVyL5tB1AUOMdgfJ 8Un9b8tg== X-Received: by 2002:a05:7022:1284:b0:136:4a60:43ce with SMTP id a92af1059eb24-1386f246125mr5416211c88.11.1781552153895; Mon, 15 Jun 2026 12:35:53 -0700 (PDT) X-Received: by 2002:a05:7022:1284:b0:136:4a60:43ce with SMTP id a92af1059eb24-1386f246125mr5416188c88.11.1781552153326; Mon, 15 Jun 2026 12:35:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 18/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_cb Date: Mon, 15 Jun 2026 12:35:17 -0700 Message-ID: <20260615193526.2883349-19-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX3NtxUK+btWN1 jyq+Ydr717UjMhMZLt1YrqRjHCTsByjKMZr55XcUUGchBjjlvSgSQugvadY80nAx8lfmxJ9ML+Z cBTBZsmtwjyTDaVSJzJWaOWHYHwKgAg= X-Authority-Analysis: v=2.4 cv=Zqnd7d7G c=1 sm=1 tr=0 ts=6a30541a cx=c_pps a=JYo30EpNSr/tUYqK9jHPoA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=HFGiEJlbZgj7dAjcEtYA:9 a=Fk4IpSoW4aLDllm1B1p-:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 2h_XFesJ_ItKxQYiI9octazGzqx11RZB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX9qdMOqzz0ciQ pJFEpA1t+GQuhc+QReMGnZ1sSLSxMAUuwfqVH0eQSiHIMb8r38AeNC4YjuLMC+UInXRUnOv2xCa 4Nm125vGrq/qEvDQjuqFDi4pn9RPPAiQvZx6m4Gi9p7zuMMOX+2Lh3RYFpKq5l7JLPtmb0TMlA0 N4VRy9wZurhlWiTZ9iR2kx1elFuCKGwspnUMHBv4Pyl2p3yz+z2mwJZrsvbn/anxirpU4MsFL02 N93tP70UdliNB/e4RcU+3kyOWmUPpCx7NMMs5sk0xjbsEwOyTXqMiQE5V5WPYe0snO97oFuhiKv NdX8XxvSUovZJnN16RdB/w5dnZae6L0tZZBEdviulcjkMCyyIfsJnfwsWtEuHL3VG1vAUZUmYq1 tTZZonvZl4Zpfzu+jGFKiScUgMee2yYoQaRtF3+4RY9mmm5Onc9An/feAz4DzGA1wXCn8RmKCap ZvJyGUPtQ+IfdcwrgWQ== X-Proofpoint-ORIG-GUID: 2h_XFesJ_ItKxQYiI9octazGzqx11RZB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552368677158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/api.c | 5 +++-- plugins/core.c | 2 +- tests/tcg/plugins/syscall.c | 5 +++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index d82d996bce6..909f19b7128 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -840,12 +840,14 @@ void qemu_plugin_update_ns(const void *handle, int64_= t time); * @a6: the 6th syscall argument * @a7: the 7th syscall argument * @a8: the 8th syscall argument + * @userdata: user data for callback */ typedef void (*qemu_plugin_vcpu_syscall_cb_t)(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 a6, uint64_t a7, uint64_t a8, + void *userdata); =20 /** * typedef qemu_plugin_vcpu_syscall_filter_cb_t - vCPU syscall filter call= back @@ -891,13 +893,15 @@ typedef void * qemu_plugin_register_vcpu_syscall_cb() - register a syscall entry callb= ack * @id: plugin id * @cb: callback of type qemu_plugin_vcpu_syscall_cb_t + * @userdata: user data for callback * * This registers a callback for every syscall executed by the guest. The = @cb * function is executed before a syscall is handled by the host. */ QEMU_PLUGIN_API void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_syscall_cb_t cb= ); + qemu_plugin_vcpu_syscall_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_syscall_filter_cb() - register a syscall filt= er diff --git a/plugins/api.c b/plugins/api.c index 774b1b80214..a72cec541dc 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -202,9 +202,10 @@ void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin= _id_t id, } =20 void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_syscall_cb_t cb) + qemu_plugin_vcpu_syscall_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_SYSCALL, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_SYSCALL, cb, userdata= ); } =20 void diff --git a/plugins/core.c b/plugins/core.c index c272f47b642..7e2f25a9548 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -534,7 +534,7 @@ qemu_plugin_vcpu_syscall(CPUState *cpu, int64_t num, ui= nt64_t a1, uint64_t a2, qemu_plugin_vcpu_syscall_cb_t func =3D cb->f.vcpu_syscall; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - func(cpu->cpu_index, num, a1, a2, a3, a4, a5, a6, a7, a8); + func(cpu->cpu_index, num, a1, a2, a3, a4, a5, a6, a7, a8, cb->udat= a); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index bfe12ad5558..8a823acfca7 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -128,7 +128,8 @@ static void hexdump(const GByteArray *data) static void vcpu_syscall(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 a6, uint64_t a7, uint64_t a8, + void *userdata) { if (statistics) { SyscallStats *entry; @@ -271,7 +272,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, memory_buffer =3D g_byte_array_new(); } =20 - qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall); + qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall, NULL); 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); --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552266; cv=none; d=zohomail.com; s=zohoarc; b=JhGBR9+f1QVwXjs0ZRznbsqVXNuvpG+skYBLWs3qDwQVwsyISOkUmtizpdY1Sbk560epDQ8uvqsKHQISOhT40wCnvhj/Q9xWvF+hJaenZVrCVU039LOHPjc2P4iIZTlUf1R+DvO041V0aDLJBFBmZZK5ytmTySQ0VlgbTq5/iaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552266; 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=Z/Kt10ye7G3phj9K6MQCWY/icu1NbRb4n7brc8HEKAE=; b=alzBADykjfOtS4/zzujEaKFHHYzJRCiMG7Sl7l3a7w/xzsqAHyPBt+cf2T4tO09EfO4xHX/EwJP4w8fshAIOJy1reZCnp2UR7STXR2hWsDkdHuazKzFiipW+stYQ0dsR92HeZcc1aZ2l3OmN0Cv7mR0tBcPzmZazToZrqN8UaqU= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552266510378.1510701312284; Mon, 15 Jun 2026 12:37:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6h-0002el-Jk; Mon, 15 Jun 2026 15:36:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6G-0002Um-EB for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:01 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6D-0001UX-Hu for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:35:59 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxZIU3579093 for ; Mon, 15 Jun 2026 19:35:56 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ete982s7s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:55 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-137e49e896aso3311237c88.0 for ; Mon, 15 Jun 2026 12:35:55 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Z/Kt10ye7G3 phj9K6MQCWY/icu1NbRb4n7brc8HEKAE=; b=GyoSyV00yD7w/5t+rrXs0e71DvF IU4x5KJcugNgvVeELDUpTcScNHGnE3alhERJIBV/2BoqAY2f7wp0yZ99QAdz3g0t x5pSEwkl7gUz8Gz6sq2ceheE+QkA8PqedcBWjeg25bcgTri1EHFsE6j7+N454KY7 hmeNfj76D/tYX8lhvAVzwR6662tHbsojFGRMAqKXLlx06GPG+IlUGvcBlWkBe9RD 1/867xfEnLtcScWZ3lWthjFTAE15cPPQuPGBEAAWmmYeYZ8eIU0+UdOTUkp8Vc2l V4mHJd+L1WASFtI2GAYey9gv9AFqRyKYIo5y6FRnrU96NjkaWe/O8eM1wzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552155; x=1782156955; 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=Z/Kt10ye7G3phj9K6MQCWY/icu1NbRb4n7brc8HEKAE=; b=KS+5p+WSqd1KHX+WZtJ9J/H9B6Srky52nNilMiJ2vOzzb9c55HIDfacDi7uvTt3tyE GIoZIvtRKuNGdpPtib8kTbvJrNdhCbWCi1lwUYO5ytYHAS81fvKFavSLN6KfAEqs/fxl YtkHirPEYW8jof9N0gohmaxMB+b4Box8F+gPzMhilGz4LeyxlLKfTxUZik1TN0zrN1KE PRC/uy0dckxxT+CJD60LudhqM6HXQuaFnmCi9FxHTaGwTvCNDLtuZu5E3msadcc7WvxD 5gXBKxcqLMwL2Tv+QbLZIAai6f6ha/PDetamie1Py+EqAWZ671g/ylF4aGhKOInHtxHf CodA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552155; x=1782156955; 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=Z/Kt10ye7G3phj9K6MQCWY/icu1NbRb4n7brc8HEKAE=; b=tLk5xqfUrx1rzLbXR+y9hFfXOGstVKPWD+0e6b0kSU8EUyWF6LUaiLGd2C1blNhBj5 ytqrmTdbkLC8CTONCUPCNyN4qjWcwtRGccevb19i0LKG6kDpicvGksj6mqs9gBklDjl1 XzKcfv3Jw7uhrKFkC6WTVmp6D36ZoWNjQfWFi3b4k+Px8AMS5cVWZwwF6hQVHny6jrWl F29aYmEnV19RDsnNydoq/xVA3k6GdbsYt3Q8auNwRlifJP3GVSlX8GifRPko/cDUfHFW jbjxn9OIf8kwwqKwcbWFBSicE+gJhlcomAhX24Aa4cI9WB2kx8K0cQVvdAEUlwPLZejC QFKw== X-Gm-Message-State: AOJu0YzgFmXNnD1nPyeqTGpDB6BVC938fd/ikbDL1tUydh1u6rTwf/im 2yUl2PRKujoSjIKoApUg9b14HGErgOeqLRBg+djbzqz/g5qFPzXnSaPSjFT0Vwhtzu9ienRzz7G iG2rfq7uzqPaZQQO7SRLZXQKELZnvN2AIv7rjN8anAVKWoUx4aMGYAMb9oK9PrZIt909L X-Gm-Gg: Acq92OERhlINCwa3+7kGsCMAzHRQ1bytISqMC13wmIGl6yHbmpzBtL9G9kAmDR80B65 E7eMd8EPAz0RvI3jltOR3OsB63Rf35kyMnDoDOQD1sm0US7mNtU0Qy1y5yjD/UYWMh/uEpVDlrI FXchHgecTZfMXTStHO28u1pSqfJIgQcFj7GTydTuNxOo4+LoH6vcWuNtxSQvngQ+4xd/J+a37Rg h1PoIlIdg8jJ0TGTAAbSSA3fXhG+Rb3i+Doa0YRcmcCfW6VrpG9CWqpI7gvmosOzwUsbT5p5s6/ ISv5dRsQfjYBUgkBvnmwuQi3bQhLQqSVf8FeNfzJJxDDXAWBfI7JMmAqxmkWKpMI5BSpFxdA+wD a6Nmy6CJ5QE1ZZRzgK91C3JFAMcRUHdHF8dzip8lIRopElvN5veU6GjRtn0sWQ5nJBsoaIZzU9C gor99wXw== X-Received: by 2002:a05:7022:5f07:b0:136:8b76:14eb with SMTP id a92af1059eb24-139857f5178mr214690c88.14.1781552155240; Mon, 15 Jun 2026 12:35:55 -0700 (PDT) X-Received: by 2002:a05:7022:5f07:b0:136:8b76:14eb with SMTP id a92af1059eb24-139857f5178mr214686c88.14.1781552154697; Mon, 15 Jun 2026 12:35:54 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 19/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_filter_cb_t Date: Mon, 15 Jun 2026 12:35:18 -0700 Message-ID: <20260615193526.2883349-20-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V5tNF+ni c=1 sm=1 tr=0 ts=6a30541b cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=ZpZNCfPiCzbVQKdpNmsA:9 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: gIqNw2VU02Zufn91BAu9YPEMCJqu8rQL X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXxl8PjBUQzIjr cVVfPyB8wR3M/Sha9ByxiE2POxr4+mss4jVyGfcbnhdaz0OLIwTrKQrNmVxv7HztNt08dYvAR/6 em8h99BsOTrnag7zTkGGrwDvx64ajAI= X-Proofpoint-ORIG-GUID: gIqNw2VU02Zufn91BAu9YPEMCJqu8rQL X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXzZQ4XP5vp99f bDOrO/mH+pMpNXMk+8tMxGfWRpwS+c8pMMDC27joCGT9IaVqMrp2CIc1EDLwXFGCvGnydBY2W/A atnzXF+gmtNEfAD2h+R4u+w384j7dKyztaNJwTYqPJXFUVT3zqdWRrXf/BcG7kePe/R05McryQl mIiBh3yZj6pQ0JG0cKga/aL6p8asNPNzZ6kMEmpduvvjqVmb5qT/9Ah4BPwx5cwIE+Q3KUkfZAr QGNloO+ZnJJrZTKnB6qDeOaqnntMfTniQKk/V6JFuz1vxo+efT1BedQFExHA5486JWZvoWmV7O6 +tz9IGfdGwzGtKg+jzPkCutaKJXk0EhPewPtOLoCfgJEEMJAHkKoTbypFY+6Z3uPTqgS09zTZ5e bl266XOMaGMvBQNUC7iUwClKJWjWdkivs/IP6tUKspdKp7ERpL+5WhrSd/Qi68o26aCXImwe319 Ent1jBjFhTIwuVfPw6A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552267068158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +--- plugins/core.c | 2 +- tests/tcg/plugins/setpc.c | 2 +- tests/tcg/plugins/syscall.c | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 909f19b7128..c38ae7db1b3 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -852,7 +852,6 @@ typedef void /** * 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 @@ -869,8 +868,7 @@ typedef void * handled further), otherwise returns false. */ typedef bool -(*qemu_plugin_vcpu_syscall_filter_cb_t)(qemu_plugin_id_t id, - unsigned int vcpu_index, +(*qemu_plugin_vcpu_syscall_filter_cb_t)(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, diff --git a/plugins/core.c b/plugins/core.c index 7e2f25a9548..223a30cb944 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -590,7 +590,7 @@ qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t = num, uint64_t a1, 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; =20 - if (func(cb->ctx->id, cpu->cpu_index, num, a1, a2, a3, a4, + if (func(cpu->cpu_index, num, a1, a2, a3, a4, a5, a6, a7, a8, sysret)) { filtered =3D true; break; diff --git a/tests/tcg/plugins/setpc.c b/tests/tcg/plugins/setpc.c index 595571cdfd9..9bb5bf0f5f7 100644 --- a/tests/tcg/plugins/setpc.c +++ b/tests/tcg/plugins/setpc.c @@ -23,7 +23,7 @@ static uint64_t source_pc; static uint64_t target_pc; static uint64_t target_vaddr; =20 -static bool vcpu_syscall_filter(qemu_plugin_id_t id, unsigned int vcpu_ind= ex, +static bool vcpu_syscall_filter(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, diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 8a823acfca7..2afd71895e3 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -171,7 +171,7 @@ static void vcpu_syscall_ret(qemu_plugin_id_t id, unsig= ned int vcpu_idx, } } =20 -static bool vcpu_syscall_filter(qemu_plugin_id_t id, unsigned int vcpu_ind= ex, +static bool vcpu_syscall_filter(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, --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552364; cv=none; d=zohomail.com; s=zohoarc; b=Jw4RAscTJovRjPHON9aThGqd2uhaEF4+ri8nvboJDOo9ov5wdkA7VRnoizdDsWy3sG1Ho2V5yVLCx8G+VXYW8EoadN5RAIflwQoLgTuJfIdzBU3qcNjJ3ib00egbe1iYleNKdV3S9BEunEjRQduUBmBnPkyeWv2Ls0QGPmLujOM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552364; 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=Q/g0VA/nvopyuhaZO+vKTTK0989+QcrBaXIhhOl+s20=; b=CEugGXFY74VhjWLm+pPbemEeY58e37ZKjWfNDYosd1YwJQ/ni2waoGfWNOdnpBkPLpyv0zZXR3wKhepQfpMGb0zglT1Gc+8Hb42J67Iw3gEUKqa8ZyQYJUO5CQ+dpxjvLfvMbXMkFSTYTdiaDCCPAxchSp48kCR1guNOvtiTJys= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552364456119.65415325877177; Mon, 15 Jun 2026 12:39:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7k-0003vw-Jm; Mon, 15 Jun 2026 15:37:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6S-0002Xa-4f for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6O-0001Uk-JC for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:11 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ1UnJ1367692 for ; Mon, 15 Jun 2026 19:35:57 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etegutnhu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:57 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304e7fc90b1so4233742eec.1 for ; Mon, 15 Jun 2026 12:35:57 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Q/g0VA/nvop yuhaZO+vKTTK0989+QcrBaXIhhOl+s20=; b=lwiwIlfOtkYtj4NLWnBr+nuyAnk xf+SRQlm3kQfpfTgS1uAkxyb+F3T02mbyA5BxZyAsKEQT9InTdIbxR/dBQEYHuZx 0xexy9C4pVsrg75me4b4/xYvVMlz0fylzKzWviStw8D3Rojpue/ye6ui+6+c4ttd eQ7+hqlcyyvUIKFTR2w8LgyfmXgSTfP/RRalhat8Upn/MYR/p4DRRjqursdwU/Ns 2EwxfBPBkdQ5RurjBh01RQ7sBS7OAeJU3iY3J0/ATjVJlBowgVqrI3MRZy+AyAwl UPr3+wiwCghHGFPdw+gIUGgzxpDaZiLZEKfmeBVPDppQgQY0cJfEbiUMouA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552156; x=1782156956; 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=Q/g0VA/nvopyuhaZO+vKTTK0989+QcrBaXIhhOl+s20=; b=UXshrxoF+nSCz31unKzAf9FFpN+9Ok3PCt4/E2a5R8uYfmttCd+5jnWNNVWertnK4o UtUFb+JkmiT8q2zUVviJddewD4QpTJQRtSZD87kb3pLIAWZnSCMCN9eS4LobOjKFAxX9 MSz1LT0kC1mCrDiJJ11FsWeu8/u+mi7ymRh3ok3SKA5CHQ01i+fPv6wmwppOY25ujF6d M1AoHTjWtpx2z59f5hbYtX1tPAUE7G9vHZzjX1U9kmql3IfqMvvP+3TUD5nNIHEn1qK8 Rh1nWeTsf0V7jlzTH9Upv9XyBt3KAK7WCrTCUo+Ue34XaT2U6HETmAVqsQMnLlzKXlbq PUNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552156; x=1782156956; 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=Q/g0VA/nvopyuhaZO+vKTTK0989+QcrBaXIhhOl+s20=; b=dHbvxVHtYykRAW9WD9DuRaShuGb41tfiMVTvFQNmW5mDzv7IAtAWa8+8NHY7uEkp4g 9WRupna1k5oSUvPLMkNh4xQrPon6gpS54hffWw2l2by5bSnhjBRgXQsBQh37acwHDCKR WNlmiC4TIRrofGltG2kQWb7fADc/W/BnMDcymzxBrd29u9UZ5WSYMaGwnFvIQCxS/1B2 tXWYlxtAOcQEp/CBKdGT2H983lC5xB7IOS37mcyh1Z6/NJyTYZ6DyrcqBaXNNerJuQsS hyYm9Z7zGn1BrWcGyM0ZVQ+4HmsmHSOwKIF0MuI3wlL/1w5p3GOf2/yMkr5oUn4Wv7aT A51w== X-Gm-Message-State: AOJu0Ywz9/NmgJYLA8bzZ7M81Lh0cOgmvexx2T9dykY8rYfuTYYQyXHF kxbkdJudlRWq9PnX49m/hOJdNlo/NiAR5rQVfRahWlun/CBs7NqgpewrauTjz5RY6abEP9VDpKO oAEbYoeMDsVhPxM2HACUNoJwhUM487zpZAm3AV2leiYsATyaDfyY5lKl1X4eOQGuFjpPp X-Gm-Gg: Acq92OE3kDWO0s8Jn2iDqVY6+614Sjkvs0GOKgV261ls6nJYpYzP8ak1gC7fp2KNJoH eF4ILgx7kXng/cLdb11M3C9lgwpZ+711lTSPOv5vbio9ROG6bioDDOAwHpUpih9UkvgAsFCpqWN 67H6j3CigtRz7kwL2m9DZ91UIz+f7ACpznXjpcL+rW3+Gi5BbNSuaVPQ34h31WP4JjZhc9LR/3S c6y3uE2gvcY1VFJxtX0Bcde15VjLiYZ1syUS2dKZxBE7InHiXFrdXP36zkApZHQEH4yH599leZE DFK9BT36hNSe/06xSSYvf36adkTGJYY08nWB9E2GgBC/+wjpWm8pwb4mfAovEvMpjCZAAnOcsLG p8a2NNKSEkX5buTq4Q+4rsfcOEP2Ye7Yrfs9EugRrScjaCIbAVTAyQh7cxgxoxGSwTwtDNWqAJJ f3M8MINg== X-Received: by 2002:a05:7022:305:b0:136:b370:64de with SMTP id a92af1059eb24-1387901e454mr4694764c88.32.1781552156351; Mon, 15 Jun 2026 12:35:56 -0700 (PDT) X-Received: by 2002:a05:7022:305:b0:136:b370:64de with SMTP id a92af1059eb24-1387901e454mr4694741c88.32.1781552155736; Mon, 15 Jun 2026 12:35:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 20/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_filter_cb Date: Mon, 15 Jun 2026 12:35:19 -0700 Message-ID: <20260615193526.2883349-21-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX48jyzpONnNgz T5Avjzg7NUhIrkAMUzaVb7umqlsv3jB+DK13epujs+e+7UILQqZGlfCyMXKZo4bDbJN8nfgx8EZ OruuUVKx3WF7tfJ1PBC7R/7thMjzmYYOgzPW5DHA9CdJYcNifOJ4w25Z0USKHbKgx/xeCdEFHU5 aqgRTx6Td0dJnUEBGytm6oSNSTE0lzCMMqsd1NepauYvjF/YvHkRp3unEgiHYR37uN7jzIypwJR SRsancCF67zyywPO1ZrwfXzF0Vlzte/Az7jyiFphiiaHImus00HlV5dS0WGiSOSCAYOV2no0qT8 0wF9l2b38TcEnYupgByDMosg1yoRc7iMdSe9gwBxokD12NWgd7pHMgIhOS7pC44Jnv/Cw9YxoXI dhnr7kQC8ROoafQuxkq/h1P2+hUcGrCd94o3VrDP7QlEUzJJeHWY2dazp+wD5VsY69N58CTFZFi dYeEI/TwZb7ol094Tdg== X-Proofpoint-ORIG-GUID: 24sHYl4nKn-5SP-NQmNuF_6zQR6NoQJv X-Authority-Analysis: v=2.4 cv=HMvz0Itv c=1 sm=1 tr=0 ts=6a30541d cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=Rmn1aRlouh7kj9PRvo8A:9 a=bBxd6f-gb0O0v-kibOvt:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX80w0IThKxSIO ovrmKlR4vh07h6bRvIYo1iEU8bWEtP2agud/v/ZYeTm7vmLbttJJMEo6ohMhk6wAEZ+YmpJltdR C0ZUpGzx7lKKFm/pUyY1mfPYta6dZWQ= X-Proofpoint-GUID: 24sHYl4nKn-5SP-NQmNuF_6zQR6NoQJv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552364676158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/api.c | 5 +++-- plugins/core.c | 2 +- tests/tcg/plugins/setpc.c | 4 ++-- tests/tcg/plugins/syscall.c | 4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index c38ae7db1b3..33d6f8e0b7d 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -863,6 +863,7 @@ typedef void * @a7: the 7th syscall argument * @a8: the 8th syscall argument * @sysret: reference of the syscall return value, must set this if filter= ed + * @userdata: user data for callback * * Returns true if you want to filter this syscall (i.e. stop it being * handled further), otherwise returns false. @@ -872,7 +873,8 @@ typedef bool 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); + uint64_t *sysret, + void *userdata); =20 /** * typedef qemu_plugin_vcpu_syscall_ret_cb_t - vCPU syscall return callback @@ -906,6 +908,7 @@ void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_i= d_t id, * callback * @id: plugin id * @cb: callback of type qemu_plugin_vcpu_syscall_filter_cb_t + * @userdata: user data for callback * * This registers a callback for every syscall executed by the guest. The = @cb * function is executed before a syscall is handled by the host. If the @@ -916,7 +919,8 @@ void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_i= d_t id, 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); + qemu_plugin_vcpu_syscall_filte= r_cb_t cb, + void *userdata); =20 /** * qemu_plugin_register_vcpu_syscall_ret_cb() - register a syscall entry diff --git a/plugins/api.c b/plugins/api.c index a72cec541dc..f2176be5304 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -217,9 +217,10 @@ qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_i= d_t id, =20 void qemu_plugin_register_vcpu_syscall_filter_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_syscall_filte= r_cb_t cb) + qemu_plugin_vcpu_syscall_filte= r_cb_t cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_FILTER, cb, u= serdata); } =20 /* diff --git a/plugins/core.c b/plugins/core.c index 223a30cb944..49fe1b582b5 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -591,7 +591,7 @@ qemu_plugin_vcpu_syscall_filter(CPUState *cpu, int64_t = num, uint64_t a1, qemu_plugin_vcpu_syscall_filter_cb_t func =3D cb->f.vcpu_syscall_f= ilter; =20 if (func(cpu->cpu_index, num, a1, a2, a3, a4, - a5, a6, a7, a8, sysret)) { + a5, a6, a7, a8, sysret, cb->udata)) { filtered =3D true; break; } diff --git a/tests/tcg/plugins/setpc.c b/tests/tcg/plugins/setpc.c index 9bb5bf0f5f7..7c78f182f01 100644 --- a/tests/tcg/plugins/setpc.c +++ b/tests/tcg/plugins/setpc.c @@ -27,7 +27,7 @@ static bool vcpu_syscall_filter(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) + uint64_t *sysret, void *userdata) { if (num =3D=3D MAGIC_SYSCALL) { if (a1 =3D=3D SETPC) { @@ -99,7 +99,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id= _t id, int argc, char **argv) { =20 - qemu_plugin_register_vcpu_syscall_filter_cb(id, vcpu_syscall_filter); + qemu_plugin_register_vcpu_syscall_filter_cb(id, vcpu_syscall_filter, N= ULL); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans, NULL); return 0; } diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 2afd71895e3..410fe617804 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -175,7 +175,7 @@ static bool vcpu_syscall_filter(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) + uint64_t *sysret, void *userdata) { /* Special syscall to test the filter functionality. */ if (num =3D=3D 4096 && a1 =3D=3D 0x66CCFF) { @@ -274,7 +274,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall, NULL); 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_vcpu_syscall_filter_cb(id, vcpu_syscall_filter, N= ULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; } --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552397; cv=none; d=zohomail.com; s=zohoarc; b=nvaH2fBFVkMhOtk9GKMCNZ/kpwd5cwTj6wTOP+5ggxuFe6rhRb5zIJYk07xHmDE4FGc3fvbTlc5q0/cdxucEiyGBsYwez0WdMrAfYEW+UdWNk3VGJpK5QITS1/eG4OuBigm+iTlJMb4gILBye0dIwdYHuN1RpBHUFBBB1OOsGT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552397; 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=zV11NEESNBcY64WP+EP89WXElGJavXvFC1NakUQ955c=; b=Wb3t+Rr1Rt1dZNJ2/xbOkRJTrPLF6mmZ4Lttz5qt1beA5uJwpbpmPr0AjaddcvUcLZjnRbw+/yCehf+CiPwHvoFYiR7ioC6OFaStCabGLTxS8qUztKZZJayymGV2HNoJQOXr9xOf3ZgYcEPQmrbFwio0Q6RXsidYasKKhBmP2F8= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552397096830.9609126299521; Mon, 15 Jun 2026 12:39:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7u-0004tW-RK; Mon, 15 Jun 2026 15:37:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6K-0002Vo-2h for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:11 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6G-0001V4-0M for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:02 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxEW1861120 for ; Mon, 15 Jun 2026 19:35:58 GMT Received: from mail-dl1-f72.google.com (mail-dl1-f72.google.com [74.125.82.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eteydam1h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:35:58 +0000 (GMT) Received: by mail-dl1-f72.google.com with SMTP id a92af1059eb24-1382674ba2eso3369420c88.0 for ; Mon, 15 Jun 2026 12:35:58 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=zV11NEESNBc Y64WP+EP89WXElGJavXvFC1NakUQ955c=; b=FZj33wGslpVyVXqKML7hi6Z1LiC N7Dzoq74fcYYXbA7q+mbCxXBucn4R5tGf0wuuAEg+FCZsR7y18uRoBOX7BVmRpbu bdFZWW2tyVIynF5/mufBpJTDapp8G6PRHe4/NMKmBe/8XTyWusNZrN9JEg7Ejy7f vDsbKEJ3LxixkVewVXIrdKXfG2k7vRIDVR52mM8A3rS19ka9YTTkNs99hUrzwvpg 70wcXOha+lIN+wiCtTAI47IvhWoSYyd7hMBThW7uWLgmXKv142asK4oVIhCgRRUT b1EzzsNeZ3CJTcD5KGUmTKGj/lVhOSgUwTFxUNOmkWSZfBiY8H58YJRzdpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552158; x=1782156958; 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=zV11NEESNBcY64WP+EP89WXElGJavXvFC1NakUQ955c=; b=TJYtRMxzs/LG2e/RQOE9x8qqmPzW1XHlUUwMM5HFsldvgqxp/vaRmomunzjjzlaWpT 8WxOHHxgP0O12p5MSllMJXyMJaEDafX9+Na7PWzNqh0ffCxuKu2nU3y828YnGt4trxH/ qi/8YbSpWVw9RPRo8ARzPhmll7Nl0wfxDLXTDaEev/VBmb/B4V3Vcc3wtoPnDmOvNSS4 K5QOWSSUgeB5ZFycX7jANjcfqpe4rQMua0eBb5oF1R9eVpzQ0uR454TqkogiqIL+Un30 T85OZ7N2bTErnZWoz8ia8mru+SsLFgaehA4++Qd/95Tn2KiGTbVvw+jfK//0BRqVcurR lcGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552158; x=1782156958; 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=zV11NEESNBcY64WP+EP89WXElGJavXvFC1NakUQ955c=; b=mjkWUaUj+NxBhUca2aH4ReBXS4I2I/S41SzFsbWH7OeZpEdNW/ZnmI1FkiLe3obJl+ a3R2tr1xFsrmfoPbEsFb0QLSGs2fwGwYYwmJGlRuC99D7yO6fYrWVgEo9w8LKaIzUKLt BaMH7ItA2/4p58SdUEAQcRo4FqhWG/xlARlFOCawE5t7Gx+sqzYE3HS8Jgc255iwaPLO U2FnVblzkNKubezdrfXJN5uZqHjTiPvhJpGfbfXE33PVu+gqA+yvqR5+8IoZBsi8pVnE f3qXoJZ1P8h0EJiUBsf35hcgwgzclBkBRmsIOa7I1bFceqdxlealenMk11k3J7T4PTay 2vLQ== X-Gm-Message-State: AOJu0YyLI5F5Wzhf6+JkHTJM7p0/WMh8ktjlZfj/Uw7vOKuPNp/hMYtx RIK6iQmx1Cv1lYpjVgfAHSqT0nQu+//JMoYp3FgDTRu3OTydicdI+rqudaikQ9Qpx4HMtLDq6pd 6b3ucew+1eZBRcICFhlc3Dbrf+pMACXnxc+DfFxk8ebmN8VbNZpyy/TpOx11K6HyhEwOu X-Gm-Gg: Acq92OFMocCk6LSiqCFwNfcwSSqE/Hg2/6b1DGd7tY62UxTOj68adCUFdNN+K8X86Nh ql7+cMFWqzFj5QdHVdnnXZUlRIzoUXhaJf+KaL3jG9UEHiTGm86IzsvJPK8OmByskE9EassFToV TFM3vS3yaxXhHGN0PJl59X8cNHtucw/hhAtPicsisfxoKHzkhcTYUye14cVKj+iy9C8B/Nth81F 0hJywNI7mXMmO5JFei0OtuZKfqI8nktblUbD5aNcjDymqdU3zEZEuIP0QXB/ZGsin8b0jzljq2p vE5V16RtPqpx2vAK0HUCxru5G7AnwxvJf4eB9srRXxL8o/Lv9GWaULGfKk+e8WvlJXzUMKtbmxG u/tWHQuWB3Ncj3RZpfm+5KhWEaJQzGg7X6HmIrw3D7xW0my5R8Hxpjz8Bfs0mlsK0tHuLe567uZ QT31FLfA== X-Received: by 2002:a05:7022:6b82:b0:138:49ea:f468 with SMTP id a92af1059eb24-1384baef0eamr7703773c88.2.1781552157545; Mon, 15 Jun 2026 12:35:57 -0700 (PDT) X-Received: by 2002:a05:7022:6b82:b0:138:49ea:f468 with SMTP id a92af1059eb24-1384baef0eamr7703748c88.2.1781552157038; Mon, 15 Jun 2026 12:35:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 21/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_ret_cb_t Date: Mon, 15 Jun 2026 12:35:20 -0700 Message-ID: <20260615193526.2883349-22-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: HsVAvOjuL6Kw-q85gd8EQPYB3xOUSUQ5 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXwUY+10anNSfv nQMDDiSCKE/dRdmzxlEnQ2bqXIkV/2Kv9gu6yo+OK8YrcTTr/wgqFK7yue6D0BWIr8pLF+Arj8C /OKnQkf7VkGZIQG66j/YpVD1wdbvKtM= X-Authority-Analysis: v=2.4 cv=QrJuG1yd c=1 sm=1 tr=0 ts=6a30541e cx=c_pps a=bS7HVuBVfinNPG3f6cIo3Q==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=wqG2-qjEQvTc715uQEMA:9 a=vBUdepa8ALXHeOFLBtFW:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: HsVAvOjuL6Kw-q85gd8EQPYB3xOUSUQ5 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXxg3PEPX3w9C4 3KwZtZHkyr8z1kWRFFQ8zGfje0/l8qRBA28gTjEMjVcXqRHCk1Eu3AGhz+uLa6pxlZrzA8rz8J9 6imkCOlWuGm/EMQHu5EjgLAxJv3sRydZjwr7JKoXZogF1Q38BmXWb5KrDRMhO4tNooJxkpHhDaZ C00NQKoLP8D/CuLM+KtyRPWJ32IZmkEgHAft7sJ16Rmu0+DOTfwil27J82maDxtdyWp7TuLFWO/ kasg6mdLo4d9Vtm/2VeafCuV5yR/51zF9nHNe1S1h0keUZ4Q0YgCzvJI5+hYzfPWovpo2Vw9gqc oD1tFkuWc2XlO0YXET+HWfeLm/DY62SSzyyOMv640fBfBUleK1GG4r/asAWXgG2B1xL4EBSu29f 0CDZ5n29ecUCTVDRn2sjDE2zPy2Vsv4AgSqVr9gCWBa0O1RFUm7bJXPh2VKPQgybfFcxUph4XPr LskfX8We4NRLPVy/yAQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552398862158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 4 +--- plugins/core.c | 2 +- tests/tcg/plugins/syscall.c | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 33d6f8e0b7d..4f0c73c7b33 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -879,14 +879,12 @@ typedef bool /** * typedef qemu_plugin_vcpu_syscall_ret_cb_t - vCPU syscall return callback * function type - * @id: plugin id * @vcpu_index: the executing vCPU * @num: the syscall number * @ret: the syscall return value */ typedef void -(*qemu_plugin_vcpu_syscall_ret_cb_t)(qemu_plugin_id_t id, - unsigned int vcpu_index, +(*qemu_plugin_vcpu_syscall_ret_cb_t)(unsigned int vcpu_index, int64_t num, int64_t ret); =20 /** diff --git a/plugins/core.c b/plugins/core.c index 49fe1b582b5..0a18910f873 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -558,7 +558,7 @@ void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64_= t num, int64_t ret) qemu_plugin_vcpu_syscall_ret_cb_t func =3D cb->f.vcpu_syscall_ret; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - func(cb->ctx->id, cpu->cpu_index, num, ret); + func(cpu->cpu_index, num, ret); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 410fe617804..1bc737824ce 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -151,7 +151,7 @@ static void vcpu_syscall(unsigned int vcpu_index, } } =20 -static void vcpu_syscall_ret(qemu_plugin_id_t id, unsigned int vcpu_idx, +static void vcpu_syscall_ret(unsigned int vcpu_idx, int64_t num, int64_t ret) { if (statistics) { --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552388; cv=none; d=zohomail.com; s=zohoarc; b=BbAYOaI2aCyusVLMGm9aT3Ydj+R/5LJ7Ld/I9ZRVHihRZ6Bm78LrZjByWnNNfApJKR2AnqoxO2J/RiAMOtkK1U3C26dlDh/QcCDPay6l6b1RTr0gnSTLkDG18LkN95wk1iqj9PKBoXzIM9zL03wWBt8jK62v75q9I52AmXj5eZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552388; 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=YUWsPSzIcxwEw+Bgs0V5mR5cOn85MWNM+dpapPEnV6k=; b=cCGZ+X+QXaGhWKVMnI5X8r9yJdBrWv4ju6bQVyxo5Rhx775MS6WlFLEZI2J1bof3amRNTC3efpszEaPx0VSjlCPTyYAoUiVVS5xveAps/PVYLrvrsjf2o0wvunOx5+sLv6E/jcYs4tGSZTJLjym/RqlKxq+DKCOSwFqD8idObhE= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552388467300.77778139944553; Mon, 15 Jun 2026 12:39:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD8C-00066G-6p; Mon, 15 Jun 2026 15:38:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6V-0002bU-I6 for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:15 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6R-0001WF-AW for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:13 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FJ2IQx1245707 for ; Mon, 15 Jun 2026 19:36:00 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetf2jep-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:36:00 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-304dd917645so7795891eec.1 for ; Mon, 15 Jun 2026 12:36:00 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=YUWsPSzIcxw Ew+Bgs0V5mR5cOn85MWNM+dpapPEnV6k=; b=ZZ5Zsb4Vgqx1ub34qlTGBX268ND eqasLstPS6ltK0pE7A85/J7MDl75FCvydqlFzURy+VaklXeZKrdRMdPXI7OS4NDR F1+dY42hgcXxPFTl9jcqZsgjhNeQKj9PFI8MJAbs1UijxVoO16joAjHiJ40Jvgkl 9p47hzI7JJSeTSyWETL0/VkIrGdaelyJJc2Z/NJ6GkUYwODo4kUXIta2mMicuz2Q I+BTtt6ybs53FKBzHALH2o3sRgl7RmRMkPIhEDkKebzIm0SS1LY/3sFYqKLFwdpM KkHF40ngTYfP96tuj6WOQa/M21PnZB1qDW+h8LaabY1msEUTybe8/1Acb1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552159; x=1782156959; 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=YUWsPSzIcxwEw+Bgs0V5mR5cOn85MWNM+dpapPEnV6k=; b=A1cbvw0cHAfVzZ5lmWihRixHBYtJ4LT/Z4Zuu2/r7kR1GkzeBheVISERRWtt7wkmJ/ V5B3PiYN4wF4KiUkYROdHTU9Pfr3RZqGEVZ2DMU20mf1LpORHxiG9XMLygd8pDptSGpH TRD/5WgQRqfZD8iODG7M/V685QW6Qqmk7mX5G5SYE2niC2IYlxbrQZNGqsLA/avIKJJU P2ChLD0cfL8iOJImQROx5FMa9ivueMdMaR7uMgADNuVwiJxHp0TK49A68ubszGLse9I3 HmOUCsG76NLdvhIKNccQX0RXG0gWg4L78w/7U8akzMOG/7QlVp07C92SnzTiSI9vaFeJ uBvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552159; x=1782156959; 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=YUWsPSzIcxwEw+Bgs0V5mR5cOn85MWNM+dpapPEnV6k=; b=SsUfFpG6bvtcLrBen7fmOB9aCJM24hRftKSTfHTnp2cgt1YI0jIMBeLCbK4R2rtny9 yQEbxBJ0ij7CIavyYz7PCYPuaWYrZnq1SqeSF3Lj2HUxJkGddEn2lrK2ysuSYXfG9dQp mxzOLvRs6jN+8k8M4Cd8bNjvMly7AxD9GO21vAPLGR2rCFzsc1FdIXOIRWIU4DAzwa9x 9XxMi4+WwcMp1kbN7uA+G4kqF+agjbj0sfPVwoe0v2x0GPilqXsszuzkRzs0SRjmcBz3 GFXddLRCnfa/ZXp9578BI+IyXanJaw/LXy7pmj3R+kvWtDSOPpWVThJhtE7NKPij8hY2 JVhA== X-Gm-Message-State: AOJu0Yx1NdKmGB+i73yR6soy2hyFgZ0ahKmuCmJpAKGNnAPc2/usmlnk WCbwqQL5mKiutFLaCse/TuLGGqYlJg9dTagttgqb1gfPLqqHXGNVmnpd2/MfjNJBLCtUx+yQ1O/ pQ9pZ5CZ4MvBvjrTdElY+H1qhlcuiZRl+wCB2BykzFnrNZCzXPwLWkEmI7u5hFGPzsMx8 X-Gm-Gg: Acq92OENOqDvEg2k1MhrjXu3XLD5K/SMsJjzkKy+AomD7ONIS6BF5gXFE1Npq8GkCCG o2az/qdkEflW7PIWjRd7EmGFPrqfrinq3ACPecyFMCa+Q9aHb9CgtvJw/+jUJehBr4bAbBxnq/A Bp7uMYvvKiwBGqyMib/XnkisNE9khMrxnNHAAuryk/moX5tpwc0Gqv2L1fwuLov0VaHfIdGIeMw a961I3PXZivE/ys0KcB4KMi83S3HCNueDyxAj8KG8bgeEJsfoGN1I+c8MZGzpUbh109Ot+bb13O C4gF81q8lnA9hJQc6rINHpDMGJXjitaFAYGiNvMK8QXWLSh3/pHNdB8LUcEpQOyuqXXyh7lSgqC 1A9yAT4zH76xJdXr5HwRImtWS1AEUqtAHBw0kWOLSMZyQnYg7Dsoh8qgdrLsUb+rFsBWx6uyA94 AIxFQOAQ== X-Received: by 2002:a05:7022:310:b0:137:ea00:3f49 with SMTP id a92af1059eb24-1384bb966aemr5905731c88.35.1781552159224; Mon, 15 Jun 2026 12:35:59 -0700 (PDT) X-Received: by 2002:a05:7022:310:b0:137:ea00:3f49 with SMTP id a92af1059eb24-1384bb966aemr5905715c88.35.1781552158745; Mon, 15 Jun 2026 12:35:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis Subject: [PATCH v2 22/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_ret_cb Date: Mon, 15 Jun 2026 12:35:21 -0700 Message-ID: <20260615193526.2883349-23-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=adxRWxot c=1 sm=1 tr=0 ts=6a305420 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=HFGiEJlbZgj7dAjcEtYA:9 a=bBxd6f-gb0O0v-kibOvt:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: UMa8mtiCf8rT1FmzyqPFSO-rUg7LiJsX X-Proofpoint-ORIG-GUID: UMa8mtiCf8rT1FmzyqPFSO-rUg7LiJsX X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX7EKaDb2KZU4P yrNZysakACPoTCm/rrdPVk94wgf4hAtMd+xQtwotcWsmaUj8D4vFJ6zJ6Mp8HCqSIqw4kZeGM9C 8JGiV1yAaMlHf12k7DzP7MByF83By+Q= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXzeIRnvqmzZ2h 1QhvtNMs7aEhj2qKmE2wEp55An/SOvUk1Ocu0QX/OTHjtALCXzG51ZR4rP/Hg9jtrx10q1n/0mh xdNfih4LshrASXdvJP9zr6Q5hhUO+Xmtq01PUqxVNBaIx2sOyG3O8r13nQD9oLEOrbbHNAEsjnc tN9vVTQLY8Pp9RwhTqXvSSvWnbD+22FFxxQk1Ipr8FGq23Wj/yiQWXxRzjYUAhhVXOvUKTIVPLS ZsATZw9xrf09pE1Qpk/bF6xLF7kFJtBa9/OBW9K3/BrMuadAVl5AMiv236pFz5kSgPcmb2Wi42C FCt93BZTUK9FjA6Nf5GxUEvepwY2Lg2JK2tujZVjqARXTyH+dTPozs7WKhyIssyGWm/AFsrS93U 1Nrl6Ne1LTNPdqDnHt+ay7SmL4uXclVWnXsUYNWHal2qQhro9M0w6cRrrPHg+lpAIaJ5PL4UT0g 4l4gAcFSb+VYBxyC7tQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 impostorscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552388785158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Signed-off-by: Pierrick Bouvier --- include/plugins/qemu-plugin.h | 8 ++++++-- plugins/api.c | 5 +++-- plugins/core.c | 2 +- tests/tcg/plugins/syscall.c | 5 +++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 4f0c73c7b33..50a39e51d46 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -882,10 +882,12 @@ typedef bool * @vcpu_index: the executing vCPU * @num: the syscall number * @ret: the syscall return value + * @userdata: user data for callback */ typedef void (*qemu_plugin_vcpu_syscall_ret_cb_t)(unsigned int vcpu_index, - int64_t num, int64_t ret); + int64_t num, int64_t ret, + void *userdata); =20 /** * qemu_plugin_register_vcpu_syscall_cb() - register a syscall entry callb= ack @@ -925,6 +927,7 @@ qemu_plugin_register_vcpu_syscall_filter_cb(qemu_plugin= _id_t id, * callback * @id: plugin id * @cb: callback of type qemu_plugin_vcpu_syscall_ret_cb_t + * @userdata: user data for callback * * This registers a callback for every syscall executed by the guest. The = @cb * function is executed upon return from the host syscall before execution= is @@ -933,7 +936,8 @@ qemu_plugin_register_vcpu_syscall_filter_cb(qemu_plugin= _id_t id, QEMU_PLUGIN_API void qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_syscall_ret_cb_t= cb); + qemu_plugin_vcpu_syscall_ret_cb_t= cb, + void *userdata); =20 /** * qemu_plugin_insn_disas() - return disassembly string for instruction diff --git a/plugins/api.c b/plugins/api.c index f2176be5304..0038da6d706 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -210,9 +210,10 @@ void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_= id_t id, =20 void qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, - qemu_plugin_vcpu_syscall_ret_cb_t= cb) + qemu_plugin_vcpu_syscall_ret_cb_t= cb, + void *userdata) { - plugin_register_cb(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, cb); + plugin_register_cb_udata(id, QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, cb, user= data); } =20 void diff --git a/plugins/core.c b/plugins/core.c index 0a18910f873..4b55aacd2d7 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -558,7 +558,7 @@ void qemu_plugin_vcpu_syscall_ret(CPUState *cpu, int64_= t num, int64_t ret) qemu_plugin_vcpu_syscall_ret_cb_t func =3D cb->f.vcpu_syscall_ret; =20 qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_RW_REGS_PC); - func(cpu->cpu_index, num, ret); + func(cpu->cpu_index, num, ret, cb->udata); qemu_plugin_set_cb_flags(cpu, QEMU_PLUGIN_CB_NO_REGS); } } diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index 1bc737824ce..a28d1087840 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -152,7 +152,8 @@ static void vcpu_syscall(unsigned int vcpu_index, } =20 static void vcpu_syscall_ret(unsigned int vcpu_idx, - int64_t num, int64_t ret) + int64_t num, int64_t ret, + void *userdata) { if (statistics) { SyscallStats *entry; @@ -273,7 +274,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, } =20 qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall, NULL); - qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret); + qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret, NULL); qemu_plugin_register_vcpu_syscall_filter_cb(id, vcpu_syscall_filter, N= ULL); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0; --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552251; cv=none; d=zohomail.com; s=zohoarc; b=ivWfYl3/xQCIfiv2s2scMZCqsLyLSL5eDSpDgo962LhJHF0DxN4T0ByRHw75pev9WXUhtd7f+F6dPWvyBeV+JF/Mkw7y5UbXAO5/h3nORYpQFWK/IkwNovGi4wYWJEnsmraaLqEuzRf8x0QQr6Maoe9kA9sTDvv6TYaXkqW7L5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552251; 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=YdjsSgcz8u6/17LgYDQLIzSOZFP9QSSqnKDDH4KO6TI=; b=DygNyBehdlmPkJp+CtpSgyrMC0VAVovWlOZs5chooVJshA71D5fr8tepm9hcRQFaYHhRiMzUWB8FPN/cxc6VCBUX1M6eefR22DOeVsMTpQsWqXbryw674Dk7S3lmqEtuWJFZYqzcY4eyDZCyFfOFosocB4hqWWv0eJTiM0zOIuQ= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552251413878.7859614739413; Mon, 15 Jun 2026 12:37:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD6x-0002xh-Iw; Mon, 15 Jun 2026 15:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6M-0002Vt-AU for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6J-0001Wo-PV for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:05 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxJ2h781727 for ; Mon, 15 Jun 2026 19:36:02 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetjtnt8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:36:01 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-3080bb0267dso351492eec.1 for ; Mon, 15 Jun 2026 12:36:01 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=YdjsSgcz8u6 /17LgYDQLIzSOZFP9QSSqnKDDH4KO6TI=; b=noEVO42u1nyqnv27KHC3a+R+4j2 e9VW4MNC0hnqvphM40YT1VhfKf9QWvh8MmE0PiuHyaCldJvDr7JH3rJ4sDhRBS7K s9MbqBjNcA0VGtnm+xTY/dHhgTd1HclqNV6WENfj7JYyNT3xraDpvgbmHQwI5ix9 6UewJ285PS8fKN7Rv5fBwDqTId3AZ0XXSVLEowD5hUTRY1QwQoNDlVDl58Dml/yq 3NCkrLjEAfUzRHJDGMM+XSfhA45nfx076KrJx1Ah2RhjROv1l9wye94YXXieUENU 7Ar111EdOCbcTNfoWn/QwM8CFHjZ6kRW44BC1sraLXmyH3yATTpQrCGU58A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552161; x=1782156961; 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=YdjsSgcz8u6/17LgYDQLIzSOZFP9QSSqnKDDH4KO6TI=; b=bQ+wSi3Auh45+LvaXw83VNw3NhGcYGjSBp/zUcJGvKbHq376T/zDgFK7CaZQQcpOWw 5s5HC5WXoZ7T8zvYNifJSILtj/cg8G2aWlHW4cfGQpHzixrKy0fEB6+tvE+qlYj6W47Y OdkxruQ6onMRe0Ai5hOeD7Rs4EaGmnO7Sm08nvH4MvQSvBHUl5V4dn3HtGYBaJ2W4H1N LXlXWdMjo9uxDGShF5YhUb80wKWCWJ4KsQQBCStcsqS2jYJLB5RyrskxcarRrmny8o/Y X+DPXbbhv5UDd/JAKbmOqEiGQPgUz+giI2Lbs54Zmapo98JKzvluwwUUwdDbkuLir4x3 RckQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552161; x=1782156961; 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=YdjsSgcz8u6/17LgYDQLIzSOZFP9QSSqnKDDH4KO6TI=; b=d0HpZfNkgnZlxb0HfqWG9IFV4med6qVx0puoq+BUg3FPvIwc6rkS5kGELOuXuZx/GJ xOCjJ2Ny/QXZ6Zctj8n9tD8lOglfBapK8dBqtU91U7KEwk6Cng0yK175bbzf8l+9WYs7 UxyxKm8EmBYjkRlaHojrsexcsOR/ykhUdLfeiQwxCi7CrtF1QWFE33rU9lMUiOI7BXuQ K2FWjDf5asjT3aTSX3m7eaBKpv9andwpzzAii8L0+RzS2RgSHlyfJtlX2AafLcbB2dAq jW19zwBjz0gVsix0yz02x+Cib74mOMcsnrCFSRz7pdwgO69n0iHxjAEhmEjZuWYk4Es9 pmWg== X-Gm-Message-State: AOJu0Yy2PUUpP6DQlVQQwoauqltQV4AuQhbATA746HHOaZp9o3kVXV+P X8mCptxNwDZc9vNXhzqV2LRsBVpAfB/ysQQ72/R0T5Acl+eF4Zf9Cezdnv6YBMWqiwk5FDNmtWu nkC8veMo0TOLX7BkdRDYRQRtr5XgX+zmY02nxL1YkrLMYMQGSggh4s0D6jC9VKG8n4Xy0 X-Gm-Gg: Acq92OEHmyDY+BjRXxm5vbwE3NsgWIyfS8sTYgls8i2+bLAC4Qffk6tuaHyk4EpnZU1 yUaUG3IldB4lXqpwMl071LqT09S2NAdxiVdRq+a+gP08Mil+oYan1KoVwehRDKEHpkli6SAKgi8 zgUrMUMs+A6JwUrCyOT5Umk8Zm7tj3lNUoT/+8HIhRoM4ZJHu9vn09lkQ/xtli2RVijsNLZJXcs YCH1YWHjngJHiEQYje/UDPAPESuaWkIFo1DXicBAB6GR0y3C04ws1jpr+0kzGd/h+CALaRXf2te njEZawGaWnuPrmL8UvIA7xd8CbAFCq2ApSi/Yo5d1ErYnTpQZUz+NJHfo832yPQAEQU643czIIM VNxc0CPpgnws5e/XDmUmMoL9uun0TUqSi1iVz2Sak5zbCtDBlUiqy4zsznw8ZbBFLtOdSjKMhZw /pF7BzDw== X-Received: by 2002:a05:7022:689a:b0:137:fac1:c062 with SMTP id a92af1059eb24-1386f2403fdmr5743152c88.7.1781552160909; Mon, 15 Jun 2026 12:36:00 -0700 (PDT) X-Received: by 2002:a05:7022:689a:b0:137:fac1:c062 with SMTP id a92af1059eb24-1386f2403fdmr5743122c88.7.1781552160029; Mon, 15 Jun 2026 12:36:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 23/26] plugins: use consistent parameter documentation for userdata Date: Mon, 15 Jun 2026 12:35:22 -0700 Message-ID: <20260615193526.2883349-24-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX5p+d48WtgjEw aoNCzDkOSoddVwWwov1j/mni9nTJcIwRVIjwjKhk5rSl9EmPuVnfTmNkGh94xpvnc93cKrtuQVR IG2ymOroksv3f0Qr021m08+FEz/4glGCe1B/dhYG2omsK8Wzc30edA2m/DGXHrylaIejpj2au46 m3Zvwiws0QMIVSjHCCJAocasSAd+shzRu4ag8iE1jhR7gW0O8gBYzqTNeDeMvFeeYUwuSkeNuWm VnegBWM5vnxVromdauJP4YkB/DANHgT7JaDDyyPk1jE1a7FQx3oi1jJDO+wOszdR1BA5qKEhci6 uJE1coF+We6DTeR1j5ISWiyAqbZXIwLb8waya/5Sw3mmazmuMEu2pqBHp5VHzjlVnbCBMsD2wqB TjZoPl9mszgiSzGeblZYeiapYWV+Gmfru0VdlbNp9o4DZcdmexrHjQYlCdQhiepYZpdpVrMXXQd SHEfNV1tod1kx6qYMYw== X-Proofpoint-ORIG-GUID: 3F3e1QLaRJrzRO7SKVIneUh2UDqlT9Lz X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXwr6IqJYmxRn8 W+Y/oHC6jkpi7d3IREEu6AXiBOpu81I4YJW28r7UZ8mjoO0M774dhbgrSz9h2Y5U5tTdPU0kR3/ wE3ZgcsGoEzYpJHiE11rTHDnpdVpiso= X-Authority-Analysis: v=2.4 cv=HttG3UTS c=1 sm=1 tr=0 ts=6a305421 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=n1GYMWs_v2V8MhWbidwA:9 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: 3F3e1QLaRJrzRO7SKVIneUh2UDqlT9Lz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552253030158501 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/plugins/qemu-plugin.h | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/include/plugins/qemu-plugin.h b/include/plugins/qemu-plugin.h index 50a39e51d46..d8d4b373842 100644 --- a/include/plugins/qemu-plugin.h +++ b/include/plugins/qemu-plugin.h @@ -142,16 +142,14 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, =20 /** * typedef qemu_plugin_udata_cb_t - callback with user data - * @userdata: a pointer to some user data supplied when the callback - * was registered. + * @userdata: user data for callback */ typedef void (*qemu_plugin_udata_cb_t)(void *userdata); =20 /** * typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback * @vcpu_index: the current vcpu context - * @userdata: a pointer to some user data supplied when the callback - * was registered. + * @userdata: user data for callback */ typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index, void *userdata); @@ -185,7 +183,7 @@ enum qemu_plugin_discon_type { * @from_pc: the source of the discontinuity, e.g. the PC before the * transition * @to_pc: the PC pointing to the next instruction to be executed - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The exact semantics of @from_pc depends on the @type of discontinuity. = For * interrupts, @from_pc will point to the next instruction which would have @@ -204,7 +202,7 @@ typedef void (*qemu_plugin_vcpu_discon_cb_t)(unsigned i= nt vcpu_index, * qemu_plugin_uninstall() - Uninstall a plugin * @id: this plugin's opaque ID * @cb: callback to be called once the plugin has been removed - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * Do NOT assume that the plugin has been uninstalled once this function * returns. Plugins are uninstalled asynchronously, and therefore the given @@ -220,7 +218,7 @@ void qemu_plugin_uninstall(qemu_plugin_id_t id, qemu_pl= ugin_udata_cb_t cb, * qemu_plugin_reset() - Reset a plugin * @id: this plugin's opaque ID * @cb: callback to be called once the plugin has been reset - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * Unregisters all callbacks for the plugin given by @id. * @@ -236,7 +234,7 @@ void qemu_plugin_reset(qemu_plugin_id_t id, qemu_plugin= _udata_cb_t cb, * qemu_plugin_register_vcpu_init_cb() - register a vCPU initialization ca= llback * @id: plugin ID * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a vCPU is initialized. * @@ -251,7 +249,7 @@ void qemu_plugin_register_vcpu_init_cb(qemu_plugin_id_t= id, * qemu_plugin_register_vcpu_exit_cb() - register a vCPU exit callback * @id: plugin ID * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a vCPU exits. * @@ -266,7 +264,7 @@ void qemu_plugin_register_vcpu_exit_cb(qemu_plugin_id_t= id, * qemu_plugin_register_vcpu_idle_cb() - register a vCPU idle callback * @id: plugin ID * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a vCPU idles. */ @@ -279,7 +277,7 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_t= id, * qemu_plugin_register_vcpu_resume_cb() - register a vCPU resume callback * @id: plugin ID * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a vCPU resumes execution. */ @@ -293,7 +291,7 @@ void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id= _t id, * @id: plugin ID * @type: types of discontinuities for which to call the callback * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a vCPU receives a discontinuity e= vent * of the specified type(s), after the vCPU was prepared to handle the eve= nt. @@ -427,7 +425,7 @@ typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(struct q= emu_plugin_tb *tb, * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb * @id: plugin ID * @cb: callback function - * @userdata: any plugin data to pass to the @cb + * @userdata: user data for callback * * The @cb function is called every time a translation occurs. The @cb * function is passed an opaque qemu_plugin_type which it can query @@ -446,7 +444,7 @@ void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_= id_t id, * @tb: the opaque qemu_plugin_tb handle for the translation * @cb: callback function * @flags: does the plugin read or write the CPU's registers? - * @userdata: any plugin data to pass to the @cb? + * @userdata: user data for callback * * The @cb function is called every time a translated unit executes. */ @@ -464,7 +462,7 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_p= lugin_tb *tb, * @entry: first operand for condition * @imm: second operand for condition * @flags: does the plugin read or write the CPU's registers? - * @userdata: any plugin data to pass to the @cb? + * @userdata: user data for callback * * The @cb function is called when a translated unit executes if * entry @cond imm is true. @@ -514,7 +512,7 @@ void qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( * @insn: the opaque qemu_plugin_insn handle for an instruction * @cb: callback function * @flags: does the plugin read or write the CPU's registers? - * @userdata: any plugin data to pass to the @cb? + * @userdata: user data for callback * * The @cb function is called every time an instruction is executed */ @@ -532,7 +530,7 @@ void qemu_plugin_register_vcpu_insn_exec_cb(struct qemu= _plugin_insn *insn, * @cond: condition to enable callback * @entry: first operand for condition * @imm: second operand for condition - * @userdata: any plugin data to pass to the @cb? + * @userdata: user data for callback * * The @cb function is called when an instruction executes if * entry @cond imm is true. @@ -748,7 +746,7 @@ const char *qemu_plugin_hwaddr_device_name(const struct= qemu_plugin_hwaddr *h); * @vcpu_index: the executing vCPU * @info: an opaque handle for further queries about the memory * @vaddr: the virtual address of the transaction - * @userdata: any user data attached to the callback + * @userdata: user data for callback */ typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int vcpu_index, qemu_plugin_meminfo_t info, @@ -761,7 +759,7 @@ typedef void (*qemu_plugin_vcpu_mem_cb_t) (unsigned int= vcpu_index, * @cb: callback of type qemu_plugin_vcpu_mem_cb_t * @flags: (currently unused) callback flags * @rw: monitor reads, writes or both - * @userdata: opaque pointer for userdata + * @userdata: user data for callback * * This registers a full callback for every memory access generated by * an instruction. If the instruction doesn't access memory no --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552384; cv=none; d=zohomail.com; s=zohoarc; b=FLhHL1lAipOnWG9esYsiwFQ1imsxaqRP04BcZZ8Bf/gGr4PHe78BTrrFcdzrtsLPvhL+sSIM1vNlSVgkfs01PCYjC5Kjs+J1fngyoFR6E7sdsU/4pT1jXheofu9PNZ0kH39GZkTrnA+N2v9VjHpow86swzFQ4H5Do9rrvRKAVPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552384; 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=r75MAyRnptzwlKMRhw+iLcm+hN2cLebwsJwt/8PzSTU=; b=cy783eNT6GdCrL5nhCEXOOgzVhwSBwT25pyiTA47XS/REsEm0jr2l3t2A1FnDbIHLpjHDfyigj1fDcpGaQwN3n2fUO0qrctRY/MDSIjt5IKunYlp9VnQDaPKFmy+hmXq5X1rgyGxmMEPWhfEqTEuUjFt2JkTSqt0En9sgrksScU= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552384454857.2262390283723; Mon, 15 Jun 2026 12:39:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7t-0004cU-6a; Mon, 15 Jun 2026 15:37:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6O-0002W1-7J for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6L-0001Wu-2o for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:06 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxEKU861125 for ; Mon, 15 Jun 2026 19:36:03 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eteydam1y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:36:03 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-1370417c0bfso2581816c88.0 for ; Mon, 15 Jun 2026 12:36:03 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=r75MAyRnptz wlKMRhw+iLcm+hN2cLebwsJwt/8PzSTU=; b=AQj4lrw85CBX/iKfprtOOjuPEFM KGvfoZuz93RC4U3WMf6Err1a17SQ8TcJlyWV30Ae4mNszklbpJ/kke6em0qB9n2v oUIRj4RcWFxkM7q4jktZf46yWSLxpAzUIFNu6H+pVG+grqHcTCVb+9spE5I9e84J WiYlX13uaSI4BYqpMRM8FETeE2sHIOWE0jwDCsxrCyOdtzSmxkQ8ock9+OhflsWE OG9Qr3LxWPvQLP7IdBu0mA2a+DS3O6V++9GZ0T8b9MF5nnjpTBhbxZK95skFBVUD mF6b5U1nLQLTG/MHoUvv5HIZUgz6KzMmNq1BRBWrmsWbb6kq7mdModNvO8w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552162; x=1782156962; 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=r75MAyRnptzwlKMRhw+iLcm+hN2cLebwsJwt/8PzSTU=; b=Dm2fdGLYMfXJegMFJHrJTl+V2XAMfcwy+47Duc+3DqKOSxRiU1tjHymVnGyATTg7jf q52y5R0vodjrQwlOY+D9OEATTUZB7CnuiPdKRAvoH4FEqeVb+gd11GP0N+BmlA3qMeYh m5YftZE9e8YcDx69ZfDA0NRiu9HtYuTWSmG0qk7CJnbfiEveDR4a0GBq66kbq9ysao3V /qtCze9slJPHadapDVJmUuVUPwZFaLjzPwE3c5UhenM5H9efFlIj8LDXNM7HvUDsIUiY 0JNitB/v2O6wV9fElbnjml+hAVu0DhKY+hHaySlaZSb2RTLF63xZAUGsZheOr0oGrKnw pFag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552162; x=1782156962; 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=r75MAyRnptzwlKMRhw+iLcm+hN2cLebwsJwt/8PzSTU=; b=Co+hmknXjeVTSTL3VEJAZs3AhBd3CXxFck/8el7ypJb36Z3ib+XTI1rG+CLpbJTRsb ESFqNuEjdG3GziuSoyaEoIMm48M5birmSj4Zj0ixeNH7VDHamO4BNuK06di5V3NnZ9ak mP7TvWe7k3wl9dw9qaCOFIk/miAxlkps8S4A9R4b+wElUI1hxuf3my1LqgQmGZPD3QHa lI67fueIiT7nMpQ8vXT6XoeRuUBLo1iQ6qh8eegB6I8OcYVt9YoXTm+RFfl1vBP1TMbg LILxq3KtE/p55n0+loEz/jb06hwDfR2EYZYN2BANYghdzPRi4P6zFWhpD6yhhTFnqUox Jm9g== X-Gm-Message-State: AOJu0YzL+tV/L276Tc8aB0kDrTSrUpn2DpVCvzZlgzJ5Y0FGo2XSfje+ x/1Yr1j89Le4sUgWWm4sswNBh1oEaNs//eswkI89W5fAbNTaKnmwrHE7mccrinzx4Cupz5OkjqR KGkJx279H+MoEqv2x2KueQRr3oAYZPU7t2PMxPwJkLccUXZDXLdj3S39HJgoJn0xabE50 X-Gm-Gg: Acq92OEMDdmKhbeyjUpv7TVWbDYd2mkY6Xzau1NPjyvh4GAJsOCife4nnhBt/vQ017r vEyslObvs5NEXHalUvB0TC2C+r7hYUS/yPEr1R2lEvzuPxaUgxO3bKNe5tJ2atiZrEA4yx5DcX6 05PqhPTfAcJys0uFWiiNDEwBH65cQf1rSbB+spny7pRBabIHjkKysWkWZg65gjy70yCFGlHVDUj kgQhIHPxXis7yoYGTRNEfstu3mqIBmUUXh06Ar8wA3CmIfpnCC7EI6cZd8a/LttPl39wPEcSjwU e9JDxKpjVWO7M+RXcBS20NlOsLT7ZWn5u1+ieXMXeeR1EcRN4b3tI08cXcu1L5xIMYaia0bejf3 9sESiWV0MO0lTkkWnOiRfC6rbAawPTwwJmi15AJXacj8Es4KUfCaRwjOBsggjZHOBK25qo7lHGi DCe0bYwQ== X-Received: by 2002:a05:7022:48f:b0:128:d396:f2ea with SMTP id a92af1059eb24-139857bc219mr440107c88.11.1781552162033; Mon, 15 Jun 2026 12:36:02 -0700 (PDT) X-Received: by 2002:a05:7022:48f:b0:128:d396:f2ea with SMTP id a92af1059eb24-139857bc219mr440090c88.11.1781552161515; Mon, 15 Jun 2026 12:36:01 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 24/26] scripts/checkpatch: ignore spaces required around some operators in C++ Date: Mon, 15 Jun 2026 12:35:23 -0700 Message-ID: <20260615193526.2883349-25-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: LDhEAjtQn2gNczyy-mqNfMump9IJ8ZC2 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0wMv02cfz6+k Lr0Q6+/XXer5ILldgjGWkJ9VO6pMEW6avrLwB5bu1Q7RGImfL9KDox4lXnGWKrCXkVstU5Lst/y sp4z9ij+5bYB3iukn4wUC+Nyb7mudsk= X-Authority-Analysis: v=2.4 cv=QrJuG1yd c=1 sm=1 tr=0 ts=6a305423 cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=nUVG7euvARLiU1CHTZIA:9 a=vr4QvYf-bLy2KjpDp97w:22 X-Proofpoint-ORIG-GUID: LDhEAjtQn2gNczyy-mqNfMump9IJ8ZC2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfXwuFDesLfPby7 6NPRw92O4xrirtPTguyGfoTHHnfSxoBuMYCGQAXsRGU++dNhJKQG31T8+z+O/ufL4pgHiwWlCtV 38+4PVsZdK2e0111qshYhs0GcEH6laifms5OitnY8qjwQMOEzr5QEm5GjsSA5BUE3nXWWZRlNzK EnY4PsEjnLwH+VrI72Cn4tnEPQrYNFQjTkfIFmi+dB+hVMKWCUqAGLKGZkeyNlv/1Goj3cchhS1 W2Ymqt0PSNgKHELEeidQBS1vBQVhWJHCZ38zvE+PNL+RvJYO4rRu+gVm3zl0iKNIZlhT9fF/u8K vV9DMq7NjBTTgbIqLiS1KezIE9PZRiUdux7+LAqn74yKW9MAVdP8pP/8yaqmxcUL+hi38xSE5mw 4g/BvhgDbrg/WYhfJrbidvqqJTN7E+49yzOm4MlxnNIy8y9gZ3wWc5hXBUBa4HDJCC5Vxs+SOfg WNjyjQVM34ybw/1v1VA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552384795158500 Content-Type: text/plain; charset="utf-8" C++ has a different style when it comes to space around references, dereferences, so don't report it. Also, closing templates with >> gets wrongly confused with >> operator, so just relax this check. Some examples: ERROR: spaces required around that '&' (ctx:WxV) + auto &[counter, p] =3D *static_cast(udata); ^ ERROR: spaces required around that '*' (ctx:VxO) + auto &[counter, p] =3D *static_cast(udata); ^ ERROR: spaces required around that '>>' (ctx:VxW) + std::vector> v; = ^ Signed-off-by: Pierrick Bouvier Reviewed-by: Manos Pitsidianakis Reviewed-by: Peter Maydell --- scripts/checkpatch.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2189db19f54..538e059e265 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2621,6 +2621,31 @@ sub process { if ($op eq '::') { $ok =3D 1; } + + # Ignore * in C++: templates and + # pointer types are incorrectly + # flagged. Example: + # static_cast + if ($op eq '*') { + $ok =3D 1; + } + + # Ignore & in C++: & means a + # reference, and this create + # issues with some constructions. + # Example: + # auto &[first, second] =3D pair; + if ($op eq '&') { + $ok =3D 1; + } + + # Ignore >> in C++ + # checkpatch is confused by + # >> closing templates. Example: + # vector> + if ($op eq '>>') { + $ok =3D 1; + } } =20 # Ignore email addresses --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552347; cv=none; d=zohomail.com; s=zohoarc; b=ZXpt2fr7j/9cDdXAxSYzinvsQ9AFKsHAXRfubFR6UIFwyOL4ZfoE4DPAsitxnA6kbRuWTrUB9S1J2bAPwb2biwUURyhrLWfqHuMW02GIeE5w6Hi1ZzEUNgsZdpPc8CQ+FbtPsp9MMymGoY0RSnfmhUM93DUlY1Bq/R2zavLwTU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552347; 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=ogVV5mBQw0eQZRNBwQ5N9Exl0iTbfq2hhNJ26ebuz3o=; b=a0cypoAOIYC4F04DrOSCrxqqyEpXgf+zeXrc6s4+85MIXbwFOuX0E6o25lxlF4yw88xjszaxjbhuZdIeGUuqVYWR7RM2gbNkppmTRkrclBR84VOuhqHhUG4TfVRIeNpxLSC8/OxfNcvuuCMkz4JSd/PBF6qixhhLPXPTbpelLiI= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552347075494.5350166612983; Mon, 15 Jun 2026 12:39:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7U-0003bq-Qz; Mon, 15 Jun 2026 15:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6Q-0002X3-Mh for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6M-0001XC-2O for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:08 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIxUQR781976 for ; Mon, 15 Jun 2026 19:36:04 GMT Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etetjtntg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:36:04 +0000 (GMT) Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-138156c0492so15301567c88.1 for ; Mon, 15 Jun 2026 12:36:04 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ogVV5mBQw0eQZRNBwQ5N9Exl0iTbfq2hhNJ26ebuz3o=; b=TInlZtYkqaG0S1/c IFRrjyzHjzH232Ew/2huhEj7LI1JocCnpsU+adraU9cKtdTMrFEHbeMKPDUmbpEX ndQb2WsUwy9qyhu497X65Cp0vOrJxI3bR16MiG6Rj+Nf3PvHFhX1x1PT1Ht5ccut XG4bKunxmiTF4AvKIKECcjYa0yisJ5cpzXRMXLH+sp3TyeWSYvlsZQCmi+8EDHNc ni44Ju40mItCIq8TvxdiyUoFstCc+oeN/bpTBi/vArS8C/ATxWcYWkn+TOAwfdDI nmgJfkjoiflnhgEv2irqkozNyzzEe/N47LSjPPy5I7it3HeTiwlzC3nSntQJ383x OtKiyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552164; x=1782156964; 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=ogVV5mBQw0eQZRNBwQ5N9Exl0iTbfq2hhNJ26ebuz3o=; b=fdpGAryOGCwMeD/z0i1k1Al4LavB8PpavDIEu1TNCaCKLirnjhMlgfbsV1ZO6n6iNL v4kGVA0soQr38ZJCFsoOFW0mGx/YmM2E+uavXmrxe4ZZiPySBML1+Bdi3NMpuX0eRh7P j5frm/s5+RaUtdDbU64E9ISm+H+TmdOnwFuRSdhnl0pjBTei+aayd/9wjxc33GMbqbnR jbz4fcEg0ylJv8ba8CdzugMfcKtzZemjA1wUrbHZAsvxEmfAVpdEAg1WhGxnuJy031hz lfqCEdhdMsLqeqlHYxrEYVd3B+vAMPvDqOBVwrZqdeLSxF7WtUYGkm4/QBPxzQORRZZb I+fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552164; x=1782156964; 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=ogVV5mBQw0eQZRNBwQ5N9Exl0iTbfq2hhNJ26ebuz3o=; b=OfDdjiBhu0cwQy4ex115Q0xjGZcJ7XpZqLV5TdT/6NqCGSsu+6Gk1mm5cN4oFp7n7E 7D4QfgHqFvWGWS7UK8JcW8T9lRmA8qZFEOtv6WNeMFdTylG/e0xitq5dBYsk2hKIea6A WcbXa03ih3G82VXHDnQ70cxfnUCpt72R1c9twztb26XI2x+71nY3jB937d95dR36E/JG iCNwiyQC3UYGqvdjsuc2tuAAJgnxwTXKNqDBKScFxVsZW+STCzfrAPZVBf0MpsKlrTbN AjVsrJMcrRWTXCjNL+lAlKENfCZEKe3MVXz1j4dtLr/Mn6UwxI4KVC38/H65fhBPF/3K G8yQ== X-Gm-Message-State: AOJu0YyXK477bab1VYbdW6hOA4q4GkOqhxx/5gOAe3AW1fzF6tYyaopi MK5WGvWp0a8hCP1TgBJhslI0OUv1gWjptHjiJMTJSRsTHGlXO9s3RW9uZ8VqfezEPBkjg7scB/l Bj39eiEhAuvsOFwkEuGItSbp1a+Q/QABpCuuTbuJMJlxx/fVcXWrnrfY9YZIoNjHleivh X-Gm-Gg: Acq92OGlm9v7NfXdZ9WA5J04YWkH9h3NCwptBkPFrisYBFkrJJkAYa3z2AFAa9yIi/Z nk/9PuRS4gna5TkePO1lnf9+pqJXSnmDhdi8rh+1RnLVPeM663Qgo7Lw9Qel+BAKfsZAJZFsTsL mFdtdSv34gK/8ZI+HEEORq4zJz8YLxGzQdAFP+AOCA+vJRn6qCTEZ7Ek7kVAgdXG6OY595wCsfn vB/b6BglKYiRXDAnUqzAoc1B8BqCqJ7VWKKCQ25JYuiyhVVrejk3u3ziOWOVj9+o6jCNGXWvVdP ZLPhQADw66YereW7qPa75rgh0qt3jFXDXZYhLa9UE/vQiRZeL/IDaLmRiG+ZHq+AXoP8v0c9yzN 4z0awn4X3UPnmm7RsgjiInJlU+H/wcdZ5COqZXXIWfABmeN3dU7RVtD6vokXJ09djCwoiXbpqmT XCl2KuRA== X-Received: by 2002:a05:7022:1009:b0:138:37a4:fcc0 with SMTP id a92af1059eb24-1384bb36077mr7055304c88.12.1781552163519; Mon, 15 Jun 2026 12:36:03 -0700 (PDT) X-Received: by 2002:a05:7022:1009:b0:138:37a4:fcc0 with SMTP id a92af1059eb24-1384bb36077mr7055287c88.12.1781552162918; Mon, 15 Jun 2026 12:36:02 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 25/26] scripts/checkpatch: remove check on forbidden space before '[' in C++ Date: Mon, 15 Jun 2026 12:35:24 -0700 Message-ID: <20260615193526.2883349-26-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX2ohNVcymzP5o uCkljtV4aeGKF45k2w/VfcbiShrV9X07n6csxMZaniR26R8iBNdmrQuWCVXhe9O3uRzr0wi8lOD SncginfHKyUlIO4MCbb/OP+SvDKtqoStDLBKAflB3IDTO2t04RhjYwlsxVB3+f4fhza5YDyqi3B lEvGie+QspDsRet6pySVof44dViOFb+Tr7byHIQkOYnKTWG74MeOdlq+SQuqZBeQevGx4cIZIrH CoH5VrW0WjtGtRDmvuJ3/HUUV3osRsrqj7xrX6LNyadvXpaGUuBCnuKLnl2wASRJEX/BxVF1g8G gmtoavAlwosDuNqWeS6RAuvfibFF1ivtCECtHKy26FAmXDiYdQCqJIiUTgJWJwIcLMLWko3pdz2 8PAdeSIFe/m6E80s87svJ4BIBgjpI1ASHx++xGtQsnxvSX7nZswrOViWvw6pFdUBBIXpzcdkZq5 4309iEYtkqz6hMD/sUA== X-Proofpoint-ORIG-GUID: 9Yma6TrV74rwcYB2rql-rewcUXDoOfdY X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX+KmmR+KjUsKP DE38GGaxaP/sf95wncpdFt6zCVUvl2b/XmYtoJ1WX1BvGg+RZZWRTpvO9SdHUw7GPSk+Hcejj0r QR7PTStH/xNqB141P1/vtESsbfExCZg= X-Authority-Analysis: v=2.4 cv=HttG3UTS c=1 sm=1 tr=0 ts=6a305424 cx=c_pps a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=pGLkceISAAAA:8 a=KKAkSRfTAAAA:8 a=S56xvJB5AAAA:8 a=EUspDBNiAAAA:8 a=gfEeCLqIiXdy1k8fzu0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=vr4QvYf-bLy2KjpDp97w:22 a=cvBusfyB2V15izCimMoJ:22 a=MH9Ivq0PDQRhlrFuIVvX:22 X-Proofpoint-GUID: 9Yma6TrV74rwcYB2rql-rewcUXDoOfdY X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552348763158500 Lambdas are very confusing for checkpatch, so just relax this check. Reviewed-by: Chao Liu Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 538e059e265..03f35e75012 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2423,7 +2423,8 @@ sub process { # 3. inside a curly brace -- =3D { [0...10] =3D 5 } # 4. after a comma -- [1] =3D 5, [2] =3D 6 # 5. in a macro definition -- #define abc(x) [x] =3D y - while ($line =3D~ /(.*?\s)\[/g) { + my $cpp =3D $realfile =3D~ /(\.cpp)$/; + while (!$cpp && $line =3D~ /(.*?\s)\[/g) { my ($where, $prefix) =3D ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where !=3D 0 || $prefix !~ /^.\s+$/) && --=20 2.43.0 From nobody Sun Jul 26 11:26:37 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1781552394; cv=none; d=zohomail.com; s=zohoarc; b=UFt5YhSbuSFjLol5n5QhSTwCm64BUvtwSbpK5U9CNyXxjAVXjQQsWBRUJAA2B2ZsmoA6ajgHfBoVSQYRpnswHemvYi1DB9IRger06JBJdXcFeYAP/A+Mfq0YSTt4Ub2/VSCaiU4wI4FuZSH6bFzzw6v9FOyXFSjrWKIL9cXfvFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781552394; 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=e0U0jPdf9DP07XEh4hlQkA0/lzjvbReCNzHoQnZaOE0=; b=a6h2S+1qDwCTjSg/aoJGbzYmdTo48OC0flgDDre2LfVX1vL7rTdu0Ma2o2oaWrQqekmSzNRTUadaw6A3PIFZmWZAn2TosUZAD8d2Ae5gJXv4eW0d2Sy77rXpiDCE4JfgO2OIoRVzJ6siQQOFvu90iXrSl+7HwDr+bQXq0ANnQ9k= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781552394736253.7608111943183; Mon, 15 Jun 2026 12:39:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZD7u-0004rY-KP; Mon, 15 Jun 2026 15:37:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6Q-0002X5-NK for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:12 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wZD6N-0001XQ-UE for qemu-devel@nongnu.org; Mon, 15 Jun 2026 15:36:09 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65FIx0083577885 for ; Mon, 15 Jun 2026 19:36:05 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ete982s8v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 15 Jun 2026 19:36:05 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-304b8d0ee63so5979790eec.0 for ; Mon, 15 Jun 2026 12:36:05 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1384b97bf09sm11498007c88.14.2026.06.15.12.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 12:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=e0U0jPdf9DP 07XEh4hlQkA0/lzjvbReCNzHoQnZaOE0=; b=a7zSyvvwav6BvjVkQqb2MnQ77rp P/kJXMPBI9KPbd6FxZT/TSZ+quu/xLAO7njUQ1aVcGayGGZmJofyPlntP+q9RHZy KkplDEOfPA/g8xqfkMCveEo7nXRX1SFUsMBe3ZNPixaoFUrus+K6DzaXlQCSW62w lm4ra8HecfDgxDyTpDM6ffbKTxuh68b3J8G8M4JjDusYj6Lv8ZRJbJoWtQ9kMF6w 3u/PxQu9jG23AxhWTmET8PvVtgJn6U0YdNKUpv1b1XyFkmILjTi7yV2RY6snQNym ofwcvM/UM6KbMElGYJ74Zz+XszjFE2mAx2WFPFbLywN9WU5WWQ4OLrzFefQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781552165; x=1782156965; 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=e0U0jPdf9DP07XEh4hlQkA0/lzjvbReCNzHoQnZaOE0=; b=bYBF/7MrGg96E03ZqZPjp//8R4ahohodFLqtgrQGrSPeP38cXplWESF93VllMninSj TnJ4X0lA5AaHuGicOZbolxCrFmt85TVwMUN9FN774TeeFwDj7QdRffcf5O5xueKn5ecH szYL5t/F3RsxDTtD5n6ClxKbxz0Of2xzAFiSflEyV2sQPI5V9vjtFf6s4N68dFNCJZvZ tt4T0ICa9AiTi5ji5o9KN+C99gKe/pKzzIR556+9nsk3qeZCypukWENqXKTuNHFjdCi2 Ui8IIx9bTVblu3EENJMi9mZh7gOW4YyxxSb97EJgREg1YjSP1PinRr1J/8x2WmPioFOf 6XYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781552165; x=1782156965; 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=e0U0jPdf9DP07XEh4hlQkA0/lzjvbReCNzHoQnZaOE0=; b=WsryOrWYduBY1F5ChXQayG40VHMEG0+oRQxgyCCdyzFv8n8YmedJNstXtpv6Adm616 zIUlwjzdZOOb2g8dRmUib3cZYs1rmIMa2HcGnS50A8oxvVe6BzT9QGmA1KNHm9rkWJ2x dJi1NIpme6/VllDFZxHF2vz2snGDMKn6PYXgMaTMePcA418VvEXuR8m4RJ4iHgeGV1WA j+rjt6dAN0bfGhTMZQcOsIoRfIc2b9ogIN+kb/u3xyJ4e0rwWRPbxpN4f3miwjF79vZh XYc3RsoSBQbaofykSfbLACU4pJGgvnURa7LoLSthj7/iVv0BY/BU2iochgjN4DpEUMBT TaUg== X-Gm-Message-State: AOJu0Yypv4wkLW1qEkpo7fIF9JN2WcAeHvKn8XavZ8oapAoL79Ko7ifj SmUXpAnhKR6GwMKeSmyjpfVs7CtjklvOW4/pJJx0RT9KwMA6QU5YuCjaR13NuOkKhOlRx561G0g Yn2T7SsHyRMXsN8OgTfGZJHN73tk0QmQ+m1TT1QPfwWkMQsyOl5UonUFoFYk/8U5N0W9a X-Gm-Gg: Acq92OGKw4MJ1afw2SojGcwB1TaoCGDIIqz5kcwtXJz1jIZs3N1qepqYutJsck2Xxuo tz/a4geHF6jVzjxE0/Oy2KkqgVC/Mp24Ed/zupQRj2uqht4B9FU+QJSpeNs7Pmo62PO4eiWj6iG ZBQkiJkO1Lwvdsl7rYdlwxsmccLpJFyrZPm4UoKyW4kn9nHw0JFXcqTdAR/2TKEgit7Z419GHiN lQw5oZny5pU91+/pHWkbvbzPTWEpP7aQmoUiMSD7GdQocyhf8a+1FryPu0hXnZTFakIDJ6QwxBh WpNWIuAjd3iubqMDxtxOg8Giwnijc9qipJPr3zGdqgksDuBqhGrFmTSlqcfdOqCEDxujblTYpzH PLv8fvweVvPD/1JpqU+dFr3B2sf4Ykp+4+OEE6EMdvN3htC6ygGxnDVNCLfd5RVahcS9dEJn3s6 ZCKldfeg== X-Received: by 2002:a05:7022:6082:b0:137:ecef:c935 with SMTP id a92af1059eb24-1386f24a584mr5108425c88.5.1781552164518; Mon, 15 Jun 2026 12:36:04 -0700 (PDT) X-Received: by 2002:a05:7022:6082:b0:137:ecef:c935 with SMTP id a92af1059eb24-1386f24a584mr5108411c88.5.1781552163997; Mon, 15 Jun 2026 12:36:03 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Chao Liu , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , Brian Cain , Richard Henderson , Alexandre Iooss , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 26/26] plugins/cpp: register callbacks using captureless lambda Date: Mon, 15 Jun 2026 12:35:25 -0700 Message-ID: <20260615193526.2883349-27-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> References: <20260615193526.2883349-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=V5tNF+ni c=1 sm=1 tr=0 ts=6a305425 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=D90kLAkOAllNM0JH3EsA:9 a=O8hF6Hzn-FEA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: epkSJmks2faW8vA3ISSSPSRFjuv6aydl X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX3OtYO1BaJD6m FdIO8pHB3icHcK6QFfbSSRa+d1mneJo3nv1FpdN0oAjULcg6jK6dhdGs8KOLIpn5YB9q+mqjQp3 1aFLfEc1vCQE76eov1jwfYOGDrLH7Gs= X-Proofpoint-ORIG-GUID: epkSJmks2faW8vA3ISSSPSRFjuv6aydl X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE1MDIwNyBTYWx0ZWRfX0+nsCLjClhvo fW01a3vd90slP6IwssvMMPFuiPtE3vSx+i22kBnkvOHfzu4pF7E5zEz4UO2ok2Ei7nIwFopLxqk E2MevCwMJV5Wo1WPgHotPHnBfu7PMuDqaCkLlzww0OgyAOFpdxT+MACfPu8igSJdDvj+ljyp9KF JifHfIF4QpkhqGPHNv8BEL1Ped8Nc6LubHUkH+D1HMGjEOLy6wp7AifzvLy61xwqDejRaD4id52 Li9WCLBbrmp1f9x/5W3JnEQ4aQ2bwiXX1MpQ4sm7CNENLZ6RPKWal+SDx6CL+c07DtGDvL88AYM +yaEnFm77+U2q6om8EMjEVK68cb3Z2w6XA98t02UGQw037Xu+No6h1o6rnyZmnSFhrYR27gyMmt OVRsiUW2rkSodbuTPmKWRtAYGdXpSzAMSskydtYsWjK02YtcTH+u1bexwXCKDnNUTRIcmWTu7XW yXowVXxe/J7UbzueVaw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-15_05,2026-06-15_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606150207 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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 @qualcomm.com) X-ZM-MESSAGEID: 1781552394863158500 Content-Type: text/plain; charset="utf-8" We can now demonstrate what previous changes allow us to do. Since all callbacks have a userdata pointer, we can use that mechanism to move an object through all of them. In other words, we can now have stateful plugins without resorting to any global variable. As an example, we implement tb counting plugin with our cpp plugin. It produces an output similar to hotblocks, with same performance. Signed-off-by: Pierrick Bouvier Reviewed-by: Manos Pitsidianakis --- contrib/plugins/cpp.cpp | 90 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cpp.cpp b/contrib/plugins/cpp.cpp index a0bb261fbe8..006fa6de243 100644 --- a/contrib/plugins/cpp.cpp +++ b/contrib/plugins/cpp.cpp @@ -363,14 +363,98 @@ =20 QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; =20 -static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) +class Plugin { -} + public: + void tb_exec(std::atomic &count) + { + count++; + } + + void tb_trans(struct qemu_plugin_tb *tb) + { + auto vaddr =3D qemu_plugin_tb_vaddr(tb); + + TbData *data =3D [&]() { + std::lock_guard l(tb_trans_lock); + auto [it, is_new] =3D tb_data.try_emplace(vaddr); + TbData &in =3D it->second; + if (is_new) { + in.first =3D 0; + in.second =3D this; + } + return ∈ + } (); + + qemu_plugin_register_vcpu_tb_exec_cb( + tb, + [](unsigned int cpu_index, void *udata) { + auto &[counter, p] =3D *static_cast(udata); + p->tb_exec(counter); + }, + QEMU_PLUGIN_CB_NO_REGS, + data); + } + + void at_exit() + { + std::vector> v; + for (auto &[vaddr, data] : tb_data) { + uint64_t count =3D data.first; + v.push_back({vaddr, count}); + } + std::sort(v.begin(), v.end(), + [](const auto &a, const auto &b) { + return a.second > b.second; + }); + std::stringstream ss; + ss << "Top 10 executed TB are:\n"; + size_t idx =3D 0; + for (auto &tb : v) { + if (idx >=3D 10) { + break; + } + ss << std::hex << "0x" << tb.first << std::dec << ": " + << tb.second << '\n'; + ++idx; + } + qemu_plugin_outs(ss.str().c_str()); + } + + private: + using Vaddr =3D uint64_t; + using Counter =3D std::atomic; + using TbData =3D std::pair; + std::unordered_map tb_data; + std::mutex tb_trans_lock; +}; =20 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, NULL); + Plugin *plugin =3D new Plugin; + + /* + * We can register a cb with any function, which may be a free + * function, a static class function, or a captureless lambda. + */ + qemu_plugin_register_vcpu_tb_trans_cb( + id, + [](struct qemu_plugin_tb *tb, void *userdata) { + Plugin *p =3D static_cast(userdata); + p->tb_trans(tb); + }, + plugin); + + qemu_plugin_register_atexit_cb( + id, + [](void *userdata) { + Plugin *p =3D static_cast(userdata); + p->at_exit(); + delete p; + }, + plugin); + return 0; } --=20 2.43.0