From nobody Sun Jul 26 13:29:18 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=1781635427; cv=none; d=zohomail.com; s=zohoarc; b=nR/2X4t2CVvzf6HKladzrKbMoD4QibOBR1JeL+k4t6bJAN7uqZ/ewMEP6xE4CciaAwG17cfqwNZV8JCEsx5MQuGQLGDNDeCZFarqGAuB/Lrndwaa/QVsG2as+powYZf3DMwGTYEkDHhOEGpVkngrd15tHLbXJ8p86MCrxYn8Ie4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635427; 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=fxfLTChBy/pfbYYSTZ+abAt119xAxfMeUe9ozAwk6YU=; b=NVfstlEL7A0BENPDgNGUlGQYJINyWUCRb4MLlh9Pb0aQMyu46Kg7o2PGFSrHQE45tLubM2+DtfxdszWAk3NA0hzxhkahMFIEjBdx6ta6c+huIhrHHt4bs0BM8CcgfJuwjox2hnvvQownFtzxk052lRn+UWo9qYwEoQgHTVfxRLo= 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 1781635427351304.8930767429762; Tue, 16 Jun 2026 11:43:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkG-0004M4-5E; Tue, 16 Jun 2026 14:42: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 1wZYkE-0004LU-9E for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:42 -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 1wZYkC-0000OC-D4 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:41 -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 65GIOjI0382369 for ; Tue, 16 Jun 2026 18:42:38 GMT Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfjp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:38 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2c69f08f527so8120655ad.3 for ; Tue, 16 Jun 2026 11:42:38 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=fxfLTChBy/p fbYYSTZ+abAt119xAxfMeUe9ozAwk6YU=; b=mlhwj4qjliij8Kqpi7w8RujwMPT 1s0ncSOf5Ijzu2oxj6NAQxi2sOFuzSyk6/Rnzx6BTKx4poo/I1tS/sBafV12z/t5 JLXjj9ojDkMbQ/UKjkg7utL7EkptRKYY2Esh2BDxSUQ5+KBJwXE7f3SR/DpMM4FE VR42B3GnUtfATBMnuNnE++7wgnpu3IX97jPEimM+S9M8lFPuL2RzuZEdciP5Xb+N eXlx3840e84svOGPaSdPqhkBqWDFAoUVWWip33LedJSOXdfazsefAoFo1lDQLLdx u8vE/ozz7YCRQHAzv1wkYwlSRsuafFQJHTZVzc9h+IBpaPEDgOaSYjEdczw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635357; x=1782240157; 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=fxfLTChBy/pfbYYSTZ+abAt119xAxfMeUe9ozAwk6YU=; b=XhtFWc09vNgE6Rbk5rgUIWq5u8q0puaM/KcbtMoUgsXtonMYJwaP2R7fGUld/c4rTK Lbw2cTmoHdN5mdE4CaYq4WxVkb4cJ5vmyjyLbdvY1LGn1r6GdZU6zth2KRE5vvh2OtCS 6inWyUK7Ede6NNIun/c72UK3AhmYN4FZcLHo+15yo6v6HQE9UPhUC/b8UsfJm3rODnmV bHfoqbR44OH4Ki6u8ERmQsGZ7X2HKd9haDO0YmikoCBs+vBUr8bbciCrG1oLWc4c5ot+ cZ7sfiHASAPKPObpWWKR5xzhYakecON7jKbuJmdwhnnTprQUWeiq1Kiq+eSJlla1vrXR MhoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635357; x=1782240157; 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=fxfLTChBy/pfbYYSTZ+abAt119xAxfMeUe9ozAwk6YU=; b=gZzWVAq3sK6uZixvuuMMkqeCK2j31JyXryphx+FLfIAoPMk9lSBokIAb+j2CYXM2q8 32gLqxGm/1Q4gGawgu2S864eFkzWRTtV2uu2p/RCHGWrQAWTqieX8pfPEtD60ELrWQYW 2km/8aKwfgwPgmlSJZYvJ4w6olF+cVeXzkI6wcjPTE5PoZscRmWQ4WUj3DmG0PCxjQXY gGAqqxCObm79M1m32qIHQHR7Gk8TZzJ5GMLzEf5I5z+otwtBb9HDbsa77+a6qUjJ3ItU RojJysgZTdcZWKN0wTIUTGWCmKpLYGKhzijie7Bn42UBR8iLdHrjUE9U1IZOH8gNCySj PeAA== X-Gm-Message-State: AOJu0Yx2FLbnspU9WfeaP3+Vps1NAbEIHZS5gA9XWzq/CFA06xX+8px4 vq6jPHboaf85kaoIOoABTXFcHxfxHImYh2F+Lo5WxeYpM6ZpFF3aBS7JDbJtu1wylm97/zYOEQv shViQ0I81MNXJ+9HouEEKuPUP/V/Z461I1wzjdsyVAm5lv/uMv8MKVtl1v2gOWXxJ5/gN X-Gm-Gg: Acq92OFN3HQxdNBa/fODAPEgW/zW16m5+jJaHm7pzmWp1bBi7AsjTay8VqmdobR3ksh IS2yHPsPYnSGqnojfs9TsR7lBPJwt69t3QD/x+lO3HRoquD5AaUMhYBx94UpF6p4J2eR7WbkTs9 WisvqmTNWofmEwsvpqcni32n4qrnjTDljxy7APzzUT4Azuh/CyAja21icpnckssj3962F62DrDU ffeZK/GhPFq4F7Va1Ubn3gWMD9g4Plscemlbg1FdJHxCJL0HpBVp1lj+hoF3KJ4dh7u4xA8VAIS n7qz/3vAnU1+IcDCNSF3sJ/WLqPvgB10JXHNThKIHI79a9g0OpQgUqB8ILmDfJzkkeM9hU9O1i7 QyMfLl35U1k6x+VrAStLSy29gxoAqjmF4nmwYCMAuEHuS79ir8P9kfjm3QqlcHZasL/3cbuH88j MVZ2jx8Cc= X-Received: by 2002:a05:6a21:180a:b0:3b3:bf7f:efeb with SMTP id adf61e73a8af0-3b8b7ff1ce5mr486375637.45.1781635357360; Tue, 16 Jun 2026 11:42:37 -0700 (PDT) X-Received: by 2002:a05:6a21:180a:b0:3b3:bf7f:efeb with SMTP id adf61e73a8af0-3b8b7ff1ce5mr486355637.45.1781635356923; Tue, 16 Jun 2026 11:42:36 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 01/26] plugins: bump version Date: Tue, 16 Jun 2026 11:42:05 -0700 Message-ID: <20260616184230.303038-2-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: Ld65siiEZK05nLh1bkwW5ZcweAUtXRwe X-Proofpoint-ORIG-GUID: Ld65siiEZK05nLh1bkwW5ZcweAUtXRwe X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a31991e cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=A7FZhrvmqJkW37y3txMA:9 a=GvdueXVYPmCkWapjIL-Q:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX3fFajGu05vA/ uotKWofPzPT24nK2gAkQvm78kKZnnr9sYc4IzTagSRLmtpOiQBs+ihpDiaAvOaMZeGUrLacR1xh cmginOX2abCnuFBQGlCiUbcId1sGqNwWcJbmxm5sAMn/lsAQYmCTNWv8t0FCbVZgDGqOhcGjRoi //vhkRGxWOhusi4X3EN8Wb7zD3ESwAShA7kP85fP+uoyoGn848ukuLciWV/ri5SW0FTCTO4iRoW vJghY2o8hdTB0fL55M+63vF+da2sJ135YLBvIKP7MUjdJwQ3SpDGaG2TifcziPlapjNpwc4PlOe snYS9J3ZKkVsjLBcr6+zK5XEYmi4SiIHF2qILfKu5M1hx7BBzHsuyAkPQtkFCHim0u0UXti/6uo X/bD9v1f/BcqEU+8Lgzw/Aa4J5fdGdjEknpscjJWeOUepLxE2vUGOL0019Jx04uabl6T7VvkzRZ riHRzA+zN8y/yD6yDEw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX1Kyuc7uWn3co 1zJflR012ZRKMYtehWj9LMVtMzNwfqZUN6vz7xAAWYV9EgfO73BEiZrH6ycT4Wn6FpTusp7rK5/ EIc83d9gYVze8VPOnZ9wxIoTHW2zU9s= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635428326158500 Content-Type: text/plain; charset="utf-8" Next commits will be breaking changes, so bump min version and version accordingly. Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-2-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635507; cv=none; d=zohomail.com; s=zohoarc; b=CT3yMXAfXkCnseHy7MZR5evj95r7Lp0OUd1WrMhpRnBGU9nzjLEx5AIk9wGTw91PSLJid6LFB1PUsPg4KabDjjukv2HI6mWE0m5ZjAwt+hphol6LPpr3EFIRW+iwvpesLwMA9ctXFSw2DJ8w381dFRgX1S3iRE8anjfnPW2lvgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635507; 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=7UgS+/XFU9NLfD3wp/+A3Y/XXNy5qjeZNzVPzI7CWk8=; b=leZgNCYmFiJqa8XXYZ542/06rRgI6OS/tTxZhwdz8szCK6e4+GUc/WVhD3g3tbZFsHlBnXRDPyEybs6ucWjAT09CvJusXChJ0Yr9+IEVAEiziAUlKV19NrUIiJ/Pb5ReCOJ5KRoqnx+fm8VA0aS2TRqS7FFTo0K/C44oSOu9Ewk= 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 1781635507159625.9256335640209; Tue, 16 Jun 2026 11:45:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkH-0004MV-2E; Tue, 16 Jun 2026 14:42: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 1wZYkF-0004Ln-88 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:43 -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 1wZYkC-0000OJ-KY for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 65GIOYSr331236 for ; Tue, 16 Jun 2026 18:42:39 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09gbkrf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:39 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-84238e83851so3200218b3a.1 for ; Tue, 16 Jun 2026 11:42:39 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:37 -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=7UgS+/XFU9N LfD3wp/+A3Y/XXNy5qjeZNzVPzI7CWk8=; b=fzW/0gfKVUfkrDDA+9J+y8LHXtm Af9h5j6dDSC8GWwEQNlieixtsLweZbsdRg/uA7AQJJ6xSFvx+idLX7H3qQ2HRE3Q rUPxjR2fElBlXfp4xiI7XCWSIOA/PChn0lHr/y0ogGhWP0sShlGC17syQMpjb1cH sBMVvJ5BLmV0htRacGfJWCuwvDyIXI3PA1c56khPtfR9+IIcOiY1tShBbyPS7v8d u1M8l7KvJ3nJai8brLvEPsdkRevTcJcbgPQ5/DtKi8vZtrf1UJB83llWJTyYA9RU nNOnWGTw0swEDhprafp8NYjsY/XcKT0XLU+FwLXUFgnwERhkGP/nKydFzsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635358; x=1782240158; 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=7UgS+/XFU9NLfD3wp/+A3Y/XXNy5qjeZNzVPzI7CWk8=; b=RYmi9O1Fb7Kah2gKn5RV8d6iixqRQROb6X4ZikOV1FMD53wzhNk+KSGU+xYL0vjwKI dOw5TwvsxKGvYIWjzEtTM2GRs6bL/lF23X9V+b2GnqSNcaxiksH/v89iI9mbWI6gJxhW sLAbom8woSTLAN9DUuYaRvtCdPOeODe57wc4cXUWyUAdpnmsdbt603Y07wh9zmB1RQM8 8im5xjbLOZ+0fxATSRUARwh+ULJvyUykeMSWBSlENRiVyevJmW3dhFHylG4WLG1LO1C1 tJ4paI0TD/4WEtWcFSixDbqvtF6o5tnV49XZVmpscb/UAKtiaTd9gFARRk+P8rX8Po5f yTMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635358; x=1782240158; 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=7UgS+/XFU9NLfD3wp/+A3Y/XXNy5qjeZNzVPzI7CWk8=; b=dcoKfIoXbx3/QhOUWuxSYp2rUBt5uuECUOoWLuzrfb3KJgwA/G3yC8TC3Ii2eUXMLn WvkOGWg42prw9FBPfXMhDnSdGHZa5fNFzL00Vv8sG7jj5aLUmy0Qld8+wVuvcD27ro9w pGl+7UVBq4FX+a3xd+nXHwP9pCUcsmJic+Vof/UxaOt07MEpuQ9V/ISbidb6O51Kqfo3 tUyCsBrKRBwp+R2L7v1pDebRdaK08EpQKowUitoh5xASMOTcJv2Pw+Th3lGcUOqQEfr4 Td3pIyghvDA1f+tMNtC2WqkubYC+9KUNn3yh+q228lP6uS7m2M+3ZZbXPvD1PfY7b1CS +bIg== X-Gm-Message-State: AOJu0Yz5onqApu/dPF8EZ9jyV/mTe0IJxXlM5xAYtQlNf/Sl/Cu/Xfkm bqja4pIr4iNQm/97Xp5GnXm1PvLTrRYdWuVye0ZJ8Q7QyhTKEGgu7c5ODCIyHlQLVxkV2QEUs8X cuyPo2GBR248sSo9nSjm4fymmMsNK8zzeGmIZhNZk1xdDRBHuQ/75tHCMs1xCzKDvvY2q X-Gm-Gg: Acq92OFPD8D5/UclgwNo/7BgfF9UOjsL4ZfAv7XOt7/dpK4vsf2w0EAuoiT8cxZRDzG EKvHR1euD5olUxDi+wvIJIZkTZMZ9EbkL7ekSGBAAxbUD8DfbkmYybdMJc2bVDQY2bwk6m2yxwm e3ZTIFw9ZPeqBiEJUdDhBS0tJzceQ4uWKaDniY/ackENaoTo/JGWNdd+16lZbcA3l1/gykmV7Z/ GSx+H/PfyICMY8e695ngNJpKNzGmXYY74OIrZ792L5JGF4MNLpvLPpFsfesrA5UEpuo+zbtyQZm CMrcEc+xWbnGNecLPVeZi0V1Lm15nFWXzq81lZ/8AhQOoX4AaDd8O0DL+rN2SU4Na6wf7pLrOdS QlAJTqbpTrT4NsT7OykSDWd/Qz5h5U7aWp08Dy/xFAbJ5ElApyAVYLjAhVbEPtayJbr+B/bACDN UjZCuW5ro= X-Received: by 2002:a05:6a00:760a:b0:845:259f:8925 with SMTP id d2e1a72fcca58-845259f8c33mr74450b3a.6.1781635358182; Tue, 16 Jun 2026 11:42:38 -0700 (PDT) X-Received: by 2002:a05:6a00:760a:b0:845:259f:8925 with SMTP id d2e1a72fcca58-845259f8c33mr74427b3a.6.1781635357682; Tue, 16 Jun 2026 11:42:37 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 02/26] plugins: add userdata for qemu_plugin_{uninstall, reset} Date: Tue, 16 Jun 2026 11:42:06 -0700 Message-ID: <20260616184230.303038-3-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0GiqFuQKoVpp NB3GSAR2adYd4LzJUAkMa7C8TFBwR1sQ2aoQZNQ7zi7qn2v/uTK9PXIgRqj3QiwzW5wbJYNJBD/ 43wrMDqn2vi81uYVbq5mJCC+pYhA7IRAAfqOB09c2bG7BnULBUjdqwYKU5rFHMClgfar0zznrkp 205YWH+NhfJj2fin0WI4eS29nVGB5cEgeX7QzgsTnKJRxR5gAO5TxdSTVCpmPl5/MKWMT2fgBqX MoxjcMP2Zk/fSgNQmN8KBpUgINhCgUmIpOSit/cVwQ7arVbAr8s22YzAukJjNG8Z7PGv6YIBo+B k31D9TlFghULMpFuWffWyVLUEpc/NSMuXb9flyxoRAhuByEgM4gw6xNUalw6I+RaGUhUpBk2aW8 xyHLEUGxTtL7/kdOjBzF9rRnIgSvNrH8uy534Eama5ycoflmRStiSZ4AxG+iYvpqVyTUp88+V2H dJmxmo2KKNqKp3uYhGQ== X-Proofpoint-ORIG-GUID: 5KtqrIt4NPwSz_3RigKxgMBaq_zoMDo9 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXzoZ9y3u5KVB0 bQkr0UlxUjCWFhg9q8LgnESArlaN0R+LXyYByP68eHeRKZop8l40t4c/N4U+wbUAhVwuuHKzcwD jmMpDek0zAnTO4UI5+eCf7UHQL0y/VY= X-Authority-Analysis: v=2.4 cv=DLa/JSNb c=1 sm=1 tr=0 ts=6a31991f cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=_u34yJfUH-Co13bc16MA:9 a=O8hF6Hzn-FEA:10 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 5KtqrIt4NPwSz_3RigKxgMBaq_zoMDo9 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635508956158500 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 Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-3-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635396; cv=none; d=zohomail.com; s=zohoarc; b=jaesXakL+9p1S8GySgAIOWPBC8faZy696iC3RQYLA1lHlUv80IxO+OpGnF7VWFOvtqBsW0JqXMMoBEdYk0zHIVfBkengYH64v/YRd4V277CP3u9U+GfALSgSG5vZNfQDAGuMnsHd6xAemSAx3YXB2qoEGLyu9zKDQXA78ZSuHAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635396; 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=t1QyXM2R8ofzHdRbHbdifjXGBo1Eok+BnO0eKH4+PJc=; b=ZwLTuhAT2D5spZTYg/5eaNwda7F9kU0ztWCsJC7TRCDZyPZXu1QnarFLuLG/CYAULwgRd7Dda5i8EG6M0CO110H+1E9uFpZtLUGbihdGu1k9FuB0MNCEqYzn+5BpbjaPybJQ40WCbpT/bXOWo94ngCbvFrPB+O2ifhzQvCZdJUU= 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 178163539601942.09197366105241; Tue, 16 Jun 2026 11:43:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkK-0004N3-If; Tue, 16 Jun 2026 14:42:48 -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 1wZYkG-0004M6-0x for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:44 -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 1wZYkD-0000OQ-Qv for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:43 -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 65GIOoQ9140438 for ; Tue, 16 Jun 2026 18:42:41 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1ysu3d9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:40 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-8423f544944so3413401b3a.3 for ; Tue, 16 Jun 2026 11:42:40 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=t1QyXM2R8of zHdRbHbdifjXGBo1Eok+BnO0eKH4+PJc=; b=m19bFjVrv0syBnUP2qj7kfroW3s rICGoelL5mqBo9ve5EXG402Pxz5by1BT3MQrLI6ei8o3vL5ep7qk4NlwHhUNctbA elF0VCSjvOCQR/lEQpCV0sQE3/JRnig/OsfQ7nECbycUVkLetn8WZtRoNyFWqQRT XrNQg2357WM/k7phczKzyDT6GGJ1Q1KuZQZ6g15DMx13phCmKpspegu8ad0yMh/M phK3CueYRXWaUhCBA4Ml2srh6S4OXNucHFqOTk7h4UYigcQdPAE6ds82/je4GcDh vzduiVx61+qOt54H794L5jp7NQl8/XlLUCYuJhlKKBMlpoqJuj6FA/+aMEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635360; x=1782240160; 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=t1QyXM2R8ofzHdRbHbdifjXGBo1Eok+BnO0eKH4+PJc=; b=jz0JIkINNmSk66wphcOpJni7aWuuaqmCjVfLuJurQOenWlRiWLmBATvfW7ujT82hC0 8xnIQ5IeqSXxZIJECC+TwS+I/oG6mYNA1neC1Q0uR1B/Nw/9QoByiWUwb8XWmO41O7BE 5YQy6qJDDNFG3srVoaqopkosx+gsW5hxbY2VgCU3zDbZ8xiV4jSc3JBq4mZSvivru4xg o7DXsGtmV1f9x1mtY71+DnWyPMGGfS4vk4qFAFdE/k1RFQ2ec2Ytgeu6DBcbP3kT0GIx 1XAG/Wy+3pe/rviX1Lwb+5BFgUhEt4oBonBTxvZ820dZbayX1Knd5dwkOhDp8oo3ki41 YZnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635360; x=1782240160; 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=t1QyXM2R8ofzHdRbHbdifjXGBo1Eok+BnO0eKH4+PJc=; b=YAdn3p9+p+nL9Wyz2W/ONR5TS7+7aW/m+M8q/IS4PVFGQ4F1YgIlXxSlO8Ci6oy+KD OsB2ZocUpEIfnMQg2D0Dx72l7NJqBNtwbYf1zE2MNZ3VWe0ww8zIeiuy6C1s1LlgmZ3e 6CGYPc5xgryvxZdMDxY6bjVs02CRzX+kZyijMtEmIR02w8Z9ta0/c4yBYu63yoGhcfKG 1fvLFCH6+6d5DFiS2b1lxoLxqJ3i/Iq/AnfJqahoeLGpgq5Sycd4U6u/4ipc/7dejeO+ VtP7wIOQnTnOQs7Z65N6y9y3irqCFLn5IthTdyKCjtUr+DpcE4KsI6C35ldAsaF8CrcZ XF7w== X-Gm-Message-State: AOJu0Yy7L9IGRu010ODWLgSPQwxxi5V19hRJNLSXKdQPipV7lBABFTOH PnQlzRzgCJ9o1NgTQB2wyR1wNXYE+lMh/3Po1JMvtDbAtfJ6328mNQVY98tXiATgrO8q08ghcs3 0kGw87JY2PFJldZfFRin3Tb7eQBoEgeKHrBqZQuOJKbnx48f5d8rbNWAJhq0dZchzI6Fz X-Gm-Gg: Acq92OGbKU27XKTSxtRTEe6NovT0FGvEnkfulTJ9iO57v0cNqbBFhC9sBXse+qw/hoS WKnAX6m7vow2sSJTxJBoy7vBW6DSBCgw2DFi1dIT8DFIS3i+oGkmvWq0byaKmhAntBA6WX+zNNV HbeNR006ardg/3Nbw5fL00khR9a3/ta5LdId6PuIvg4L3TizbfbwRYYbVbt4p9AMrA+F8iUa/IF KzytXq0Ibf0c7YdvHH8ftnTeCMfSm0onA0j+QKQcQvBwIsB51snIgggbce0kImYqupMVwGeDSQF ztCBsEVkjo/ALEawqDNqLEUiHDC1QnmfnFjSm7tbgoLXv7ESzyp4wTpWGBV4KvQvmXG9e44CISQ 6O79LzGWBBbbEddYDFSvTqVM8Elllqtl04wSUJCzkD70gWiKaIZkpAG6+3zpYSfuHduI9q4TbmZ ZuUc5iKfs= X-Received: by 2002:a05:6a00:3925:b0:839:9ad:ee31 with SMTP id d2e1a72fcca58-84524444c85mr364490b3a.8.1781635359816; Tue, 16 Jun 2026 11:42:39 -0700 (PDT) X-Received: by 2002:a05:6a00:3925:b0:839:9ad:ee31 with SMTP id d2e1a72fcca58-84524444c85mr364453b3a.8.1781635359337; Tue, 16 Jun 2026 11:42:39 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 03/26] plugins: add userdata to qemu_plugin_register_flush_cb Date: Tue, 16 Jun 2026 11:42:07 -0700 Message-ID: <20260616184230.303038-4-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: PhEL25W68BWTmZP8ixAQmb0HDVB-ayCt X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX2nXObOuD4uza 7wlD5bvF57f96K4XTv58BRuI8Ecv9FtqD3W7I0gasqsC+g34xrgmiqCMgGZMN6Vpi17g3yNnNHW TOjki8+TkiOZlvgEu++SyYst/ADY03E= X-Proofpoint-ORIG-GUID: PhEL25W68BWTmZP8ixAQmb0HDVB-ayCt X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXzjklTliIlaEg 6Qs5FcldD3bFsnqU9FxW25raqjItb2af6MvgzKe5O6UOo012zL6Z4MgMFm6gBemNynk6nbFlXL4 IdIwpdFfkW8puFlB+W3+4vJtV6n/yvRDWay1LMABZO5g3shcJjg8E7F7OhlBRhNmZaGrOoR5CCC EXGfouFB9TaD7wnIxAp5WfBYFkWUGWHu9hG1542KUkEoLLK/LyB+qJuOyAdzWEklMMwZAoXLl5y 278RnBh6HWsNOCE9/DpK3vdyeH/rGI6wvypiEO115egDUmZFTKWZZzh9LbSMo7VJ0iKlMQkm0dh dqo3KQoA2lv905TQuTlqpVXiO5bd5OX3mTNVNy16qCwoxBSu/EYbGZQ0+qtO0Xnd+BWfNiCErku 0qfr3djVLIbBoyIsXQI5thy1cZdnhKf3cQtVDg3gDYdbHC7h32NAYLCZSylcxwxDx1cCUsolSur 4lhzqktw9amXjlDPQeQ== X-Authority-Analysis: v=2.4 cv=JJcLdcKb c=1 sm=1 tr=0 ts=6a319920 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=jbUUBHnpNWWeZ8W5LfIA:9 a=IoOABgeZipijB_acs4fv: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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 suspectscore=0 phishscore=0 priorityscore=1501 adultscore=0 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635398144158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-4-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635502; cv=none; d=zohomail.com; s=zohoarc; b=OZq6chN3d8B3yM/W7uUzS4hnqaZres+NRABDIXMqiEk7SqV9sNWvvKTQxXrgk1jObQSIJSefKIfGVJktH4hl9VeHbvbF3C+f9MZPvZy2cl5u7vYN0LxBbd1Xl9Mkh97IhKn1riNQ+sDQBWjJ/rpRM0hqd2QBW48V2/47qRMx7WM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635502; 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=9KsZuK315wksrDsV4TkH3dSP++EyCXGeIlhzGwP0k1M=; b=XcBA9WwOUdSxquj++8QwyYCZCNfXEke8djr+m5qt3hUeDKccsDn5eecXRJlI+ufhs2ClKG73nE6Qq+0TWvjt0mmbmjCU9vCDB/dxXu48oiZxz2KpX99XTMAVd8t1IHlxA5+FGlTCePUP/tdClfFB3CY7yrJEI5UZNF88Wc/1xmc= 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 1781635502082706.1371755152852; Tue, 16 Jun 2026 11:45:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkN-0004O4-NF; Tue, 16 Jun 2026 14:42: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 1wZYkG-0004MO-Q4 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:44 -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 1wZYkE-0000Oa-V9 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:44 -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 65GIOT3o330811 for ; Tue, 16 Jun 2026 18:42:41 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09gbkrr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:41 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-842b0dd8107so2966692b3a.0 for ; Tue, 16 Jun 2026 11:42:41 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=9KsZuK315wk srDsV4TkH3dSP++EyCXGeIlhzGwP0k1M=; b=pOjKCFgqnFFw7hilxpL9nT6JrDb b8SzQz6Yfv0+XTgcfbuET7ZBXOwQQLiYrBrqCi6U1lManaQsHxbSDv9Ah7wNWq9h cPw5KH8OPh607D0bfc3ONLrICmzDdzF21WTbSfbBDexJKwO7metOK2afddZuMu+q nq1QUktkpvxJIwIEblPgYPRIku1sDxZ4wnZ691SSQaGtUHY+nOwsZx1nIbbAIWx6 q9+d9WrBLqORXiYc97yLW9AFePp85IZhBfr78Zp/oOxoN2xDoXvPFaURxqdbDGXi 4h3rb4Y3VFuTvtUyLBXGbmJ7nBcKjMAKwXcsk5Ca8n1NcC5FKqrV+wRQ+7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635361; x=1782240161; 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=9KsZuK315wksrDsV4TkH3dSP++EyCXGeIlhzGwP0k1M=; b=LgpvApxhAQeVX4o3FWcbOYsTyNnkQSnf8wbVoJluAWMhT6FzY1zfqBQtTkKuxIxcYe yt4oJO6mvUS8ly0zEsk3Myb15pcW5KPJq9pFvKQBLTJyNuV+P0pL6af2LHN39LBctDNK Fgbvx1gWdGtB7Re/AnD0cE1II8FjPt7yl1q4rqMFP3TDA2RYG+Vv+ZHNWu/d8lAElGCx n5WYUJEU/DoOM1EY0vsZJdONnbw7Xo1e/Dwt8GPhO8npczQ9h+94Y2K4biUkizLEJVP3 E4UPbRebxZuFtyKHbQSG8gBeefiQQNKh5aQvnmri3BeT5YDFCXZbKEaTz+Bm9cFct7cL BBaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635361; x=1782240161; 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=9KsZuK315wksrDsV4TkH3dSP++EyCXGeIlhzGwP0k1M=; b=Ao5SDkr2zcv3CDD0HiOwQ7vcdAqLuRn1pB7oqOTkRG4caNQ4P7O0qqJZSFaz664WfK 0MahCBrj0m5SXnu3FQf0qwet4Y4anjwhyk/Dvax4W+r/pflDUVkmDJT9SaWKZT89aIlG K6lsgLOKcCfnwf1hyQCz87ZfdnTO7YMb5GN164St91ThkcWrWGGm/iJHd+UU6ytnMw/M /ip8fbKwqSdGO0aIhH5fMFYklR1m33fq+kfSQmjHm7t4PilKJozrnsLMb7jSrd5yfJSf YOHLFlx+UkJgt0XOpl4AuDoW8qA/bCQXI4Jpz7PsfsADlZIneqBQxXbBXgmxFgf/ajxN 79aw== X-Gm-Message-State: AOJu0Yz7V+pVhlAEIfaxM2D08cu6h3cCcKTaNd4ikbWnufG1+Mzilwl3 ToJtRhMepiGdWBqBClmuZuWD7eAmh9JjLXVZ8n9Z1jtfTD9q4T+wCwpzWu4TS/h9LB8CPv3DHBL aflRWsMCqq9rHx7O+BYJwN7pBKoCi707+ZL8xJwavCVHOPi0eKEX/ckJoghzFxjRBzWor X-Gm-Gg: Acq92OH0SVyqtGEK4pC49JQ1gzNLImwygbyYj5FOk2zAi669zmC+u2bEfUc3wuZ1NZb YWpFMmeQ18WKmdN6txD6h5Kd2aB94KlJFi3Xs4DYQNi7cGLarhZagbx9Ybm4Ze9QBPIBhJRkH6w Xd9TX3eDC21QmbBLxJUv9OMrELV7wWiehhnHXvlIEVE7KmLvXZZb57khH8b+wVZseXa8a3LIUZr BbvdjM1EjeGYT/8xx2j7KHKiaD7Pkw9ugBwmNoLBvjSuPLEQ8cV1NYCqeQsSF5bpit3BZMoL4Vg hl60R5IEodryrkYFq2IZ8uR/WfvrLHgw3Y8vU5MUB8mYXII87e5fs21+BDXMcl6GOBeRL3zo6Wg 8b6Jwpe6ZTF2tQ6Q9HZ5Z+J8Hz+4ZlJY6/PdDxUlVrVbyQc80NdFlKhyTgvEL86MB3mjQWAH+yN qTdDPtago= X-Received: by 2002:a05:6a00:99e:b0:837:e9cc:d465 with SMTP id d2e1a72fcca58-845244b2f2dmr375993b3a.20.1781635360839; Tue, 16 Jun 2026 11:42:40 -0700 (PDT) X-Received: by 2002:a05:6a00:99e:b0:837:e9cc:d465 with SMTP id d2e1a72fcca58-845244b2f2dmr375969b3a.20.1781635360402; Tue, 16 Jun 2026 11:42:40 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 04/26] plugins: remove type qemu_plugin_simple_cb_t Date: Tue, 16 Jun 2026 11:42:08 -0700 Message-ID: <20260616184230.303038-5-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX6cLHx0TbmoX9 tN4e9VWdzxHAupUYuoWiYSS7FdGFGtWbsEPoL4X2R3A673b0FkZH+4s6vhDcF5jxS27Crg4+pu7 4/UGh3LzzJXQrHIA1xWf1qajH9YybUAg8Dk5wj9YqllRRalT6onQn6LeX10k8YSS3yYbZXM5nDz YCjjg3F5CIsKt8hmxH0CL/JscYomUmZxJYLO14iGp+dxBpsbK640Y+8+iyn2sqty/uEk7PhI1nt RYG//aKQdhHk4/ON8+LB72mFHDbUA+gj0V5x1tjjgNM6WvWrvJwdCeClxVxCi14rv9VJWSj7F/O Oc3uvft+ZkAdHxW68yRLjfIwdZudndqnD1EU2Heh9G0w6m+PUtkBG2UePSQRoY9ib3C1bupXIES OCoZU5zf01Ccpk13uVbRRdFhHIAZDrnbWuWgccnPy3sHcui52q72NYoXXhGO+KZvNe91E321uyN SvizrP3uP2p+1VrvGiQ== X-Proofpoint-ORIG-GUID: sm35z-DAscIU0N44xy-3daxl7AOkJ7k0 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX9LyDhTodWwWr fySoR1Eu/LsjxnglX/+8C3sQBdClDmMBWYyny+3DH2pJ++TIQSnstk0fjN0nCnXwXBOgKOEHKWb nSAwfu7dvioYCCFuE2Q1fMLDBlOvsLI= X-Authority-Analysis: v=2.4 cv=DLa/JSNb c=1 sm=1 tr=0 ts=6a319921 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=v0NQEDj6idUmN-g72lQA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: sm35z-DAscIU0N44xy-3daxl7AOkJ7k0 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635502754158500 Content-Type: text/plain; charset="utf-8" We removed all usage of this type, it can now be removed. Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-5-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635485; cv=none; d=zohomail.com; s=zohoarc; b=ACqpi2dBOXp+V6UG8ZOP0CDK55atryhhTd/wgQgMmydRo9bK2YbOCVi6A/DCtUqhrRqkkYWhKDq4rdMBInoV7mEgiwpkYXOp0YjEFG0xGkyxth3hOKr1ZVSvdhO70y7h3yWIKz4zxCKViwvOnZQLia68swH7Ag9Z6p0sYrgp7/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635485; 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=PX/rpaHMj9/qd0WGLy9thaP/IS2BsToKnUoZpNAHyrs=; b=fQ+BjSVoWR4bpKfd89GE7HfHci+UdBiPhVO0NrqvDd7AD5k4woJqkVI+8OHVX7w99INk6bp+GxsguGS5SbWmqC3nhshnsZg6AwDROkgSvNwjhlAxATnnmG4GTuoAlF4QtlHuwMj4WIb/Plgg4tAQa+qWy5zeK7LN2NAlrrgWTyM= 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 178163548577963.67774288134319; Tue, 16 Jun 2026 11:44:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkS-0004QO-Gf; Tue, 16 Jun 2026 14:42:56 -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 1wZYkL-0004NR-5D for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 1wZYkG-0000Oy-Hm for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 65GIOcYo303316 for ; Tue, 16 Jun 2026 18:42:43 GMT Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7ck-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:43 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8425a9979e1so3208871b3a.2 for ; Tue, 16 Jun 2026 11:42:43 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=PX/rpaHMj9/ qd0WGLy9thaP/IS2BsToKnUoZpNAHyrs=; b=DbD8zhlgmnLHnUCvEZR5QikWbXL K77wPCfxSFy4nKfUTB/S8i+W1gkwOM5ux9aty/2mdmTgEJYcOYuvEx5gfDRnv2HE HimzZZrFje84JWXSGCLD8uNsR3Q3tdIIVYJ1DUPcuRlL6q4fRRP26ZPiEKYufzrY r56emsX+DqyKo9L9CdIItVvgspA/BuJ9rTcgZvYYOEFOW7zZ9ybp1yEEfsuD1aFv GP/WEYUoxptUx3FoBBJfEfdQhi5dBtEqh++nGfpQISL7V/PVVExbdFN6TjUeUpfN K64xyYpGhqnEtHhIG2s7Xe8pObPtYBOJ3har331mIevR7rNneGKdrWfcYxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635362; x=1782240162; 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=PX/rpaHMj9/qd0WGLy9thaP/IS2BsToKnUoZpNAHyrs=; b=USuypfKc6370Tncby39rJzGm/18T0sxfOPplcrEqVJxvGUKGZQjNhwAC7UUrrA17iH NbBMfoHDBYFLm2eGbDsOYCE/adXaICT7r68Igl+/s6eDf36tjyh3VasoRj+KYA0VTq2u 6Gph9cV0cwYgXz7A0a3iIBXDco9HynXKSeu0P37bsBh5Vvl7zSCXspoaCV+qLlgtjG6X uUCWoccGw1KZHu1uLJCbaEaBvFb29v/f7UTnsr8oGPyoizMCvS1b9kZl5MqLPMH1zndD l+MR1A1bjQ5k6/hJpe2bW2ZCOVOahSvC7rmBs9IvqPH80k/urRSw/nvxAMAEaakj0YKD W7mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635362; x=1782240162; 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=PX/rpaHMj9/qd0WGLy9thaP/IS2BsToKnUoZpNAHyrs=; b=pp60D2CYG29otOpGHUYYuebCLx389oXV28A5hRSPBqIY+PGP58zjtDlvI2h+W9lcvi QWYz8XwxxrDdes6e1gvW5kzN24Uh2ldgF+fN6FALC7hcnU4a5m+6y4czVBqRlugSmszN gtBxfXVNYY3S88b4OQtbPM9tTeMpiBGS3crFafZq/jVBdEPS8uM1MA3Am2sFSTsUTN6k mTkERn+jnT2+BV/lRqf1Cjh61gs/zIukI2QRQU2V92P22hcboxVRl8F51CDS914uUvL7 FpjXShYBJZ6IV5V3xzdhH26fviG9NndOkDXPcVfo5S3/a3pkltUR5QXNLvsriyZl+678 GrQg== X-Gm-Message-State: AOJu0Ywy/E/t2EVF1grvrBwZ2x7lCcoIZ/EnNsjy8TC+h+tcQbbp/y5a R0CPjkUgFyzvcUbglRk5SIyZTji/4Ylb5OmvABH61rhfac4SmbRzmI9ss4PCIm0y4lQLgTd2VwU Wb1mbWr6OJxBnwhqGc43CQHidXJJJlQS527wqTbZldJQYJZmvFO8Gn08UP+bz5K+8JwLD X-Gm-Gg: Acq92OFh3JLPaq6msJ47Ifz+s7ixGIP3rR0aemUxgGRQPTBFXHorHlf6itkwH7PGkY/ Cl4pn0den227xtFfWUWnZ+LexupkdkVoaH1cnA3H7EM4dqafP9uuRRmO5Oxa+TrqhpiEJdfRA9e achA+vfD9etv/+oavG+ssDGTlnQojcmOl+rXBD0007FOqy01hE6T5P+N11bonNAFQVX0FgPkoW7 Phfn/0WYoaZxXOVIZ9mwfT6MX7dxzvgpPr+KuAvbFGFTwTDw9VfmH1+epq7THtTKQlQHU5uDfKG b/dS1oOrtbOYN44Weq/651YJtkees5/mcgtRPnA7RuVegUdADMmEoxtwBYSmUMALeCnYogAkWQo OU6CMukYuOBhQIWezJWLtPbYtYVPtYs6c20AnR/kOM94hUlNG9grPPGFkKGji6EdyZX9RR1F67V Oz+RM2yN8= X-Received: by 2002:a05:6a00:2e02:b0:842:2f09:fde9 with SMTP id d2e1a72fcca58-8452441cf31mr372874b3a.8.1781635362105; Tue, 16 Jun 2026 11:42:42 -0700 (PDT) X-Received: by 2002:a05:6a00:2e02:b0:842:2f09:fde9 with SMTP id d2e1a72fcca58-8452441cf31mr372842b3a.8.1781635361541; Tue, 16 Jun 2026 11:42:41 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 05/26] plugins: remove qemu_plugin_id_t from qemu_plugin_udata_cb_t Date: Tue, 16 Jun 2026 11:42:09 -0700 Message-ID: <20260616184230.303038-6-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a319923 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=fy20bCZK_bgFVnb4qsoA:9 a=2VI0MkxyNR6bbpdq8BZq:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXxmU55csh0/ne R4uytK/8VF1O0AzezWOBrQ7Dz+P9lPD/p+TiNcKbRCQegiRQIG03/B8fYVAYKiphZGfvONscZoF aZJhWgNISoY3p6IF8KjHRyKLo1Pp704= X-Proofpoint-ORIG-GUID: o25d9EHTfj6IBafxXtosZhg5b-wvXojC X-Proofpoint-GUID: o25d9EHTfj6IBafxXtosZhg5b-wvXojC X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX8mNfl3HrSU5f 2BXmz7d2jCsMdnfncgPOrd93zmR9orrASb3t+4sIs5YcuzWZAEkgPyK9puyU4LKAcIn+Ud7ajlJ 2XWxD2tSA6WIS58Dcl9FR+I9xwMIiWB5qhHve0c/vyTvF/i/sCqXz0N08Q3JssQRoYDcEYBZZPc LtkOummYJ0PLJtt5sHUxjOkYYJ43KQbFTR00NY4F9CT8+6FirOm0Co/bXavy5qcq4l/1/7Iq3gq 07Amevb7UjN9b5KjbGwaNIqTj6CCrQffUkmwAf6MzWiitkWtlWPDi9pFDbzO6UGeOT6ESbuXVBP n7GYwLmM5u4t8oHmtWAD3+o4r7DiRVAaiu8c5QFzS6BC0o+/YtmCPd8uLGYXQCWMyoQuvzhqmWj AOT9oLXgY3mrxEjjkMi/X5+/be5kcOSS3ID41FClMXiPMtYvgBAT77X3kK8oTRcmIVModrxXxiT /xifIIygtAQTUb0LRyA== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635486663158500 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 Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-6-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635459; cv=none; d=zohomail.com; s=zohoarc; b=cPXya3mGll5tv6ogrg9FRqxDvflZLbvbbmM2Cu0mPJ7Cmjd4KGpwbRzso8GACugNwQpwJesWyVNhAmGmWNjZ5MaHtNeLZl3EkxeDfRx88QvO4ifa5pk1YSH64oL5WyQVsI3xedYu56NEUJE8puRV0lNWd96/0eaIJN4HwBROfMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635459; 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=rPVwjtVca0IUqr1xxj08PFOVLRyMwM1JDFtLV3mq9TQ=; b=hDf/CqJ10cqzRIic/xWSiVmXq9/ytpGANz2UTMhP26H7ZuOAx4ueVS+sE4N/p4In2FNRPBHunR7QV0m0htSKz5hsUBYwe9gpSmsG1xswEQKZdnXB/zy435JhvOjciCR6Kr3Qan8xrFflqrincf2wLJ7jCzjpwj4KjJJX8mYat08= 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 1781635459676601.8541519689155; Tue, 16 Jun 2026 11:44:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkR-0004OG-En; Tue, 16 Jun 2026 14:42:55 -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 1wZYkL-0004NS-6u for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 1wZYkG-0000PF-Rl for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 65GIOYhv303248 for ; Tue, 16 Jun 2026 18:42:44 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7cm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:43 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-842446a3851so2565460b3a.0 for ; Tue, 16 Jun 2026 11:42:43 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:41 -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= rPVwjtVca0IUqr1xxj08PFOVLRyMwM1JDFtLV3mq9TQ=; b=oMBfg14GWfYkrXyf WWiHIW/5S7NzsiDGzQRtxL2McvLw4T8WfI6KB/foR2UQ00VP/j3crVzKWvd1RyLR gMMnKYp36/k5P2Ds1T6x5g6jEOT7hCFyMmBsvNi5684bHU+sQnzhnsRghl1qBnZC qGsYsFXYgHG6+ZHPteA5wkUnZ/JmRt+KVsXCJzVgpH0XfDOZQmqJ3ndi2x2vjU/F DK1FpKdBqmEXBW8ZtmVGp3trrPWO0RWl0UEdGVngvDhYSXNpy11VvtzuVQxfFk0D 2U95pKLoOIZwV0KoDZsRvHUUbAV2bvrIAFxgT4ljYqGidBHLLu3IJqM3a9/rjk6H +Bcz1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635363; x=1782240163; 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=rPVwjtVca0IUqr1xxj08PFOVLRyMwM1JDFtLV3mq9TQ=; b=EdrYp/5me1xYRORvyGWzI28HxMpCbULxiK6bOE9w4l744AwNTlsUpEC2vtGGvot78Y K5kCn1SGDbIx6pBMn+9n691Z4WVc2gcojh+oXbzpcfL9xFON1sIHiwMs3bXuF3nAo6G6 9BE6OQiR4qrQ3hRLMBxr0Opy8ULTu9NUxQY0jD64xUaLzXrOMLriBIytpStgCnYhW1Sh ApNfd2jSbKWYGDv9DeILYDQ3eyfIfePMl8+Elqi/rYUZHO0bwGAvqS1deokj4QG7rSei +9yDXK3ia43rzbVR1DVveNs8/A167ptbwvorha1JxK5KT4+CmPusoZJMHC53ulNiy40b oXRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635363; x=1782240163; 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=rPVwjtVca0IUqr1xxj08PFOVLRyMwM1JDFtLV3mq9TQ=; b=CVvKWyEXnRxoIRYtpAphKUYDL6CQ2xAsGNO8ZyqgupaF5ippYHE8ZvNnBFo0AHiFTA dGciNRlFseC2nheMbKoSWu0bYXrDR2COJjcOD5lWSr+mtGYUkCJ33Pj2sw5W3YrSN/Tp JVuDDTrArBTfAH8nzHcf89FqrL5p1VPeHqyuGNCBWgrq57ock6b9KUhypj/7nfUmHDVk ueSO7AMPUKyZIc60FqtOJc1F4ph9YzPLAjm873E1edTkNAqlg7/mnRdzsLPQHno1Xx5/ wumNCEVtUW0GP2rz1ijzWNbk6GiIFrYoaujTGoBjt7LTq7h7TUZQ5OFquskp/MSBLy3u n/EA== X-Gm-Message-State: AOJu0YzWdwYnImEm8k9GiTq1daCZKSPfXP9AkBCJorxZzWQaARNg6a5h 5Q9xQr5wnL//KPYNXaWDA9dKjCLSOa/sPXlItq429pG/jM5IhbymmGzRXq5xD0yxM9zKC0zQ4M0 tqSr2m1evRPrq29kf5V5sKqveYywwgD3NTKrCxc+ywWJfU1cYZDnYK4GaN2niFDgCJc1j X-Gm-Gg: Acq92OG7egOZKDC7JSywwgq2abYwD7z+1fP7JCveGooUrxwcFlhcE45SdIkOuWbpeh/ uCUQamhDr+8eVbvim/lHMg+GRQggJbpySWP3wYyBHJnQ0kVU5fPfW4RG42o2qzlpzb3ZMjvowxm FyASYmozfyHEsWAVgOeTJ6Blo/VLHLk3tsvABubr76l+PH+oezzgq4Vs0fzRVc6noBu732a+7Mp xHf5GUzkkU1Tpy30/aamVCb4vzIXp7PI5mF+o/zU0tlOhmg53WCoFl7F/WNO7NN/0ttRNXO2SlW NEGFnlbAFC1aKAN2f2YT91SQ4tU1MXxX0+lZRN204Xtgq6YAWNW3T2nXOG6dRmqqFKFM//ta7lQ bUuIJw0FxVKNlu48RlpGO92eDO4F5YDxj2etbU5NswFc8ewcj92qxu0N7LJWMA/LdU0G4lxDh15 LWFWEkrHM= X-Received: by 2002:a05:6a00:909f:b0:842:6ec3:2359 with SMTP id d2e1a72fcca58-845245a009dmr298962b3a.45.1781635362689; Tue, 16 Jun 2026 11:42:42 -0700 (PDT) X-Received: by 2002:a05:6a00:909f:b0:842:6ec3:2359 with SMTP id d2e1a72fcca58-845245a009dmr298939b3a.45.1781635362248; Tue, 16 Jun 2026 11:42:42 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 06/26] plugins: remove qemu_plugin_id_t from qemu_plugin_vcpu_simple_cb_t Date: Tue, 16 Jun 2026 11:42:10 -0700 Message-ID: <20260616184230.303038-7-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a319923 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=mDV3o1hIAAAA:8 a=KKAkSRfTAAAA:8 a=rXe6YV4CopgQa2I4tT4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=IoOABgeZipijB_acs4fv:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX3X1YlsJI+Pda NcLkZ1WRRzNk+fszBdX1TYgtSQ/qPVqofXLZARbIjLgswcKlv9pmARCCveDFlvEbrOu9JZn83QW YlP6u1tXMDrapA4rbf6HQfjz2NGBvJg= X-Proofpoint-ORIG-GUID: qaB-gLdpWzzZX_gN8ga8jBkY-4_uhDij X-Proofpoint-GUID: qaB-gLdpWzzZX_gN8ga8jBkY-4_uhDij X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX1oIP6W+v3CDs CMCilwegbXVp2TIr5N3dZ5c60zpRU0Maa+9vO5LLRwnDTbAANYYwe4BFTWqvu4XsNloJvUvoDjR v4sLYKhEfBraObzvw4JlGxXrr+1C6H95OAgrT9vqlvAFAexMKO2Lul2h9jgMMZAvJf1IBcbahgl ygbNG9Y1kuetdUDzXubdV2c6STzEIool/OYNVdTgOezVUohSGH40XigEtJDlQ8CIIoO9yIOSHhM MAv2iJ0zn86I2y+iuNsU8BCw8djyoKqncX/C54zMVIkGgjfYBR71zy6mopRQSdJcEj0tc2UR4/x 3b4rBwzPpQyh7hf0CcNRqPbWGqOE6uDmi8UkfWykvqSkM1RpVd6gxtabMf8h3G4gnASTxUUgJFC rFgvl22QItuUkySXpRbCuHiSHgmVppW57i4zK1ihaszxmUGVIiwR+LrTXDz6VqeM3Pvxx9H8jB3 PLek50QTlQDrUO7ToeQ== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635460606158500 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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-7-pierrick.= bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier --- 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635420; cv=none; d=zohomail.com; s=zohoarc; b=WSfiOR2mb207m7LScQpHk41PVWBeKKCPh1B+QshccO3/3JL2EIHALYZTe7P4dfjweC4sk5nr+Elddl2D68DhkIewFo/nGF3Sij3theUO0HBeF91IB9nGLzglxthNUxTl1+Sxe4a7c/0ZEyCwafjbamYV+vjhHlyYiaG6oaoVDfM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635420; 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=84ZdvV/U3s5tJFqOMewo0p+lYTVRy/VnXo056yaqK5Y=; b=MuSkJHT3z/vkqy1bEBbsDc8BY7wDIcPnlOvpwRUdiOwWjUGcnUxJ8o8SmTSoniv5qfjzE6Y8WlZGlpmhJYmBXZ/x2MGTsBJEPIkPKA1lTgPUv6kVmdy9PnQWns/7m1aJLaWRT76HAt+IqPbdDNWZtK4sny4/qR8oBjCwBSPElj0= 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 1781635420583701.01775101829; Tue, 16 Jun 2026 11:43:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkO-0004O8-81; Tue, 16 Jun 2026 14:42: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 1wZYkL-0004NT-85 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 1wZYkH-0000Pa-KQ for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:48 -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 65GIOYSs331236 for ; Tue, 16 Jun 2026 18:42:44 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09gbks2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:44 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-842692bf60aso6294098b3a.1 for ; Tue, 16 Jun 2026 11:42:44 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:42 -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=84ZdvV/U3s5 tJFqOMewo0p+lYTVRy/VnXo056yaqK5Y=; b=oaS+yRwi34lvxRcYazGl/qBXYLQ bT6wlAQL1uG4tvG8M6nKilcwlCc6Ew+9qPq7bS9FKxX6daYk2aZp5xREXtTL55rx uZhCrwBv66twnsukrqU0nJRPDivk7XzxruHBQE6oftmaPHCWMDGcSpSqU3jDHrOO WqsZQF0DM3siXa/OQDF1n3aBDZ5qlzcU5pGz0tZ2t9taGMtRo7t44g32EC4b/m78 ioYUfO+siZBDO/2Wm69MTGkE9ohgjpbh6EDoLUul4ypQw4VwzfdCog07KaV5smdn GT58M6w7zaqelws32AGdcY/ZJonGWDXGOuq4VWAJQVomdA/TtrmglCQF1zg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635364; x=1782240164; 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=84ZdvV/U3s5tJFqOMewo0p+lYTVRy/VnXo056yaqK5Y=; b=hPXfF9UfbbRBC4q2MvZ2FURDYwQaxgJHLv/VjRocwmafcT4/sNd0FsVwQagEAfuT5n qY67UtITp8F4Uxi8DGBMav3PUx9xlWJx814ZcLG8A99ssrMBCLqi/35+lZgky5+g0IeY J0SB9zc0qId2E606MXeDw9OxqwOXR43v+5o0UG4h178Tm2eN01PQBUccTFaJi88wdo9l qXCpAJmikUxUverE10aEUpxKotVPjNlVQlt8u8DNptT0nht7R4tv9Zgli5v5bPcnevZK LcePd6HPaDP6wxZwsIGl6qpjQSRR/cuku2gSksI8tH7NmFJThqBvFENqPWJRhdHOcYO2 KSdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635364; x=1782240164; 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=84ZdvV/U3s5tJFqOMewo0p+lYTVRy/VnXo056yaqK5Y=; b=VOIMyWvlILlgavDLTLw4y8HSDy+lLCGqyumP8F5ILNv+m71TpTO07x6NzaMUHqyYDy 7LLzDVBrHwKVnLKdvL5EG3jeJFnWZjJxs8GEiK40J7mkG0c9kPHyq8y1HjcLNCXhNnlM K9JGE21StVVZOl0IdfsxfUs0Fi6BNQHGCh7JvynfQy2DJ+RmilyjnsYfYslzklPgQoIV v+F7ZxZL8ShrD0cnw7MTWvl3lx9bJRcGZuGHyB/p0l+j1FuP5hOs1ttU3xJ3OD6STLT+ lDH7rZi1PItfDitYhHLemejQu73yeOc4vllt5H4Scu7Tk1qC1SjVDPAwE9P0VSbABMxa Wqmg== X-Gm-Message-State: AOJu0YyZZaRoYI9wrf9RaVxydu/lwNC3bP9EMO+AU0XFnjvLPt82jL9v uJesu2ZOezQuELUBApKHqy4gODWxhYLSa277MlDDk1mu9gi/ahNgnGblB511AydfPG3c6AbJ+Dq 5FTa+/NLN9jiJbq3sjsRFsSWaG+reoYrCrSa6AzIFl060NX3MQPsnkNQA3VGFkBMKHtIh X-Gm-Gg: Acq92OELRe0GdmKFasrEbQDKm1UUkw7LUSUejbEnMWGQlfp+nnNY2zfS8+Zx71RLPzg 2S1XT39GNG1Lie4WgeCCor0bAyvfSPor7yr6tXlVz1kHUD0npDvmXO7az0iKv4tKi7sYiN7GAZc NuhyNGAv4LlPQ3gJrKu9xUIlyWECAkpHd/xQt++zPhWonNE/zMfTiiXYe5kAh8he+MgS87j9uWx cK60sydp2uTGf+702BNNYsHCLzecWr75BTTYjcnd76SX1p1VGyqalAzwKc4ln1w9Q5lb4YFBE0j 8+lHJSoPfyeQkoORAmSS8glPk90AYE73p28g0TL+nM1t7Es/O70g4/aluxVN4SDi7MaevmmI63R S/KTjmgS+O4q64BBnIhLAWPmhYOxsL3ZYU7ZGmehk9vztpDtAptGa+QFAUGl7ArfqLNYujaKt8L HuVbd5b0o= X-Received: by 2002:a05:6a00:3c8c:b0:82c:b808:4c59 with SMTP id d2e1a72fcca58-845247c7141mr317864b3a.46.1781635363556; Tue, 16 Jun 2026 11:42:43 -0700 (PDT) X-Received: by 2002:a05:6a00:3c8c:b0:82c:b808:4c59 with SMTP id d2e1a72fcca58-845247c7141mr317840b3a.46.1781635362965; Tue, 16 Jun 2026 11:42:42 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 07/26] plugins: add userdata to qemu_plugin_register_vcpu_init_cb Date: Tue, 16 Jun 2026 11:42:11 -0700 Message-ID: <20260616184230.303038-8-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXy5hTzGD8YetO lfulTFCVEAAruJ3qqfnwbCk7JqmtKP4nmkEFt3+A3+V/xUG+8/pUAT0/KeNNH0G2DRjPFqKujrk GfXW4a1Ec25+V2i6l8rOR4DRiuhH3SckZwBNh5tfvhvp1A0OKqbeM8tuX7O6SFy/xv2ko0PlIQe BnD4TBuGZHiFkvU2XCoO31E36Yv1yXQsWHhJBc7QRVdsI/ELYaRzxe8F595F4JnmgqUTtYUT96x v421V0YltR5P3dJ1PIBZYSv79PlcXLSbVpd4oWHWDIQeUVkFB/w/KeV+2Th4CUAwhnTZCZW+b5X XZJbWMqBWn+ucm8uaufTIhG81TveE1/AZRNtj22A8ePWHtj+M1zDtvXWuwqIdcTvE5VAcR4n8Jh N9ydR+Re3ErDp4y+zv6DIi4neDOxgRf/Gq1IkhmDSehc4+KYsfkEamrRlHIUxYaQ1xyeAIUM6YD 2WkxrBiPx5h+iljAjgA== X-Proofpoint-ORIG-GUID: QmXDV-ovY275BZspm6QG21TFLOoHSvc2 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX+NMLgOPy2F3Y s5b3UsSXm71q3oB/UbtT/fMMq2yXxodnMwcG2cOiWG3RO939FdXAvtXf4qNX44TxsRcWWJKOHLQ TZp/Cq1mXWIrM8wTo0dIz/AHOZ1mlGI= X-Authority-Analysis: v=2.4 cv=DLa/JSNb c=1 sm=1 tr=0 ts=6a319924 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=mDV3o1hIAAAA:8 a=KKAkSRfTAAAA:8 a=g9HC7tbVjW3t9h3uCicA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: QmXDV-ovY275BZspm6QG21TFLOoHSvc2 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635422492158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-8-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635538; cv=none; d=zohomail.com; s=zohoarc; b=mAZW3h31YCadbldcAuJHS3pmTSSWrcWjv+0od1CWjA08NSk3mkEa0XfmsbzRBZUlb4+2Fskxx9u6RHXKNUs9Fpgi4LsvWQaW5wtJL6YvdFk/k2vlleBioGlIHwkxTp4wRoC1durXXGvLWFE8TIZIurUc0Dd8H1ZNT/3iRQKbuGE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635538; 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=p/FeWc9woaaModnQ0FQdUq35NUyOgS03oizq9HTmyF8=; b=CECXVWkTXfrjX1noTdDli2SReyAitnlKzIsFnYKetM0uJHEauWoiSyiVtgQJyoWlund+IbnCqFx6smns8tSpRxmogEMEaje52C9/GTE7DqJrcUEokLMe9NXK1UuHxB5gk9TlByX+2suKDsRFOK15Dl6i3jOaeW/c8UJ0pcnn7/8= 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 1781635538009262.7430581663259; Tue, 16 Jun 2026 11:45:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkU-0004SI-8n; Tue, 16 Jun 2026 14:42:58 -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 1wZYkM-0004Ni-Os for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 1wZYkJ-0000Pe-0n for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:50 -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 65GIOtc0172554 for ; Tue, 16 Jun 2026 18:42:45 GMT Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09kbhw8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:45 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-84240b58211so3275018b3a.1 for ; Tue, 16 Jun 2026 11:42:45 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=p/FeWc9woaa ModnQ0FQdUq35NUyOgS03oizq9HTmyF8=; b=laFoVPJZNX5IISkhjREKa3E7YgQ H7PO2pPFPN/rScw5F0XBkfCt/D+KwGxjgMnvK9RTc/dRLKwa2BdXpIXRPqPCoJ0S cD9WQHZP0JBbl1luL3GDey1deCsceD3UZ5Tj2kEehoF6Ef9lBmQS0Icd0iq7UPUK qo7yb1hdTTqpxe6ccfZCDTGNkkecxLjvrKj750lT9u1SNKbzEtYOggofBLHHHIR8 oXbRUBqTEo19maCwi3rTAcGnpHexa6eZuOOjxbbO1Z1o9vyCV9rpuVtGgL2JOYJ9 9x8mEcj0IdMib2BL0C2UzXYZiZteWas63RhPmWCDuJlJnk3nnR6/dkPunaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635365; x=1782240165; 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=p/FeWc9woaaModnQ0FQdUq35NUyOgS03oizq9HTmyF8=; b=PnAUA7xhwTxfiIRnCfQcXhp6jM4mDpLSaKyKMFJRScGmfXT73wIuTlsvcEwDRu2Dtc /Hf/Wy2kwvEy2CISWrEDha7v4fOcs+H6I5tYkr2j3+6uY6fANGnWyJ2//cyhFYqM8KyD MSFg0PzbvnkTnGWn7VJEc2YEAjPCiGmwOcQAzEYKco2hgmZGC06SN3yRyLJ908v90C5N xi/3G2/ywdGtONwA2d6JwvLQcxTes8B5JZ1UEr1/a/PcrQinHGyS1PZxN5whoSWEtW1I 23qKaT9V1Z8u8nwtSYV71gV5i7Hi+8cuImOVe4O+EtaHikTC8YP8ypGdk6NhehIKIBCa nOmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635365; x=1782240165; 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=p/FeWc9woaaModnQ0FQdUq35NUyOgS03oizq9HTmyF8=; b=MfuX8ssDSrP3RRG9sWYY4DNWcAUNzYVT7M32o0mHX2aZWlfBxQlzSfpgxnE1VtirNJ nVEXNpMy1KE9K1hPs7awGZg4Lte/F4NkV0EtOOXtodSNeLxGSU8Z5zvjNkaWL1SxCyya VB3hpz+HxFRUWk0uRC5eRiUHd+FPBjnjo0Hkg4HZoCURBNDA6IjfQuMiWGclpl7ClLcC XihRkVCKgzM+2+LCKyTfuIF69TPyE80DnT+9r4XdM5KLsIWDD602a5JGokpQ+ctsQYnc yfpjDDY+2PKuXIt+J+kkEOc/DJz4jota55Gla+eNmmy9sAW4pbck27J1qZyz3APQ4nuT 33ww== X-Gm-Message-State: AOJu0Yz13I6lvfJysfzmu9DZvO95xGPmjSNdmBsA5cFtjs/99vJHG1Iw S1a4EErfXyyx8qx7LaJ2nVqzYZrAXXOLB8kj3KtVzHLm0REkmpId/BiB5gccAaugpZjJMib5K34 F6NB7/p6b/XQGydNstbI9DhTPI62EbdkTYVVIntx7YBcK6HSoGQ+TX2dawDG9tvgMooPE X-Gm-Gg: Acq92OHr4PD60j6+EG2XR02b2H6TiDFz5EVOW4AtlfC/spyJuVlK1XUy11EVHkm53qU kVyfZsJmYuT+XK8C0zFNFmnYhkU7hk+zQ3nRNXYZBXJdAcueWommBZz8q1iIt35qIinMmnH29d7 DkaVH/itrwjxDpGilm8SAGIpfd8IYyeAOmm1T5u9yZm1LtgP61sMc1FY6XcE78IAaeWTQteIIHU v+EXQjNGxPZGdaSUyCDCyJGU2RUpgHHuPJ6EksRW1wVR5w+WhoLH2iB2VJ1GpwO1ilRhVbUoUne EhuN76ljTFxd3T9fFnctskeWws8gyIRhiGJP1aATcqhXHx5KDSEvk6wsKuEJlZzTezMVNxPikg8 jLBZ1drCaQ6xx6RALoE+X6LMW4uz30SfXlN4pxYTfIRdzI1Qvi9/legNAZsKgoWhvbC6fZzz1Ae VI0IbCt2c= X-Received: by 2002:a05:6a00:94ed:b0:842:21f0:5114 with SMTP id d2e1a72fcca58-845245659c2mr321476b3a.30.1781635364636; Tue, 16 Jun 2026 11:42:44 -0700 (PDT) X-Received: by 2002:a05:6a00:94ed:b0:842:21f0:5114 with SMTP id d2e1a72fcca58-845245659c2mr321456b3a.30.1781635364192; Tue, 16 Jun 2026 11:42:44 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 08/26] plugins: add userdata to qemu_plugin_register_vcpu_exit_cb Date: Tue, 16 Jun 2026 11:42:12 -0700 Message-ID: <20260616184230.303038-9-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0YxEYOTjg480 WcRF13ED8wsSF+SN5xp4hEDLLSI41sZKZsqO6PG3njBsNIJ/ytJDul/dREv52dZ9x6BU8DRridT CGoXMVlAdpGHXkjLd+Roh48nwUW2Afk= X-Proofpoint-GUID: 3z5yOEQANliZlLpJ2ijpWB9XYquxjawE X-Authority-Analysis: v=2.4 cv=DoZmPm/+ c=1 sm=1 tr=0 ts=6a319925 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=X8LPHkEh1HOtIop4kdcA:9 a=OpyuDcXvxspvyRM73sMx:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: 3z5yOEQANliZlLpJ2ijpWB9XYquxjawE X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0Bm8vaFsWGAb 74YTn5bCEK/WFhZnuyIDMF57tzkQeu+gtZEinY8qJndSgsywfqVeoCrqUjLX63i38bn+Bw5BtTq 0bY0tcGk1VMXPt82HO0G2CHTU/mHSm1jlPaOqdrd74Tl1QcCkAc8fZRDsTSa26YCGXSFiJSrq3+ kkYUqs8Yp1mfk1g351orLLpFa5sE/XKRL4sW7G72/QKkq0OeCurpTvNpNrYJBLi7Bf73apY1ne5 b947qr8ACgx2kOaF2dtOEMfQtAtHJ+zNbBxz3GuhKwLJTXT7wYGVDuu9/4Qj3g/cW0Td2uFOeFh qcmpHU1J2JdEjAd7cSDQeiPE+3aaEos4zLU8YuODztQHy27oaEfzA3h1K1qIBP5+Mwxe1DZiF7q p2lW82i3E5hpqLRl5wmhzzQ25znhQ5WkQOZJFGBSTjMQmjaHNaIuBJzEelvmmmhg9/NNmivnd87 L4GjzeS6bUn/q4AQ0eQ== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635539030158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-9-pierrick.= bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635420; cv=none; d=zohomail.com; s=zohoarc; b=B71H1/ayJgv+j2dssD4RX/+I1MxpIf0gk0hDBPOO3DA1WFDE/4ybT/wkqvCEtuGy0pqIH68EZeOupwU8zhsU6ofK3+2+lh4FXthUIDZ+baCdfxvzQP9YSzzmlDeS1wmvzkKhcjXwQFuAx9Rh4egAZFMYBeDCGWoDFA9r8K2b5fY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635420; 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=T0AI/4ltV/M6IjIrD/1NDSeYjjzrkIVk8AXpazMal88=; b=J4sFA/HCHXe6D0WcB7FlphtgjG1MGfXbGZoqnkjHLIVuoF49jc4xBXdkcL4iTyhGvXl0+n6Qbl8jTymjimVjwmW+Mct2+smEOS3yVorIt7rtDjB8IAHu3yKxuS5GtooQRoZ5smqbOnVi7qDaRagNoMUe6JKnSfVFOnDS07ossjU= 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 1781635420285287.79713209116414; Tue, 16 Jun 2026 11:43:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkY-0004Sk-FY; Tue, 16 Jun 2026 14:43:02 -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 1wZYkM-0004Nj-Py for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42: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 1wZYkK-0000Py-Rw for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:42:50 -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 65GIOtc1172554 for ; Tue, 16 Jun 2026 18:42:47 GMT Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09kbhwb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:46 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-84238e83851so3200243b3a.1 for ; Tue, 16 Jun 2026 11:42:46 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=T0AI/4ltV/M 6IjIrD/1NDSeYjjzrkIVk8AXpazMal88=; b=fk55qJnxlZXpdjMLoRmbNOET0qE EA/nlLj9XffomxFBztYD4Mp/Dv1gHuBvyrCyrFiJVm6ZGtjBTF437cKbinWV7/+F p38fCGcirzJZXnUBnX/SqizM3tpwgKLBvMhY5d3SFg7jxZtYF6JCJcqX0+JRM5GD yNcvEnmih8LaJQAQa2tRLQ3igwOvoBWV8iL1VgzK+xSAwmvtcOXj/9bZ9EsKwQMd Ean3u6QdyOmUEltxwMW6MvFTU/pAougQmbMfBzt+3beFYUN/Z+KNN64y0IDNBQaq oC1LTP6RxGTymLtctktZWeSvmmtL8Pozb2Ga3tb9n2lWYvRT2d56cbp25kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635366; x=1782240166; 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=T0AI/4ltV/M6IjIrD/1NDSeYjjzrkIVk8AXpazMal88=; b=eL7htVL07uL+3peS6brEk/zQSs7A95wlkKob+yhokPdjf+2ZHRVa1FxaI95TJwm22P bZrnF/0goaMBSBNcAdQ6pjvGGfDe7dLq7FLnxC3CYI8hrDMn/l3mgxYlCyZuPuegoMXn 6d3aCr1i/E8fB/QmYjPneuVKUBwcmtfmIvOO+tDd7ax6HbnRoA2JoQ5cFxSeEi/lhzcQ 44B+U6m0dQnyn6PbYXpS9wmVsXlpygJb4o5uAO960/8MiQyqxsSQ1LR2dVhNYFOUSQAT NN1g/QLE7YAWltVw2819OJYGMPT3Zpu7lPPAkxWE0JRxh9mRUKU4iFTAd5NKrYG0bzqP qX8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635366; x=1782240166; 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=T0AI/4ltV/M6IjIrD/1NDSeYjjzrkIVk8AXpazMal88=; b=eqGHcMYoZtFxG091JCGg7Frhl9JqbbSdvRydYhJEvTlrk5t9o/vrGXas5kqpjtwf0m n6eDxA3KxE+6h47su/3XEjPE4KaZ1CVplFvgjz4e3tWRZTVZvd4/b6fBNAPwp6Irnce6 R7Ze+xoqNQCzkHAk0LTXhqhy9ZooF/t0jMRl4gJh8ZxepEFfB/C+syXzzhgqMt1QX99Z y5O91eQgs1SzCkqz6J/Lkapo04HnHx7uYvrkyQmJi8FvPzEFek6NPF5TORwFPras8IMq eBDxR60Bsa384WWcqVcTffhaSV5gQge3d6OLGE+KHmKXobbefOkuhjnXJdk5omS8jIWg +5yw== X-Gm-Message-State: AOJu0YwWqdX6tKlzxwYGknARNo7h8kLzT3DtRaYnuWL50QN/SLJgu4xe HfEZPrM9N+cYFTckJHi0yQTnRW0QkQogQNn99z04L568aWMr9b/StgRdkxwoXe4v5NKkX4Y1sl2 CURqGlohFhZmBGG1mNFT36TL3jseKJqJbs1AoVoN5fumSQzDoLjJU6FnoTflhB/tc/Nvw X-Gm-Gg: Acq92OFgsf6krQkuuc9peOSupKZiSiIx9NUlZil7G61r79tFXxqxuL6+16vmqMLHqr3 KJOWjzBD49wRRxPKh1K2tNN34aGfgAiuraI0UFm8Ey/rckosu9Nq3X8m9LNRQl7il7nQet7ZLOY /oVVS/i365ebpju0KcYd5uiXSWRbm/fSN838W8H8Zz5cA+j/3ai8Wm/ZrqR+DAc4M66i0kh6+y0 y1A3zSIk3r4034EH19NPKQIwh2yy8DU5ogN34632xJbNHhTQWSjnEue2PWL5QylX1MGB6Bh/Xun wE9aRtQbw0xMQaH82dWxgg/DDT8B93Rd/kZHOqeN9tRXS/yfEuOuzcIkdya0Jvp1M4oxsLi0MyD vhFSp/W1tdw59LVt72zLU+Bg+VKO86mHqhgWjUBeS+j1rUVP06oS/NAGa7wtGLO30BN1f11+FD3 1qRKrH79Y= X-Received: by 2002:a05:6a00:10d5:b0:842:4a39:6047 with SMTP id d2e1a72fcca58-84524550f44mr308178b3a.29.1781635365945; Tue, 16 Jun 2026 11:42:45 -0700 (PDT) X-Received: by 2002:a05:6a00:10d5:b0:842:4a39:6047 with SMTP id d2e1a72fcca58-84524550f44mr308156b3a.29.1781635365505; Tue, 16 Jun 2026 11:42:45 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 09/26] plugins: add userdata to qemu_plugin_register_vcpu_idle_cb Date: Tue, 16 Jun 2026 11:42:13 -0700 Message-ID: <20260616184230.303038-10-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXzJuNH97PaVLL pIAU2WsoQsiFNbsnoVtJem47nQ/48P2HvrroNQ7sWXXeavMlv7u9Hf6d09tUIQQGFN82kmyKCvl CHeMeSWE6LfId/stv00E88sSrgZt7jU= X-Proofpoint-GUID: janmbJGbl_7rQLBbx2WolZXfJ6W13rhu X-Authority-Analysis: v=2.4 cv=DoZmPm/+ c=1 sm=1 tr=0 ts=6a319926 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=Kyn2b3o906tGi1FvqMoA:9 a=OpyuDcXvxspvyRM73sMx:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: janmbJGbl_7rQLBbx2WolZXfJ6W13rhu X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXz8GLjlbzDS1E Uweu4uc/S+PetoQ/JBtSq7aPN1NUVDjgCdQQKe9tI275naSZ6eQ/Gdp+Kd932FKSW8lzP/bDGOt y/4nx7K1RFpB5e4ZIb9hcG/itZ9W2D4/NwwD0oQEWlSzd25l9aVrOdTdo5k41bjWSbTQ/5k29eh 9XYU6k/bjqf7yq1pUMK2UemfuRlp16RnwGOPJ0TAxLXlF7g57CzPnxl3KL42oK8dgQOwOF1gda1 mgMdS0mlNxf0XAx78NAobmleplL/Ybxe6zrQRrHqL+z95Anbz4v4Zyh+eSSal/gtbvcrdyKocWf 53OasJukFSmEMjJijb2CC8lJyLjSG1DmrJhXotKbdkkaYF3nAfG5D98+PeQNmfFmIkMxmDpWCbV lvKZvlqTpfOKUIKcq1duAM/uVsxXOsuRDyvvd0wOrfFRXyk9ec1VqN6IYqzBxHLyNQN2oAsSay8 yhGeO6XhAQg0bhEyrWQ== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635422493158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-10-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635463; cv=none; d=zohomail.com; s=zohoarc; b=mDlKKCsT6eBfhE2Jq7Ze6YthWoIicEZnASJ0bKX8KZLNO/RIYv3LJxf2lE+fJVkZ20kTa1/m9cEHuoNyk2sRGTVuLMobQOL+vUDVI1eQ4U/x0q+m33wI48kyZRjMRf2ZsZyoxOsDvh6blgaAqPTCw1V2M9QgzPBFWX5FvBiYRHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635463; 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=XCp7wjMoPJEvUc0k6Et5EuPx3gYWSwbF1epVDK/IHxM=; b=kLAubsZqf15V5wGdpP5nNeQ+DNfYYXXbZWDl/E1+5gm4DkrFP8+eGHz83eaKOQ/etkQGgza4KCw4+tIeAy43Ox6RlkOUsZGj/8T/KdyxQUXIAbgy6lHQKKC5ddE1xt5xbKWzVQ+6quutlqEkB/ybYhx9ZT/dpCGsmXzrure27oc= 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 1781635463835390.7996981272844; Tue, 16 Jun 2026 11:44:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYka-0004U8-Gl; Tue, 16 Jun 2026 14:43:04 -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 1wZYkX-0004T5-RU for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:02 -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 1wZYkV-0000Q6-8S for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:01 -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 65GIOpRn172521 for ; Tue, 16 Jun 2026 18:42:48 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09kbhwe-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:48 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-842208d5b0eso3883639b3a.3 for ; Tue, 16 Jun 2026 11:42:48 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=XCp7wjMoPJE vUc0k6Et5EuPx3gYWSwbF1epVDK/IHxM=; b=BrDH9cNysEFfyLxnMij/2wXgyvl Sg5lfBYZrxbkl6N5ehPOBFgLguepLIjloZctsaDJ85b4+TS92xj5CYGsutObPOUx 5YrQF1tZwFGYgf5lFkndEjfkEtY5qKSLbqCQULtfuX2r2OJSRQi2HYTHi9ZgqvLN YKsWjfgaZvT+zXjwOZlgTS7PfR9w153aJj66E/givxWTtlgqDGSRccOCf7es7r7J j68mpR/VdGg72WtVmgwxiKEAyxlpoNNmpDHTpBH6/3yKz/0JD2Fww5E6EQCkjSW/ aD4Y/+2XyW2R97VZpX9QSG0Qj+Qo7QN7zWMP4fAamjXimCdwb4lMu+WG7nw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635367; x=1782240167; 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=XCp7wjMoPJEvUc0k6Et5EuPx3gYWSwbF1epVDK/IHxM=; b=h+QSUzcJ4IUHSQe7/urIQx+ytwlALcOOq9HJrySMoU/R9XlZvUHi4/qD5eg3lWBHT7 kNddRxuP36a/WL5vn/OtioUBNE2So4WcUAY/1afJcoCKX2MoeedhGzHRlzt1tp1N1Zy2 /BsU0dZoFOTDsVMVU3ON4iRrCl+Gk1/Ev01c3VFnQllhN38IZmmTqMXu6irlF+0HY2Ai PH6KdLIhH0ByM8TikkVLBxP+Sk2SeK9khOSw3j4feswnxBw/MM3TCSSebh4SWzMnUg+k QR0t8ZvKgZnGlLUZm1kB/7x6bpaOY/jNRbVTu7mjsmrh1wPX1qiN8vqUWpLj6JRXWFu2 C+oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635367; x=1782240167; 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=XCp7wjMoPJEvUc0k6Et5EuPx3gYWSwbF1epVDK/IHxM=; b=JS0Jl2K1vw0jU77me9CYnjhYry0nUQSCLUMWGftb825O3dUG8+rY2Pe7unab1oyBSn CLTZgIP/kIIvMBqgReXpXgG6mubS8UQVqKamy3WlAfoEk7FEeBwDJkBgAXGNqDOT0Rl6 l7godS6WGScFNdHOUsGoY4BrYRpWbyA0RqfrMrDUshI38TMbzX9P3MJBekiS+gtZy7eU IMlrdLHzH/i2mzvdjXoMYosHpEGGjoTUKMa3MERTu76HGakYcczjGDuUzjU1ykrG1FKL yKBqZNBljR/5CkTb6FKaaQ1eLRmrG8WI+88u8YUyfcwmse8JeTpfx3z6IXXYeU8Me7s6 TuNQ== X-Gm-Message-State: AOJu0YwruhPzaANTDupFl7nlYy0QlBA64bxo9A3yp/RDNsoHC25koTy0 Muwt28NjPtUD5MTXyv/yXN+DK4olq5CXKZ+HRywCJjlDM8vba1VSv2fK96d+Dr4ZFai5WuTLiKG tnhlHFxIsyrIgkIKBhvjkCOeZIU0MXch2mYOfd+okb92ig+WfOYe2yg704vQW0eD6kYNh X-Gm-Gg: Acq92OGw+yBqSLP2n25+UEI+MG/98oZEr0oa7KwztAkgssiMvx2gQYeNyNvNQb4iLVR 8q9jdAsqSYJ0GGkPcwga+uv6KqzZjEnHdafZ6PSkZSyYAQVsZ3A7ocMwe6kbp912xD5TbSDx+zW WIjG20enBFqNwKB927Wgewwc8vKV/sess1iWLwcsA2NgRlg5UIYnRZjDazcvIK2aEa3z6BsKQvL gWNtc+V1g12b6B2N54mgVsxWFWcOYotX7aljRCUbotyNHbRa6wCwy2Tc9P0RLNUUJOTJL7+fXVb yyn7Rk1FoCUGadLoOpndBdUBp3pBUiBr28sYEQigk0gtecXatauKTm/jMlzWgAX9kM80COdkd3m sSXtvcnJy8Wnq6enePv8ZQ8XGpvBrmZmAx5R+bhDYfXEj1cMKP/h9aIVpu0oN6qvxSx2Az4wM/K bq/ljoLWY= X-Received: by 2002:a05:6a00:2d25:b0:842:6f13:1461 with SMTP id d2e1a72fcca58-84524476bcdmr368294b3a.11.1781635367173; Tue, 16 Jun 2026 11:42:47 -0700 (PDT) X-Received: by 2002:a05:6a00:2d25:b0:842:6f13:1461 with SMTP id d2e1a72fcca58-84524476bcdmr368271b3a.11.1781635366680; Tue, 16 Jun 2026 11:42:46 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 10/26] plugins: add userdata to qemu_plugin_register_vcpu_resume_cb Date: Tue, 16 Jun 2026 11:42:14 -0700 Message-ID: <20260616184230.303038-11-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX+KhnpvriHBmi 78P2ySDbyAWXUyucXMKym1dI7rZ5ljkPl2KtqKr6+iJpevmPz5L7ajGovPNo70/o2nhQJfvLiT5 qhTYiS0KjLy28R4Qhdg9Plve4kCAjkA= X-Proofpoint-GUID: MhqQeW8msH0scOF-lwC0QMpxGL5Wv-_U X-Authority-Analysis: v=2.4 cv=DoZmPm/+ c=1 sm=1 tr=0 ts=6a319928 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=jbUUBHnpNWWeZ8W5LfIA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: MhqQeW8msH0scOF-lwC0QMpxGL5Wv-_U X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXxDI0t91OY/vT xyz9ArkcqF/hbHT8wWWA+sbmLii7Sz/9eBlnR1OCQP/atUrlT4/Zsd7FgyWoH5eyS5opempnLqR 9XlZJ+0s0uMsSBpLbtOEiUwFy47WlDA5eTTcQDMUD/OLxqiFJpc8KFui2DTHTsqC7uzC7j9/zif Xf3Vzsj3JM1dfwDyAYU9nj2V7I3rOr2Qv+oRV18AIP/ES+85AgijEiOGz3f5DWe5njBJOK7YMgr omkBgxPJNNponx4wXiqs788GfIpgRKsDmNzWz1b0e2LrTYNk4AtmX9R9OS8+Z565ZF35ztK4cde 3ytkycBCA6pN35S9if/Thkr3QuLwAELDaC3GJGVaPsNQTGwPgbAIsEPoJFBzhOBuYxh8r66JcXl g/RfRvN6AJauxCPg5sEp0hD8vB3ShHyABvo9z4H5UYyLIQXl1EJeYhTz07nPF6ek/ggxO+DfW/i H1QhU2FgfhjHJ8ikoyg== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635464708158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-11-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635530; cv=none; d=zohomail.com; s=zohoarc; b=h01BRzOdVFjjkNeMv/6VIITHyl6JXMhCIxdc67DjnqbWwen2p6NJIizm33FKpeXlt3Gmiz8Yx5l7QV4tKdePdPXqx8+eyDTEG7od0as5lR0tr9KTtulSdq36dKGUSOW8DKtenXSIeOteVhJ87+gd9Ug4WoHOR4jxacAUHvqk0fs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635530; 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=8aWw34KT6c5IUtRKjPziAEK8iWqWDVoQjSGiZyt+f3g=; b=ckE/637Grz2xDeFPo0AcF7jbdJF10NoMm4JFCWBHNzOQ4MHuuVHrsr4wrOv+pBaKBYQ3alVS59rrFwJacLnMz4Wzkzbtk4cCIt1vKr4TH53lgVvej1FrpRx/OoAw1f8XlKxoy4TVREoQcdh7OCqFGaQelmGrFMN8PrGjJEf61Kg= 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 1781635530966690.93219503576; Tue, 16 Jun 2026 11:45:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYko-0004oH-LH; Tue, 16 Jun 2026 14:43:19 -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 1wZYka-0004Tt-1w for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:04 -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 1wZYkW-0000Qa-Bn for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:03 -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 65GIOlsF397701 for ; Tue, 16 Jun 2026 18:42:49 GMT Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ety52uvpw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:49 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-8423f24dcedso5951653b3a.1 for ; Tue, 16 Jun 2026 11:42:49 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:46 -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=8aWw34KT6c5 IUtRKjPziAEK8iWqWDVoQjSGiZyt+f3g=; b=kYb0kTLeWjgQr99aMGFZWn62bk9 +455o2KGk3ztaDNuKLj6loVIJi6hxMThlu9A/7dKsJpqZEF+uQB2xzRJwlcJHUJd zS2aXT/IGkiVGZ/OsJhLGoST5hkTBTDWrgpkTZIa/qbr8dNDCIuvi0EVW5PEvMP+ s5vLK86/0S/IFRUSCR3hY1/oFzq/OFAjHs7fHVDK7Z7RV0GD0WEiDLNdRINifBTC lDjijSe3GRE72GIs9CosE2EPCyaq/AqqZnZqpjKtmaiC6+ALyuk25BdxVdnxIkYE wH5UjsneauIApV+fEV1z4VBNZFaQPCALd5jTO/wGncqqAdsnSPSIavNErWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635368; x=1782240168; 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=8aWw34KT6c5IUtRKjPziAEK8iWqWDVoQjSGiZyt+f3g=; b=Bl+Wy4ICpFSd6do49FcBzlLXP7cfTtWWFaAfUEsfWrDcqTStH2VyyvYJONo9kqTj4i E9MocyqehFknqUAwIU0aUceXay8C+4S1TdjYbISSbKCtBUa5p6EJFsBktB/WKk167+qN z5u9yeHQQrM+JWRo05bQ7rL5fNNbUbtHIc/odaZevOZbYbeXxA3MbOXC7kTq8LDCvh9c L72E3NRNfGW6JrB2joj4MulKkXIFNaZu9ves1+o6pZg6ErVgpu6eQ9hYAIFcv+g2O+Ge j1vB86kbRJpDOnhfKC/YhheyExjIbb0lhRlm6f/+nHwwYb3iy/ZRDNt0eEyOmW44BVND FrHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635368; x=1782240168; 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=8aWw34KT6c5IUtRKjPziAEK8iWqWDVoQjSGiZyt+f3g=; b=i8hm193yAA4EWkR97VlFiX/qE1rYtxXbONmXF8U4+E1vYo08Df4jvy+l7O1vBvh785 MY9bD7lOovK71Y9j9DbYsrno2pXu7AIAo7LpP+YiQKwciVNB+Iwe7udkBLIBNLfx617I KPk2PpKc+VuHrppZtaf2G7ckPQTzLfxeMYD8tBqiNDUehaFYAvmvejI55w2Gps7Z3c0c KUhyffgysSRcB3WqPoz94LJteb9OGo9GyU5QzpbZ8g1F4M6NS7Z+33m9NRMe4jXVz/k8 gGypESPQ4cytkTDjH9Q2llQiZgV4MKkTjbKock8ylVnSl/RezM8RLusreC7zv5UykpMb mSOQ== X-Gm-Message-State: AOJu0YznK+ritKA7p/MUFOmsKvYiU6kW/rpqtXvnPlxCTL/ngMgb8EPS GjySej4kxwGWd36YEdNRxVvqvg/4eFiKsCuXsXTzxUBExqynsySOcGmSMQ4FLSLg7tv7A35588+ G0sTiDN21hYBxnHJgf8CswkV6dFd9NVknT4mgn5tpsc44OPgmixUveJea6gtiblubtK45 X-Gm-Gg: Acq92OExmTU9iTV9HyXgGQiHyfeVM00ucnbClgzdWMKetVJSZyP3WvaqOuAeE/eugh6 8yuKXLqTu2YnwgBaeyQ2xUOwi4KLGep5KJkoW9RoXEwCMS6itHTdKnPaPPxYS7qD149XY6X3cCj 9/AAkIj5H7ANVfPgcVN8AQXr+MXFElm9hJtf8+wSgDXDAnT+33+gRuFugK5kFrTBynEjYahzMeq THg7PVU0snA4rJP0HhcFTPHovsqoFvTk2CDc4BsR9qGSh5PpZI+9hwmOQ0vl8woZ2v5kPS8leWo F3ptDSCDfrJybVUKotWwqcaUMtW6c1bvgJANNUE4qI1DRZIsYAWTzWNtWsKW4691DUwe5iQI4Is kGVZJdFxL1QNqUbx/6GTL/Lw8PbFazKF9vChi06nXe8xUjUGsAq+uKJOXUC0nfSgqof05H9GmIr X+v9pb6ns= X-Received: by 2002:a05:6a00:10d2:b0:81f:5037:a317 with SMTP id d2e1a72fcca58-8452445d6dfmr343632b3a.11.1781635368376; Tue, 16 Jun 2026 11:42:48 -0700 (PDT) X-Received: by 2002:a05:6a00:10d2:b0:81f:5037:a317 with SMTP id d2e1a72fcca58-8452445d6dfmr343598b3a.11.1781635367920; Tue, 16 Jun 2026 11:42:47 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 11/26] plugins: add userdata to qemu_plugin_vcpu_for_each Date: Tue, 16 Jun 2026 11:42:15 -0700 Message-ID: <20260616184230.303038-12-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXyeuoSm1XZ3b6 FP0UN4DIUSCnv3AR7aMFfdgreoruXpTVTw0gmOnBvE5k0fF6gwwlZ38OX5GHwj9g02K/LijzT+G rcr8OmfNQpxvk8yfkhVj+slO20Z/teQ= X-Authority-Analysis: v=2.4 cv=FJwrAeos c=1 sm=1 tr=0 ts=6a319929 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=6uvAROY9rCAfoAu75HUA:9 a=OpyuDcXvxspvyRM73sMx:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX+XfYTm+6hGh/ PfezqARq92dw6wvC28d9w59UvP8bUJPWTuXR3L3PlyEDJ9851MNtUNoaxm7//B2+YW05UNEcXAw sP4ZJ4PXZ5+xY8McKSpRLVDwV2QTWNwkUU7ylts40nldYYt7v+2iNqt1ereIpHj5euYFbUgU96Q A+ALHJ9opwGzbOKay+/dtQl50QGwHfLWf1rGnCLxp+xyutq7u7MfwEd7dB08/tL2I0Ps4qZBgjp soz0/5B1+nBbD/D6jr596wGiouVqik3AeFM9EWIlFeRn35bjl++ZqfT0fAjvzNw3x1VOEdv64vs Wmh4oMIUaCKPGRieayda2MaqUr4djn3fY0nJddfadTGzybVmmzlE9POb3a3lXy+/25539pJ4ntC TJF1dkT8ORDPhz8aezufbGbSoKY17R7tdTKHf//JL7SaUW7sJQkVrGAfGakluHImMmauJIuY+c8 HU5WF3aWTvsoBgL9Mzw== X-Proofpoint-ORIG-GUID: LcWcCzjFzq_MoqgbWA0GI0Re420lbpep X-Proofpoint-GUID: LcWcCzjFzq_MoqgbWA0GI0Re420lbpep 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635533006158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-12-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635519; cv=none; d=zohomail.com; s=zohoarc; b=UqY/UbrIIKYc/NkoqjnztHzL8TLItY+Z33cujarmjR+xbU2zNDJT2MFMsT6vYxMfC+MCctBko95k+2gZH7nQJgth5VOXEnFaVJHZpqC2nxGcPVhVzFPqi+EE47El212NMoUObnsuc3T/ftfrB2LuE5+2offez0e8fMhQi4OXdXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635519; 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=HCX5iS0Xm4+VK93HqvHW5FUPkEz1caZHsDfOzT2+22o=; b=gKKjDKhcVfbHfj5CwWpmbc56zxhpdygWxxyWgRP03OxY2Hx0icyMO7jCUMkAB3H2MCrNXTiGsl6jfMEobKDTq/3kALUNl0uQVl9xwoFr0dMca2RdhIZcwKbRC78mbf3DMNFeJheBcDBdSy5kIRc8XKw2JYqc8RX7BNmhShE03Lo= 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 1781635519007958.80144554627; Tue, 16 Jun 2026 11:45:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkq-0004t3-VU; Tue, 16 Jun 2026 14:43:21 -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 1wZYka-0004Tp-0X for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:04 -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 1wZYkX-0000Qq-3A for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:02 -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 65GIOTLl302756 for ; Tue, 16 Jun 2026 18:42:50 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7d1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:50 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8423efdbe6fso3144543b3a.0 for ; Tue, 16 Jun 2026 11:42:49 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=HCX5iS0Xm4+ VK93HqvHW5FUPkEz1caZHsDfOzT2+22o=; b=OwTIcezqt/VXZ+wEdKncFYwxwgl d0Vn0eyGPpt6bDZ9cbQVJqPODHoQoBG3B0X4Za0MYB7EDcZ3lqDR+utaUQeoP91l MskU5p1Gt1MZRtR5Xx/wLaEzlGD/kwkEzQYkH0gOqGzOpGSlSoZNgHoJGfJxd6me bCxBdEKqHj6cqvY2Y4zvxebrP0+vI9XSbP/BAL5YVuwpjFUQMlW5fFdOF5ZwP3Gq pot+69C+jIJI/ImEGD8loaGFKpfkUAT1C5Of7dgB3XVjv3L5ejXWzlSRm6lnknS4 ZhkoTRdQ+jE/XWhslEnW9GuS7YKOY+4QCskiTpo1MD3QlcmwWuG/4KlTTYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635369; x=1782240169; 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=HCX5iS0Xm4+VK93HqvHW5FUPkEz1caZHsDfOzT2+22o=; b=g8GFtJMmkvEKsTeQcfvFx2+lhLYM1jumKPK8cCWviYa+T55csbeZGSubKbmYrEn+n/ RJ3n9jLgs97W9Wf7mcKx3Dm/P4QI1HTaqWh2RbNEoomtCV92Kznz82LBa7x3titZ4fXG vBz0NYPO8mhSv4upQyNDZOdyx0OrqLtQlBb8YVI+aVC17tFcFIBICOEaNHVAGJhVAIes Te24xoZcs7XtpaimPgLPHYgU3lG3bhFgY+E0FYFW//zOy1LQLp3FUN80VKrsqRoI/zrp T6GtFZWJxOPUUG/f6BA0JcsQsZLF3RgXfFm8B6KHMhBxN58hoHfRu6F3KfsHxNRh9y53 ew6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635369; x=1782240169; 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=HCX5iS0Xm4+VK93HqvHW5FUPkEz1caZHsDfOzT2+22o=; b=SAmL52O2mnmF43Xd2zumROjMWX0gFky0cXcNpe77Gg+WcpOaDI04M0ZGcl0tzTFIZT FScW2iefKFoWsLiGodVFC58auuI3F+dn+bnHkehO1KfXdKaR0jWP8GOCKY+OzidSAS9+ GElm0Q2KNIm4ctvleO1pdZXbLm8VgTvqGoV+PCeTNS9Cf+45R997PPKMPnUltmAYYLgA KCrWp5VcVTuk8ptS4NCTRVLzZAcyh6Z4snTDeAJQEUmhgFm8/LQ/Pg1yoeOVymYHEj4l AWO0a4+z9oStpXcYNnxImVdqyU8oUbOI+V+bkI7wIAPJIgw3BD4+GE1T1F7duNbn5ace pxaQ== X-Gm-Message-State: AOJu0YwdPZ9LPmcYLJnDPZuyiPTpiwUQEVVoDdus3WzRNT2OPEqXERCH JxX2tBRi1uT3yNDOk9sAK/b+rjnYeyBz2Xu3O6feRU3A4TG9FJN0loFst2V1kuZ9NifPBhcMcFe /cuMfDn6hs6QUw4jR4lbO85aPeGyECPjMShFIVsSp8eoYNVfGTkgbJHYRhZAWnvPj6a7d X-Gm-Gg: Acq92OHcUL58sYZ4TqTHwDWKdqWX6ah4C+wcbm0TpEAEf/dVpkLFsEY6nC/sS+FMygl Q0qYfUSOlIgJe8h6mO3KHHziRPbjjVx7lhNdSNCE0uTtkvZKwOyom7YmD7y1E+L+jGV5kFbA/qK Ziglx3hL8LEhlcZrPbupYlCdzMEG01cbEVsn0ozrj7lOkZkkBqHT8T1Fck4E5nQSpFNfSQMZp18 MLQoa/ZYj6s4y6VZMz23srBJ+ivU0ELvHVVFopCUp+wtwFfxhUVmn0OA1OYOtQ6iAp3/TJzGlLN 6I7Wndjmf85lSv3TD9V9jsuAuW1ZaZCMqmB7qLEK7zCb9RQ/7uXInx2ZeZHN+gD4tXNa2asTRsU uWj7QKVu6/CIqKz8Sm3UwARzwpzPa+j+mlqejO9WDdp3wrCqAnraM/M26E96t8/PTwS1+bUUkCH EVmUw2xKU= X-Received: by 2002:a05:6a00:288a:b0:83a:4846:90b0 with SMTP id d2e1a72fcca58-845247bd9dcmr352330b3a.46.1781635369018; Tue, 16 Jun 2026 11:42:49 -0700 (PDT) X-Received: by 2002:a05:6a00:288a:b0:83a:4846:90b0 with SMTP id d2e1a72fcca58-845247bd9dcmr352297b3a.46.1781635368614; Tue, 16 Jun 2026 11:42:48 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 12/26] plugins: remove type qemu_plugin_vcpu_simple_cb_t Date: Tue, 16 Jun 2026 11:42:16 -0700 Message-ID: <20260616184230.303038-13-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31992a cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=O-HLJylWCwHPwwrsMNEA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX/h7ahW2K/Tii UBJ4QMNdnOqHRkcbNT2f9kLbKc6Pv8yHB8qjTFaGsD1oqre/Vi0YHQSbuVfS7677+ZPAAAuLoQF woSE2twW5W3a/i9W4hTnSTfh3ginwcY= X-Proofpoint-ORIG-GUID: 7YdQ0Ax5KJ0VDjJVbLu4uWz8wQFKbEY4 X-Proofpoint-GUID: 7YdQ0Ax5KJ0VDjJVbLu4uWz8wQFKbEY4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0pCJHGVMKXfN KmhRCBVVZUtBK876OGqPx2MPSpt1gaOfgwPJCA4ClMxlEyjJ4DCTnGD885EZ5tYMOL5VO3oiTcg OYwvp5PzcXN/CSezPP2egHP94d6vVjgMti7Pnx7+igNTyh3tGrbptThC+C7doyEE18DwyC0nS5z k4v8wM45i1g5EBwkKOXZWf+3uGscbPYDa+1tZVwo9TFyGr5qjjMkVJ5ThwHiAYO3uC038FLlSC9 +8jsWFrn9SvpV0lG/C7tgTsuffZTmAf+aj82B9VjQYzNJnzBwQleVO/fFdafvXAe1TM7nZBBJMW +/8H3hU/UyGtlMfG0SMzR2+G11R0AfBzgMK3w56DCuzJZON7uCL5VLmRFNzCHwmcgd0b/bpd8vq 4ngXVfvqCCapLvasX4YGc5kpjPz4ePTElxOjLDefdGbrBzf68mqQfPw9r2cSt08ZayjtHrtmWPI qb4M1/4jH5C7jhsjkoQ== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635520889158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-13-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635443; cv=none; d=zohomail.com; s=zohoarc; b=OfFKgDZDpEALEUXZCxtYvHFn7jcZsC07dFDt5MhHLmJ5dA/rbT/QvOPqgb5RZrb7EjXX+x/RYd13McUPLVuxuiA9ulXuOEL3KMAXBAQw/SocH8B3TWrRv4dnTFP9X7SfLKtfyw1ENkCgZv4Phrn1Q8SHy6kluKVQ9r6w89rsgys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635443; 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=vOJg9WnkM58XNdIm5fxCrrM87dShj+fmFLQWvVcrFJ4=; b=eNgbQzytc3nk/PRXx3OkTVLjXj7c6yMRhNugYc/LlMz5pYyf3tscTeVqPmZLHf7Se48YW5u/3qd9dtIiDUZVNB6nMfw2enH651+fgLRZ9m+FM+koQWhV5FnR+MHQLk4dBd+0CsTszlfpUYkRnZJB0WYuDpguy+AhB30QEyHzCVk= 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 1781635443062829.761238258218; Tue, 16 Jun 2026 11:44:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl2-0005JQ-EZ; Tue, 16 Jun 2026 14:43: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 1wZYkb-0004UR-EZ for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:08 -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 1wZYkY-0000RW-3F for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:05 -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 65GIOtXQ303627 for ; Tue, 16 Jun 2026 18:42:51 GMT Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7d2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:51 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c85a2f1d1e5so2625235a12.3 for ; Tue, 16 Jun 2026 11:42:50 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=vOJg9WnkM58 XNdIm5fxCrrM87dShj+fmFLQWvVcrFJ4=; b=RAVmr67iYAAoY1sbglia4TdvM1u LefS3OgWmB0Bd1bqZKxLPcyNJpVy6n4rQHXFMhkPC5EwTYCKrr4o8TJOl9IEKXnn tuEdxOZ2PYYYrlKPd8By7FBhcAXgolRsC67nfiZ0VVWFrfPBL6tOKrqNUdMNpNkk Vn/8MonV7VlxaVZBolr2MC2MUzcvtHYMk/zkDP6RdrgbkwUTeRicN0d0wuHJLEMb X7VsmI7Shg9IlhfWG+DkJKwaPR6nWpcohLKnYBl4LbbP+d5Vp0Iu7616tOsBs1Zy hTer2TWsTqMht16V+dMAHXnmPILMbzv1jP/5+k6FBSONqnkihBJGotsflQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635370; x=1782240170; 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=vOJg9WnkM58XNdIm5fxCrrM87dShj+fmFLQWvVcrFJ4=; b=f5N7fFoRbAkgzI6l0dwaDvtNKW8s/xju0iNfPYa4qJ+eB6K9kUzUq4g4sww+pfKzk9 wGlbFtLYAtw3YGHmqZXGlELABfhiA/1cGNg2612qEdSX1w+Xy+tWL6Htb3EkJoWK486x lbexCRwu+QQ54RVLfY5OKajhvXbdvx9lZ7k9Im7kDi2AOyiQGJH5/YDjkcvrMr/bmFRc HVTRwHTW8J7o+LD9mJeTbIJGBhvtmkeYdraY3BeS9XTrWdmRN86W8ziCnJ+1H+2rviRS 5MpyFJf5Q3exXhzmM6698mwIPqJkcIV6hukGPUdG2CNQ4JSK96vKGS8bRsoUX+Z4KoMK YMIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635370; x=1782240170; 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=vOJg9WnkM58XNdIm5fxCrrM87dShj+fmFLQWvVcrFJ4=; b=IVjpslAAC0tzXvuA73IKenQkkM4krDn2AYdSb1WF/aVogqukxhNkUhlCjmyH+mWwRV Nb7tsT2tL0kZMMCEMiFhTF3ZkfGP3pSVFLUvD3be9Sg9sPH+yqbX32TdW1T+zi1NQx/c 3tSnoTmH/Z0WagAYp4mO8EcgZPqE9WAT1GamriWBvTiDicS4+2rL04eryPp4iHduC8Wf sND+CAvWaYH7tLNsxyM7q6U8IpGPqN43T8wDNaUI0EBkag/+Hkkl60bUR1MRssSrpP15 wQpyXH5OtKlODUrbDsRcGJ+AwVqvuME0AInMfWz8hUQgLEpf4szCcwIvebbEhbGyUEFz U6/Q== X-Gm-Message-State: AOJu0YwBkzrbC3kGezIgt8C1eqEUe95O65IWCMMz0fs2nIWxeATcFiVV ACxZw57J7l6DmhBtp6gdTrYg71edTbN2MTyTh4ywWNuvwqSuUIToq0R9/PgVMNecQyrIhKU4iwe e2uU3wTrVkmm+wW+do3kxWmlZ9YuZSZDGsj2lzM16I0qurcFUJPyjrVZj8uMIqUhMaLIi X-Gm-Gg: Acq92OENPTdTuTXMAtYB81qOcVJTYNirrGSbozs16Es3dbOM0JtezX0fbFfR8mD1Var qHajx1uB0rFJ+UgdeHoDfNEppSGV/S4z0Wsi3qwQJYJnnjXQ2rqPj3eOhXdOmI/oV+29PMppLOj x+azfYLI5H1yocDt6/l7wASFTWAtPcJo/ANDBJe6SK58d4C41f2EU0kQdbFQKshY3roc1RPy1/5 Kz9JeuGTOquGiZOiGSpJERclMs3nIkkYmFuCPZbJRJ2fqDxQrYjfk3YG/jfo1Pt6pnboIFI5/UR s/QOHr0xtQUYKmEtcReSlWwEt1oTXT8re4fMVkkJWmLtgG9eywmFQWvgCt8XhuMNzDFA1pUfbwl gM9Nqq+FPJSYLPBVzkxu3rUsZOUEiBWYJFOBfV4VnKjalw8Dvan33IITQ6x0ZTkDthoIJ3880BQ +6PjSwiws= X-Received: by 2002:a05:6a21:458a:b0:3b5:28d1:8bb5 with SMTP id adf61e73a8af0-3b8b5f36f87mr516856637.11.1781635370029; Tue, 16 Jun 2026 11:42:50 -0700 (PDT) X-Received: by 2002:a05:6a21:458a:b0:3b5:28d1:8bb5 with SMTP id adf61e73a8af0-3b8b5f36f87mr516834637.11.1781635369602; Tue, 16 Jun 2026 11:42:49 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 13/26] plugins: add userdata to qemu_plugin_register_vcpu_discon_cb Date: Tue, 16 Jun 2026 11:42:17 -0700 Message-ID: <20260616184230.303038-14-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31992b cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=UCrIKau3vUVB3JaL4XcA:9 a=bFCP_H2QrGi7Okbo017w:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX2q7IS4EXsVU3 cO7tkcLY62ckqVHNlppwWlfHZjWzt1xuC/BW9Uo5FFuPvgMuYEnLMutBMMpV1yIfMSjBKp7OjFS 37aBSVXl9RMV8OxzLM+KJpVkV4O6Gnc= X-Proofpoint-ORIG-GUID: 6QsVB8lC7KiBbm1TMarKg5NVvXCdrobL X-Proofpoint-GUID: 6QsVB8lC7KiBbm1TMarKg5NVvXCdrobL X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX8FmCrW/RZLFz q4pJ3q1siMq0bZgtQ2Ai7RHCAcpWonWc6LxkeFF7omcJtngK91n7S3DSQTES7h4BbidBJQYabHe +/880/7Vl8zb8EapttMalj5e+Lh6MIexOgbWHFIcS+a08YIwJda1g9qa4Hgsinb/Ti51ho7niSd Vuce+FaYnf3exOafAGfgf9zAI8Gg24StkjavkJiayDfhK4cs3WF6jJjpgSVHAfeg4/RuF6wC49c 5ceNHlWlOOn+r2vKYxEDyWbubPmK9aWTnc+Kb4NQnNunUas22ELGXedvz0jhOI4zHjJ6yDljOF3 eGA/EA/eKez+X/l0Q7cKMSEDLpqTx/vGmRw8XoMFrWgt2AX90xuQCC2N62CkhJJ/Y7oG/e7l2U9 gF/wKfLlnfeQR+LGWhsy3W9BpJc/QZjZ1nTF3uLiz7YnhPxVkuRmhFwc7mJBX5mLzE7plDUiMx3 Ef3M41ZJTpFwDq/D62g== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635444606158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-14-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635548; cv=none; d=zohomail.com; s=zohoarc; b=UElGdUXLCHss2+0q0JKVaENpaCuwl/W1jsavgyx3OkRZ+txbY7AXQgCdzoLyFvDYeRDK85e8pa/Ztl6DdVjK4Pl10THhMPA22+Hnvgu/qS/dq2rM8ZNffCiC/brYSG0wEYIlVEIybAM1i1zteZo2KOdFRrGqU1rG70WO09T5Cs0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635548; 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=e+BO43wzAIVa1OjcMaVblkps9FSWXeUailIm9njhO8o=; b=OGlm7PeeieSbx4O+f6pSSVbo//fKdf3thoQ1YRUKhVyoKltJ3Bi6qbh1erXi90l9KcXOcqCFLn/Zip9+8MoGPeobgfIUGK0mO4o2kCSdFz4XnXTFDgc58OqG4hGD7Y3P2XjZfFbzBBRl1UY/G8aAVz0HXdRw1tY6xZVYLO3GTxw= 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 1781635548305881.117096835729; Tue, 16 Jun 2026 11:45:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkt-00050N-OG; Tue, 16 Jun 2026 14:43:23 -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 1wZYkf-0004Zz-VI for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:11 -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 1wZYkb-0000S8-CV for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:06 -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 65GIOewK303370 for ; Tue, 16 Jun 2026 18:42:52 GMT Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7d5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:52 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8423f1fe39eso5669478b3a.1 for ; Tue, 16 Jun 2026 11:42:52 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:49 -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=e+BO43wzAIV a1OjcMaVblkps9FSWXeUailIm9njhO8o=; b=U7lnG2/Vp9uBcIIFeGTCJRYz3l5 JLYag/Ak1PtJNhBFkpsPZ5oo+cgxB4RuUIFjFSIduZq4LWekPXih0hBNRam49Rqt FGQbFt2qmcpKSWkb5lHPz19SLTXS8W7ivIuCHzX8utfQHf572QSjG12cRycrh1KR mc9U9KKD6U98OmAAubqVaAi+7a2UsBTbSP6Toqy0hKIXUxhGwYqANkhUhmzraXmI QJrROohdn7ZnKbubaNH0VawYC+t6fX2HyF7jmHLXR7wLTZLagKTAn7PZSkpgAQNZ 2unrkdsl/28Dk6Fg0xN8DODN1tF8YZ6GrcVJXDwnGw2OFwKA0exbp6skJ6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635371; x=1782240171; 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=e+BO43wzAIVa1OjcMaVblkps9FSWXeUailIm9njhO8o=; b=aBC46QtcKc5GM9AOe/35aEscU0iGgECB/XQ/s8nqQoquwxE0hurSJ3t+XcE+QPHXcz PiTwcc0+JaW4YzKg25Rtm3yIds3tmtdEdGAiyzC9rkkj7Xhsp2R1tAbe/qkmTQWYRriO SHrtOdY01PUhQw0uTOOaJXlOxuFnHGy6VMohXP6nRLAMNcJIHTM+WAwH5md8KSBWamZT 2I6nUwzUVxsJFeJSAwWDTyYDDC8dTUnHVvmg3cQJOJWDhlFj3dcMSOkjH6UERiE0I5Ii HEEUxU7sVHQtrNi/CosJLIXiyap/NTn8bu+92QDrUYgbZS/Ka8TROnf7/5stVw61/qzs IrFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635371; x=1782240171; 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=e+BO43wzAIVa1OjcMaVblkps9FSWXeUailIm9njhO8o=; b=KnC+NVwwdRM8/949/zBBLH3EyAhBSN+AmPmbc0Mm9Mw+PxIS1rMPdXCRD3Fj6lJY2N up/C/rroaydRpqe2EBB9SxTx3dti3awQHTHf4tYzV/HIdvh3woKFm088ZbLnfTbTUcbe NgbViP7vrg6P49pnowVk64z4trkzWb2t6bJMZvrom6GmAtRKP96iikiH91hxVI4u/fW5 Jvmi9zhPTgXK5Ebs5ZN4rbYqQn2jdz2mLy2xTbdqptkVsLEhwkH98eI2hRAiJDzPcZTy ImqTTB/pkUx3w1kfbtiJL6/VutrxyVqxZabxJAbPKuQD9W7HTmfiDeIyyOM0vx3VLiHT yafA== X-Gm-Message-State: AOJu0Ywbz4CAkPAbocsKEGZUN/pY0LMEhsrtxLSKyCOdXj+anavhpRSY 5xvAjEf5p2UWTLpUXdT9YE73QxwJEl7m1W9gDh5os28OSaMy6iSI0KE0z119NT/g0Bf3l1Cn/ft IsO1JERHsczzKl2Usiiqgs9BEhrZK+htjQk0rAUnpgVq9nZ9ZHNCAN/EOdNbqQ34AZudx X-Gm-Gg: Acq92OGRLXdxIbyaB+/BAwSjKUavApivpLynfvEQ8GAxy7Ts5khBtyy8dp9ZWTEOeCp g3HLf2kc87p+3ULDGxVdcPzfJG3lqmiQxBWRvnvaMtpC6ceqQG9QPWIZGBMvK6BMqmZvhBGnIrH IgG1vUt/LmDFq+gcXq2Da0dCJqeUUf/3+UZqQjKxiOhbdENf6EOjr0e63WLTn9ASyv7hFcsq8hP pYtF3H7lPEP0l8M4XpwQRDtwTuXWaEV1mUMDHyTjD/B3WrIITQdu1DFTbeWU57XJiYbd+eTgMKV RSsvbQ/vVDwsZspbKuvk5gXqjSaZ2ARyavpbkwCkWUhMlDRwsI9zOiSL2UdQbpVLwU9JKQ5raDi Md3iaP89H9JXCdTH+ktosL0gS3o69+VrvWGqDWNetgKl9rqm8INlRu4p5zO9gI3Sze6ZPM18HAU UlFVC/N50= X-Received: by 2002:a05:6a00:1749:b0:842:55b6:f5a1 with SMTP id d2e1a72fcca58-8452441837dmr374598b3a.6.1781635371215; Tue, 16 Jun 2026 11:42:51 -0700 (PDT) X-Received: by 2002:a05:6a00:1749:b0:842:55b6:f5a1 with SMTP id d2e1a72fcca58-8452441837dmr374557b3a.6.1781635370601; Tue, 16 Jun 2026 11:42:50 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 14/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_discon_cb_t Date: Tue, 16 Jun 2026 11:42:18 -0700 Message-ID: <20260616184230.303038-15-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31992c cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=ZiyQStk_4VnRclnpaacA:9 a=2VI0MkxyNR6bbpdq8BZq:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX5JXsE52Mu6om Hr390nMipgLH9ksMQ4XaETc1zRK6Svj97ZEHX7RYlkmGpr4X2LNfXx914O73aLqmSzUqCjZbuSJ RbVny8qchd3qSrWiZFjw4OAn9vlYR9A= X-Proofpoint-ORIG-GUID: YRjnM2vxmwCIwk-PI1yhe33htBCYCxCh X-Proofpoint-GUID: YRjnM2vxmwCIwk-PI1yhe33htBCYCxCh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX7XM1PwaXZu6C EKRVz0cUbXNy7+4A6RwCrRhUZ+5uOLokyFbOaOeNuKQe6e1VBExhrbGjeHroevNSGd0lSccNdP6 sodOsmBCPDvrhmgfF/KHEik/bcQcnKd/wApMkTeeKm3NCeMa7G6O5jdNqBd/KW6wHiQpBT3E27B 9NnyHpZa2aV83CUFxzmol1i294/j8ANf0Ab5B5/9W75fMXXi/0zyCwkb8qx9eGoLB8NvF87NbsJ bS/ydP2oJei8sI8d4Peqw4k+Z5NT//bnFLIZ9JWF1trf0nma3KIDvOaJ4IriQNzncwOeySjdi9K ngxwjvuxsViBS4D8ArLQSzeBdxY5q822cJOoZLitv4pfXoJvfFoc2n5C+B59x/dtFXIqAJ9GutI XoBtFfkKBwKgLFkzQdEtFVQmztoqjjzt2QdQSodlam5wqJ7PGZ53NnC7kZ9w+d7357A8cLreTj8 nBJVTq53jFZtqvzk9+Q== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635549251158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-15-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635547; cv=none; d=zohomail.com; s=zohoarc; b=VERWMlgxObns7QCTsR4anqFmJR7Ee0JROzCjA8P6UPJalMv3LnYZURmBYGHS5ildTAs/Bmjq1tvfH4BDNxAbEsfNc62I9BHLIgJDU3Tb+E6W8Fc4BIhHpbXXTzXyQmT3yQ71JLMIJ6Ie5Tb3MPoUBl2Mw6P+q/52RkS1xYDBvwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635547; 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=WBXY0uuy3S/j/y9EZ6C2T9m4jVJbREIcIk1N4sTn3u0=; b=ioWtB8ndjYE/2WB+3pGA5CqZMDzNUI0CQGFuYe/XvrGjIXDI289Vnrp295/H4ns4cYn2xW4Xnip8YYdT3hBzpXbFrcH+vJzbwM2m2TuDgWZL/w+F5bipcS02g6Tbhu8mqu3BuBfbBl0SOa+mBypPysZyWdNMPBkoejtRaLH7r+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1781635547338869.5896430739263; Tue, 16 Jun 2026 11:45:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkx-00058R-2r; Tue, 16 Jun 2026 14:43:27 -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 1wZYkg-0004eX-Bg for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:11 -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 1wZYkb-0000SD-Dr for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:09 -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 65GIOTaN302775 for ; Tue, 16 Jun 2026 18:42:53 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu1epb7d7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:53 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-842278a630dso6201962b3a.2 for ; Tue, 16 Jun 2026 11:42:53 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:50 -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=WBXY0uuy3S/ j/y9EZ6C2T9m4jVJbREIcIk1N4sTn3u0=; b=KU1FpYx8l7LJ5vLc4Zh4J+m4TtR rbOsQod4tqg17EmmFqCRt376mXlAwoRPxjA7+iTy8qFGCBlkyBzSW3HwpY7rDfu/ z88w0yaRBKvqyZM/Yt8njFrgmjd1G8Hv5OgC/bYuSh0q64IJo77EpXnXaFVrYiMn PwlUHod1w6NJ5fZbCFlb7CRi7fDvGDMClClyf2sWjoQ5yjceCqZUeItd5PF8YjEL CKlkByuyUx/KQexX3BxpzHpwA5wgTrL3kqsOWby3/eDK/oqxGkDrhh75bpDvB0vp uKouQ4Irmjywxu9KWH6TW0cb5SlMbuHpMPtBPMA6WiSggbHtGKH+jwqJjkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635373; x=1782240173; 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=WBXY0uuy3S/j/y9EZ6C2T9m4jVJbREIcIk1N4sTn3u0=; b=gQlesPzQpu47aoijJuGSLzCUCZvdgdJN/dZHFODxG69neP1QC70vemrtLT2kgEzbV8 UkaGQjgme/cmhxQM1rxZZn4I88zpt6/6J/j9vLi2vf01d0KSuxjgb0ICXbAj3BjypIFI PwedHld/nAo48gDv0oDGTKZWHzvd5CLpU+FPtulj8/9oAQBurtqiAmkGaV4cK3a6oiJ9 wFJDLFdbwzNilXYnxdseRgpq6wUOa88fjVQsYt+BSpYTAvPC869kHWXoZcmQVkeIG176 QpC2NEn0ZRbY2npKjURBwzRnBDfvbpN3G0LDJ2DayurN11zB4oXwELtLgH8ectqYtRBa p1Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635373; x=1782240173; 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=WBXY0uuy3S/j/y9EZ6C2T9m4jVJbREIcIk1N4sTn3u0=; b=eKM9ckMR0xHtUaVjRZk8gNsveGvKXNIDFQZfje8x6N5R3/YtqMOptRJ/X0E9ie8rTD dG0igl97G/V+tutN5xXtHd5n1aGQzHEruKAvosya77kimgqXZL24jVGh7LL892L6COP8 MODLy/mnnjE7Evp3mLbOKnS0n25EiTylYzd/WO36+V1UurMnzsNTOTOQ848JqS8euzB7 DdiO2NSQ5j0bR3WbxRNaCpU1eLHXln2vWlSdQK97Zdh7XcdpY9vyEk5xA8hhLaqC304c 3dSoBY2IH5RT18WsZNITWSn84k1RxhNav3Mcmgm4wMpmvM6VGQidlpioXC37MI4A4aXW Z9sg== X-Gm-Message-State: AOJu0YytBxJ9nLsxLcHVLDM/iWmyyqiE2eH2PYIwWAoXFB1Y0eNUyugr RlX3A+u64SQJGoDRuMKEMheAE99Unzvn8acKkAwg+Rf5HVMR676UUCpo5oFMw1OsYOtfp6iHAcM q4ymr6jTyq25pBK/KoDL59IzmPLXlLjSihPp2//6ZpxnqcD2SKHEtyU/ZRBj/fgN2sS7A X-Gm-Gg: Acq92OFRuyodvmdBUlvkMzl41SXCYJDFB+5AMHmrPxqMFt8GE16jfgds3ivrgnfeCq6 G6OpmX2CzXZKSmrNElqBwk702yKVjb9mH8NHaGIwtM5b1gFQebFYgRn3tu6gtXZbnoPugfh3zA6 ZYv0eR29kBargEgjDkf+kRIJ2mGMhwBpnvvQDZM9Q2Gxeero8rqs2k5JPK/mSoM88PKhm+5RgQT 6DFoLg1zI1Jkd45hzj4Xho1tH80hHwenV/4w5FFMNSpz+BUcRqrfzvsmH0IfmsALlKJl1z+Yfpw KC4KyjpSnZZi7VDUlcnkQczwgaGvXixVXbdo04/bizAvBIDPxpoccSDIJFTMXmHSMnd/UgberSN Yn3Lj/CX3viFokYbqEFi7DCRSOU0HO9b9t0GMfE1z78x5aD8mUIk1VU7Vdqj13yD5Ial1pbdRwP K0unRDXcw= X-Received: by 2002:a05:6a00:228f:b0:827:2a07:231d with SMTP id d2e1a72fcca58-84524480d7bmr371772b3a.17.1781635372414; Tue, 16 Jun 2026 11:42:52 -0700 (PDT) X-Received: by 2002:a05:6a00:228f:b0:827:2a07:231d with SMTP id d2e1a72fcca58-84524480d7bmr371742b3a.17.1781635371818; Tue, 16 Jun 2026 11:42:51 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 15/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_tb_trans_cb_t Date: Tue, 16 Jun 2026 11:42:19 -0700 Message-ID: <20260616184230.303038-16-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=I/ZVgtgg c=1 sm=1 tr=0 ts=6a31992d cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=deo0yMGDrNm56YX46o0A:9 a=O8hF6Hzn-FEA:10 a=IoOABgeZipijB_acs4fv:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX9ahtqm8T0c0Z yfkGORJQRbHyURCDyrzwd8gx9p21HvWBcw4hpT8dznqe25zYX+QpogyXQet3v73l8I8hVwG1bul 7UaIcfm8bB/EBlLphhu9QH2f9u6UhW0= X-Proofpoint-ORIG-GUID: k1ovqoRcCUnXsEKZyXrJ3BAbvgmy54uq X-Proofpoint-GUID: k1ovqoRcCUnXsEKZyXrJ3BAbvgmy54uq X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX6Qq1WWMt0HGl dwlA8x68o0gRUgvoPMpF9ZDg77jIv8f3sum8p48Ni7FosAumlacisSxTvmM/emX0ySCSx/C/9PE xPBeyLPlgKzHVItDz/3fLxU4S+AC7SojCG1uYXh56ZLbzFxA4bI5fdg1uYpIuFMQbDrrDY3V4sB uMQM9L42zemUe2fGiyUyiATASzVxi29pO8wwnkIXuYf4kwyqS1MH3HMT1VPAWE2fe4GREAN897t 8vHxmLWZsKUudEZ9MPa+H69BIRpDrpz4bZw/2qR9/ysqyozzeqRaNp5GGC0Wy7LtdUKN66Lgrtr JjpFMtRqPok7ypWZWa27U5myoi86/+GUNj34BHYkwliNaPK3yYuyRa026csSy4tSTJFUlm2Ardl 3z++k7F7xgkQWjPiBMYMT8tnxwMPjS0fX0xvOAmxg8YZeS8dn1TA3B3UqX4E1E9Iv0OR4QcYKMH VdZIMEU+eKYGtERyLhw== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 adultscore=0 malwarescore=0 spamscore=0 clxscore=1015 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635549251158501 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-16-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635494; cv=none; d=zohomail.com; s=zohoarc; b=QyjZbo/Q2eGpPzkSdSlCAqeeuICP7etwVJlQwMFKMSUAQAaNIEZMmmQGHldMXusmhtSq3al810QxmkpDq9PQUgmdQTM92wGzBj3bcXZHH1BtDzCfk0XtAZMLV0u6ckYKi7Y6i8IRZ7+nOjR+QsDw92e7wdsU53veq45SODopgdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635494; 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=iSZ5eTpDvwJnBe6E5M1tP2c5y2fJuYmVfuWGsUxoMh8=; b=Qh6sc7asPRLGt52pYU3UljhGojaBlkEqCx+IkgDJW2AiXhR3aCBVvKG4GBUgIuM8iBYeoubTHgDUIV4NaoO83DaKUTePMl5Pwsnpe7dXFILpL5QKBGge1C1tAvL6McS2sztudNpXcChupML2ooq9n2b1PZlLpsZ3Ek/aLwGZ9/8= 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 178163549399275.43955519914152; Tue, 16 Jun 2026 11:44:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkn-0004hg-KB; Tue, 16 Jun 2026 14:43: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 1wZYkX-0004T4-P8 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:02 -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 1wZYkS-0000SM-9B for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:01 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIObT33966031 for ; Tue, 16 Jun 2026 18:42:55 GMT Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etx8kc7xq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:54 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c85a2f19558so2678881a12.2 for ; Tue, 16 Jun 2026 11:42:54 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=iSZ5eTpDvwJ nBe6E5M1tP2c5y2fJuYmVfuWGsUxoMh8=; b=cMcgPFkQwVIxC+rFl8yUkOIUgU8 FncYQ5xsvJnTz/2FEkUejnISLP6gudtCdi0G7jzkgdQ/FmfW4C8wyjY64SDJaubT pOcGFnyylWn1wXzHPwfKIaXgcXmM8KJYu31/5iLRtF2V2GOpkXMdYWQjm7YAhf2S m3VTIUPSoJ+QOputVTVyTxJ7eNehhmGrDKdbtxAXDmJNln6UpiuHZu64pcLdn2UH DqZy4GrZBdgi0/msAvAAO6ezM4sfYbK4fnb3B9CgdwlfkhL1wVE4XEgyxzPWtSkR jq8k20Q/U8KHbhjfO/EEE5Q70pmb6nlOI1vZ0mPB9809XL5OS7PIoZsAb3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635374; x=1782240174; 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=iSZ5eTpDvwJnBe6E5M1tP2c5y2fJuYmVfuWGsUxoMh8=; b=E+HgvVE3OJmaSk2D4evlRjK607mVU+zw8DL0zKupMXvf/dZUaSvGswfv3HNf87hCbx bcGkdfJfhOlJi5pQwysSfwGq+smuiWRz+dDqIi/lIjMvtS4WNjnfeEOB1e1QaWdxNykB obuZE23BK9Gcx6KeTvva4pGus28zT7ob9MXl5DdUV9c4EJAvTfgKxpJq+mj8R4sXrMJN VohpOCJE2iirdKq8XyIVdiLd3psdDVMyetethqSDD+/rV/mg07QlwjxDdSDR5io5qL57 zTeeu3KLldZmOW4fwrOOV4ysqeDn/jmBf3S06GMl59BUNmCh9mvcSiYLMLvv6KVQeKbZ pjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635374; x=1782240174; 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=iSZ5eTpDvwJnBe6E5M1tP2c5y2fJuYmVfuWGsUxoMh8=; b=OT+RBcK/FIWZcCB8M+oHyy4TamVvgkbAkpNF8bo4tjL27/GamPqh8RYIFierwqyKhw fmIRRvA0EDpUf9On0tgNuRxKq/XZ3ZJVpl/TuEafQ9pXmFPD4KQekhAhNB3ozSbqpOoa TsqYcWW17hPLvqueRsgfmPwq+Tt3xTIodvZ3Ww6jOhDZdyrY64Gdng5OfvjGDLCXKuCr /nJRDq9UC427yIeh4sC16LaFPs9x0MY/GlJXNeu+jidTEnSafFrTF7OiZycY2K0Zq/JL I+bxn/fcURBAVgX46AImECvtW1BTJYN/J/ICNJIUgyxRPZPfhhDTi9/6k83YoI1s6MCw Uohg== X-Gm-Message-State: AOJu0Yx71XkmL+03lVHJ1uZTZA5gdTMrpUovvDcEEhkIV2IQdiuiGHKk 8z9myZCjm6OsBHJllm9raeiSZG3PmX6NnBiUp0/t7W5u8+4BLlKx9115Gc21hSzhpbBnm6IpMfK MMIs8xM/zglGZY7kSNQ1smtvHqCl9zgE7ECthb6z0jkfQgqkyfYq5e4l4EdxE7h1LU6zz X-Gm-Gg: Acq92OEmhyTfY7igCd7sRpo4XIxL9dsgBLEuKdjpwRBLuMuIHiOiy6tZZB7ZvqdcVTY otbjx4ONWzEbWi+N4P73yZxtjCs8kt0O0IUrx1QFXamo5cBnz72o+cL8bTExIgweuuPOjh17QlE nLj5heBVFRpCzlR8/vQspsZAYd5PwO2VQ8KNgT3ZODSPt6f9S8Mq42VngTla6T1IJ0XNdnJRAiW sYJy74XzUYCucHaXxMWwKpzdHUCIge6poNQfo6b2FiMnDE9BpvFC7zetEpszmQph3PTD7iBAph0 4czOceUWahnQ6MWz/cWvk4UZZwVtHV36t18soQn+1ecVBYIJuC7AoweuyreCyqOXHPXivjxEFwq lgPMDjvTCMYKlNWloTRolX+MckG9moFpezUGzos3ByIWu+3steg1AIHDgz7CrwbSvV4gSrK0x6R 5NJgwyz/M= X-Received: by 2002:a05:6a20:430b:b0:3b4:7163:a7f0 with SMTP id adf61e73a8af0-3b8b74d2881mr546664637.29.1781635373858; Tue, 16 Jun 2026 11:42:53 -0700 (PDT) X-Received: by 2002:a05:6a20:430b:b0:3b4:7163:a7f0 with SMTP id adf61e73a8af0-3b8b74d2881mr546625637.29.1781635373265; Tue, 16 Jun 2026 11:42:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 16/26] plugins: add userdata to qemu_plugin_vcpu_tb_trans_cb_t Date: Tue, 16 Jun 2026 11:42:20 -0700 Message-ID: <20260616184230.303038-17-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX/zLjWdLkfUv9 xDp1ln+IIXS7IRRlXzpDuMJiKj6UhIFpFj7cGFsDjquLqtRcTLiBXY23b7IcPfgMbJgmiZ4Go3X w72iPsp0Bc/X8E2D/9XKpWYp46o3LICotTHzrWPFxRRGLvjWoLg9AQ3rsDOfsBAbbMFSVWFo6Bf FbsEjkFos3xJnwBam9xG4QuzFlfGJSfp1aGtKMSXK7qgrnjb9QuWw9UxfIcNueso6qbPLOlyFzJ 01ItmCF4eLsE0ckI+JRVWo4Me0+/2H5Z8bPClnVxSCITd508iGvgNltwHudF175ysZR9gFwqlmt TABIS497Lz2VMA+Aa2ePXu5aXHWFq6tXz2IZ7C82qA4V7RFEjDl/SvT0+AHFdu3TyPhL100Qt08 tH0DrSKg2aBZQawxfTsodOX6Um/6WsD7me+v09aDLh4clseTIO3sbE1N1ZvQ+i8Zcrg5hnugrXm ep6iCbNhYbylxzGENIg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX5GP4cD3ITIAh PrLq9IH1D/43ixtTjMKQ9dkDRSJIOHXqyGKtRLn2A5Xk4Ftfq+9L30kYrSvuci6/CWVJXYSAiE/ RXOwnutmGPp/ditLlxhEyHJmRLoOBls= X-Proofpoint-ORIG-GUID: hFeJ8VIaHn4xzeyJJ0aIPXmRxmfDDMSz X-Authority-Analysis: v=2.4 cv=dZawG3Xe c=1 sm=1 tr=0 ts=6a31992e cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=t56wdHKumdETyko2czkA:9 a=O8hF6Hzn-FEA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: hFeJ8VIaHn4xzeyJJ0aIPXmRxmfDDMSz 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635496720158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-17-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635476; cv=none; d=zohomail.com; s=zohoarc; b=SoxT4rK++UZ9ddKLKMu/FQZAq0u513hCxUIbKYGQP3opRh9FMia16bn89tzlHyWj4LdXQOVwFsx9x6Ut70jZSqbnzw1nuYwGzb5hfVtVea4Bbywd3hDn9XBWIKO5pnFNFhD+V2NWbAL+TUpQXpYs/Zu6jocu92HH/5TpKcpvfzI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635476; 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=Zn6ZgOS8OUlKzC1zth9GAtM+lwu0NbsIsusKm7Q1gOw=; b=O0pRFNKn9abQi+UGKtGKUgS4FVI19h8uF+wI9L7m/yVMr3ADgzF2WTocEEPJuz3+8NufS7KNhNW2pHEvU6NqoU+BRyZ2eXpZI6jkDpMwJv9mVk4bJ5b5ZXrw+K3KRqYGeI8CwJgeXbeKIVhGi/wom3H08N8laXq5Tz9pEsN3deo= 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 178163547634594.01113637797982; Tue, 16 Jun 2026 11:44:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYks-0004uV-4y; Tue, 16 Jun 2026 14:43: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 1wZYkh-0004fB-SV for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43: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 1wZYke-0000Sa-Bu for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:11 -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 65GIOXds397506 for ; Tue, 16 Jun 2026 18:42:56 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ety52uvqh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:56 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8423f1fe39eso5669551b3a.1 for ; Tue, 16 Jun 2026 11:42:56 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=Zn6ZgOS8OUl KzC1zth9GAtM+lwu0NbsIsusKm7Q1gOw=; b=T2jkZny7BkcAlvMkVxHPOrClkoQ FxoROkklFTOKrgGwsMclXGAZm6qToVe+heU9NOBqHNOPCTYpcwYJ8Vk/60GAvTwI yYqooEi37PrmP1Ikq4bm1tDNCAnZCXmbqls3yKGdOgNP2JlpV5R6O08fofSTQxUL FnVvJQ1ejLKjST7je14Vv8DnIR8R2wG+nrGrmRCt4Frh7lJft8WAT4XCQ05ElGqR 3xsZwutCQQFemH2YtfDBN+S+SUxE/mIbU0fKY6VFxhPfW7eq2uFMDn2VgZhqgIG8 KOhstT+wHazgxdxfxReo2Kl/rLt7TRf1a+hToyv+N2jnUMlIdTlB0ijTfeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635376; x=1782240176; 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=Zn6ZgOS8OUlKzC1zth9GAtM+lwu0NbsIsusKm7Q1gOw=; b=iCXaknONTqhotnWZJ2hlQ7A68FqxeYxJPS5HebQW5jB4H3JAdXrwqtyqRd3s6lKKXw /787jH5vVA6oOUi5WK9/qzx02wr7WR+SPMlCo+6VJ4aIT1/EXCJhawyqVIMtvei5SK94 XWglZqF4GE82LQhT4I8U5GRJKXke51KF/roktEffASHZyiXTh3T6c/LLS6OK/aoE0wKZ iVHN4BNQHJMBrbxk+BkRjg38lB+mebzUHcpR0sHFgKFNReq6Ob+SftZva4/9HYeVO+lD vs78AYG/tMPJa8unyY8YJY2hENDI22DE0sgoPjCbZrnkaKbIjnWmUCghntFP74gINYad TVXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635376; x=1782240176; 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=Zn6ZgOS8OUlKzC1zth9GAtM+lwu0NbsIsusKm7Q1gOw=; b=pfjKezAXlJJf7GBMBh4JsrouDBuovIaE6ck0cemibUWbDpXqCaidjh3K9i2nW8+uQ7 QhM9xmDIScY0febAeT88M0dadjF0XEsLfv30FF+pd6v7blndC+9sYeOkOwVsfLJ+HcX3 Ccr08rEM9RyObN0eCjaE7jFG5/yK/U6g9lf7LBr06T40DathwSZ7yIsX9+4M78Aes4kY LZWogvu+ryVkXPa5bJ8YCTcarJFt1imTTVW+g/dqquay2CcBqxoVHxTNT119uWpr11Vo BDTiLkfgNAEdtcg+HnOOppdWCoCtKJGuxuwQQDVV1Tm4dabs0dyliIh2ZhWI8874yQ5P ap6g== X-Gm-Message-State: AOJu0YwkIpeNyj6neuHHbNR+OaFIlwO5CJaEsAg7TpwBdgsTfhIBn2F8 FXW3bJOVjuTB3nNW8HbPCqpfqgDLFmha6ao/sUNpBNxgOWZjX19XNF9l+t1gpWMjKJFa4jovgox bRHknvLWr6kIiKU3i2Tc/xZ1gWQ8Ctx2EwPJlpEC+OQdcu2PrsKVejltpoF0BoKo3dUG3 X-Gm-Gg: Acq92OF2ozQ39wJJreLHlv4foFPwQzN4zf1ICgOQoNL97jddFzNl434rYRbNaxzAJxM wkDDnYZebqdo6r5wN9e7WNGmZnxkj+QeMVz6FAZ7MFUNFRWr/n/T1KtqgA9NxHKeh4sUOWmN24+ FU6H4eZNU4fn53rj0wW65CKgKYkn7QUPBqTNfadU25ocjTpfFSsHW9dD+PBL/R+7oq0ad+OeQbF oc2Hh8wYwzG23bDOh9wiox7/ttTbG4D9t8s7p3N512rLk8LMD7MVpXLHg+ar+3AQRIF5M5lFYCK iXlya3tY5F3AEUeU3d/o7ibNTpGDz5oXvaO1mJsd/HD1oiQGuHnSGdnK2GfglbzY2oJcZ1p9+yB EJa5vhq9eG6P4fu1rXpD70/zvqkLMwve0G4MgQMfCYt0z+CjtAz7gPMpovOUaON3JDReNxa9tR/ rIuD2F16U= X-Received: by 2002:a05:6a00:340d:b0:842:5c60:51c with SMTP id d2e1a72fcca58-84524574e5cmr322944b3a.37.1781635375641; Tue, 16 Jun 2026 11:42:55 -0700 (PDT) X-Received: by 2002:a05:6a00:340d:b0:842:5c60:51c with SMTP id d2e1a72fcca58-84524574e5cmr322925b3a.37.1781635375204; Tue, 16 Jun 2026 11:42:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 17/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_cb_t Date: Tue, 16 Jun 2026 11:42:21 -0700 Message-ID: <20260616184230.303038-18-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX3QspLrq6J7AZ sdzhFiKiFa1JRwtMlftEe6VWixis0GJLORrKLSV2IMHxeWdkHvPr85BPD+ezKUENx8KZ0b6nOtk pYPHBO8r7X/EN3FEMr+GBGscKCfL5po= X-Authority-Analysis: v=2.4 cv=FJwrAeos c=1 sm=1 tr=0 ts=6a319930 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=XHT7D-x7ZMtFmikgfWMA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX2pOTKGW8aeZD Bnlf22XfSpmJ9a9VOY+LOfbk3A+scAkH/vohskMN3p0FYOkUcqR1a5ESqdronn8UUNO3Uq6HgJV IZOTiejlin8o52IZQQbmmCPBlsv4E9UJwaj7U8FsTMurt1oysynXHq0kg0djNZ9RTerYIaFFl+V ntPCaYZAzIW6FRDUwDaUlJPK7t77kwto+wJnyLOFRJGlHejgSB2oXLFXVF8GxCrbkb/vCPmxxs+ jn05tn6hV38R14z2qlhLecZPHAG3l9u+GgCcVt258FvjHovut9ZfPx5UDS3lOmqKB7i7NTYQarl LdDP6Q9mwYKdG6to+P4+JYUJPO//dha3yTC9LHnpoFX9KqNTbCF3vEZvbHx1rVP5ugs0FCGJWh3 XAwQh/bkvkYmEcIYEfB5gxQwM4qlSf7R7UFOJfjtrUU3T2wYspDEiuk16sgQypB8Po3/A1XxLix qjyDgDG7z8RyJmJ4hSA== X-Proofpoint-ORIG-GUID: CvYJsNni_3Pgj5GZWV-BxdBB6izfySAr X-Proofpoint-GUID: CvYJsNni_3Pgj5GZWV-BxdBB6izfySAr 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635476580158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-18-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635475; cv=none; d=zohomail.com; s=zohoarc; b=FdBi737+WnDTiZJKZbnjsZTU7vKjr7klaJ8ngh/uyljTHgnkcmSVPGFfNFniQ43IPQ5XrMCDJieNLxm/wgDyoOLfdFXPPM1cml2Dga5IMKFCOqkM84Wod7Viz8r3AEYR1mb+H08ogUTcKT/ArgPszUeK3TVdKHTly67ivC7wk4o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635475; 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=MjXOHfx5o5RrTonUDljOc7syG8vIMcs7qBl+YmeQS5w=; b=P1zr/QjLc9IuAnC5VFhkUuyr+b72/D1TIg/Bx51bCzZIP44RXIJt36yD+iJegxXuz34eMe0Ohs0Pbw7SixKzwFqKqWYre/vIjpCyS7QfudFIxAfA64RQUKFuipHlClei78wDZIvDPJvLhXN5HxAO+ZZ9XLytYWFph1GTn2lJgwo= 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 1781635475782776.497614217853; Tue, 16 Jun 2026 11:44:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkw-00058I-Fk; Tue, 16 Jun 2026 14:43:27 -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 1wZYki-0004fK-5Y for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43: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 1wZYkf-0000Sl-OX for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:11 -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 65GIOYLJ382253 for ; Tue, 16 Jun 2026 18:42:58 GMT Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfmf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:58 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8423f1fe39eso5669578b3a.1 for ; Tue, 16 Jun 2026 11:42:58 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=MjXOHfx5o5R rTonUDljOc7syG8vIMcs7qBl+YmeQS5w=; b=a1bQtXYY3gL1xMCAQNivcKIkHVI YZe3LmrDI8bCpktyGtsF7Cs7H3d2JNxohsLZQTHD9ClZCtlvHPOtI2aJltC2xT61 gRg7SyIS9+HUq19OhSKPsCapCG6H/Q3jLvrh3fMzysRRPw//9R8g9zrWJxf9/W0K LynwkJoVVxHSgVnIBM3eX1Asm2N8kppJbkQweP/RlwskVu9htZyRveQtbegWAQOo OAToQIDw2JTLfevYk5RUad7MjT459TTNWekyy50xPhPyLhDSLAa2wGeWLj/+Buyj dR107340ukyRfJHbFYvhdp4R/A9Rvyd5w7VTWfmBHnDCJbNjZSNnyQLPtIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635377; x=1782240177; 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=MjXOHfx5o5RrTonUDljOc7syG8vIMcs7qBl+YmeQS5w=; b=Bw9LT7meK3vub7edd9YwINkcgkOS4eMXTsKjT6uudkwiPSjj4tGxAPBu9gC/5EZvnB g+hOvNzxnSBzJhXqyVnkS0G1Sr6vMJTvj/AuSv2oyGhfYyHZIFNeoAVGmyHcAynAcsND GDr4JLiVI7wfI+2/BBUhmjfl4jck+LTf8Cd4ID80Qk22N6azZZKP2Ef7fTogh+qlt43Z qDOXanB3jFTepZZrs4SRsJ5NZ3163i5jnJE/w5aFv0VkJ/ecdnROml4dTGhf/5IRaj4h z7UZs9ee+RlDo7dppWMRMB7A/UP030D/emOdt1GI84nd9go9EMu4+l7EvtR0r4Qm+KJi 8sfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635377; x=1782240177; 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=MjXOHfx5o5RrTonUDljOc7syG8vIMcs7qBl+YmeQS5w=; b=nRBQkieTNB1BAFGolxA4T64ErYGrPCIHYFZK04twyakrHzU3zkevws9a+Pth35t6+2 cBLVmZqq8WshqJw5NHTcsto2j68bT6xnHMA8xF8hsIXAZ1fmaYfxQWbwdNQ8F4lfQ/sN SAkt7jgKn3riNxOhhasqVFxz7cJMzBpI3ldu8vEk6Wl4e3HJxybbTq1+z0mrmL2Y1Isk VCucd3GxHG2U0UzX4KvhAlXv+7RP0D+6gSSllwzx9nkZVuFYK44E1PrmvKvtqVKS0lZ8 +K5SzAe2owqxBbTXwhvHwe0xhoxKRpfAr08DCAF8zgNysX3dCKqOTluNjtHFiTb4OdUA z9Sw== X-Gm-Message-State: AOJu0YzMRoc9kZ9bVsDn1wCadIWz0KRO7V6hKHFfslIblKT5FzFxCEcf KLwGPipZ2nR9MlgKdyXpI7PW4aidpi00cdU6IAr3XVX4Ui4lUagIgVvGqMHfupxUW64nZqn9WSq AYdzHuLCLzzGbRbFAlHNllDMHuOZMipXnE+ScjQPm7p1qieJCEZg8HvdCjG/f/jSYv9px X-Gm-Gg: Acq92OELuy3SAijfzguyW6abQs5X9PtGP2jclFYm7k0X/J4NbfnBL/gyyqDyLIVgLA2 kmFg7rdT7fd5IWkIRW4BJmVhtGLT5S68quR15tEOwvnzosWzNyBfSILgOXg7kGsLFcKXumV+p9J ARIlqKAfCHL6eEr7pattFCz3smlqcCHc9vcBO3IPfS+NPc3InnaBYxh8W+DFKi3elB+/rpbwcc0 yJYX5ehcELpoNTfr3ggWBBfU0+PzfjaKFJYo/jR+YIa9R9QWbu7/hhDy/5cWL2gSj1EibSFCVPS +pLT0Ekoao8dZikdOBfMmyq1Lyv9wzeTAqH3xU/86NmZDalvT0Gw2+b+izxtk24xNUfEHyFb+V3 K4fETD6a+gA4dK7xjOXVfp/PlR+DWsoIieChPlB6vIShzguMn0ytQOmISvtcmk2iAMYAc/gjCEz xUY4KCuGY= X-Received: by 2002:a05:6a00:1782:b0:842:5931:7b88 with SMTP id d2e1a72fcca58-845244181camr412511b3a.1.1781635377311; Tue, 16 Jun 2026 11:42:57 -0700 (PDT) X-Received: by 2002:a05:6a00:1782:b0:842:5931:7b88 with SMTP id d2e1a72fcca58-845244181camr412482b3a.1.1781635376857; Tue, 16 Jun 2026 11:42:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 18/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_cb Date: Tue, 16 Jun 2026 11:42:22 -0700 Message-ID: <20260616184230.303038-19-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: evmJ1qmOTRXgKYcVEmxcOFUN9Q7aACZ8 X-Proofpoint-ORIG-GUID: evmJ1qmOTRXgKYcVEmxcOFUN9Q7aACZ8 X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a319932 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=HFGiEJlbZgj7dAjcEtYA:9 a=2VI0MkxyNR6bbpdq8BZq:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX7TZyVtr5qKb3 lzoTjFbt1/e8W+4Fz9T5Y8uNzhGTmDXM17zzWxYGf12hJm/u6QVLVfo4Zw1nGtirOVrN3fxWcLt +LTE+I9E1uR1YBYHN49kGqFb42eHbDcG9r8yc/SwlW8v+CvZH2Y3DvB5TdTcn50KBnEFrm4sAaA qtyx+MtnFNEA3EuZSmL5KLCN3mOwqkntUeHVlVKEZkkLx4kBQnqGz55aDx3fIYoAXHknDauo/Ur t6YL7PzEDf0eVdLKZrROkx7KvA16MNj5cJPQWatfsP2J//uCISDKd5iuca7maf1JhBZ9BxMgmco kPO8pFiKICx9EQuXYdwGNQri0e57uHCrHX2jRDyjSlqiIhcsX9QHfY+Cgb+J0IxBNsOInKoVIGX KZ+2m9ZjedkxShSgEYyQqr6YIxqKZNN8lbHqLvnt04tt7J/i9F3XRfkDh+k4bVNy57LZm6J4/JY FXe1OdJ/+FNzZ0ghHDg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX08odH68V+hoB UpTlyMV+i4cE0q/rTHlsr1vyVPYd7bQLn/o8tdW2KP8ztAN9p04KnY1v6uk8nTT9KsYAZCQ43ge ZDtMM7qMsF1VqobyLq7N7IuniFcVDWk= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635476580158501 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-19-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635526; cv=none; d=zohomail.com; s=zohoarc; b=lBcR8pVN12HeF9t3+hNReSIxa+Dw7Jvm5gFNZXW7VAt9WOUTU6KMTy0tIJkyPqoPO0nI7YNjZ3Z+CHUXMCUpHb+iTJuc1+eBgGGoVJQHEhdzt1++dQEKJMy6HyqUN7mesplJ5j7P5VSi6IQsNDQuP+jWNE14++CwpffcytP+xbk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635526; 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=eyBcxBXkJfGH9Gy/Xug3z1T1zNuaD60JPCtic+o/ssg=; b=N8Q66XkDWn+3OEIwRf/6vtAwEGAHdCHDWNA0i6csr3VVXickr/jZTyWAAjNS6F7U8Oi3TXPyb4Osi/hwoV1haTiAo9c9MWBE+gdwy+YVBjIsJHQ3/CbqqzKXSHZTLsLeq/Yo96mPp2XVc1n7VQKFPz3GCMxw4TwGyzgp2jkkmbQ= 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 1781635526516300.481869222623; Tue, 16 Jun 2026 11:45:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl1-0005DZ-48; Tue, 16 Jun 2026 14:43:31 -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 1wZYkj-0004hj-DX for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:16 -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 1wZYkg-0000T3-GE for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:13 -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 65GIOOpn397028 for ; Tue, 16 Jun 2026 18:42:59 GMT Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ety52uvqu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:42:59 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8423efbfb61so3500116b3a.0 for ; Tue, 16 Jun 2026 11:42:59 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42: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=eyBcxBXkJfG H9Gy/Xug3z1T1zNuaD60JPCtic+o/ssg=; b=ALUD56ixDT5pmomMd9VyHyMCxdM P6QF5A1nJ6WN/EYoFXymwuVk8mqmtJXtuVaVObChiGGg7M2asMqJZh/UCg0oIqL9 wSuPXAGm8sPoZ70pXrNBtvrwel+Pin1aOf1z1X89UWAZvMKIP10hsS1J09I4esFN bBwygm51gPWIbDgx9VL57lV9hIjqW+MQIcOuHlhMDDwtHDRkeR42AjSokxaO6ONK S5rehWQgPwlXm0MErb3TFIqMebFr8aqXpdthNk8tkAvKzz+cbc13f/U7aaZagpp8 eJQAY5cO5I2etfheq1P4C/fZlaGo1Nf+i9Dzmbubd4sKqVICUPeCm7vS1Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635378; x=1782240178; 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=eyBcxBXkJfGH9Gy/Xug3z1T1zNuaD60JPCtic+o/ssg=; b=eMYsXTbrunsAu37wXhdrx57DW0uXqpFrcukRBKjJR0Y9gBsa15D9z88//FPNThicMM cfjN0S/ogbIQ6Mht2lasvmOhNBMMAtrrLdtqIF7xhCoSsGO6SIBqqs6BBF2c0U0EqyBI DfH3jGykwPoIfugy4OixZS7FzibtQ0jbS/NiAhl+QU17TTLoyfCvg4JUrYbHs0jjuYDO C55zIUtK9Xes9oompnozReiVbKkaTi8S6UDtuRdyFrqYXUz8qT6bAnaSfARTVygdO6ph SeAFWBYDDi0jxIDkjH0FaezORtTFFWtRxITpIeEbokZ1mRXaxfIhQ8YgaioDuoWSdl9b 5C9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635378; x=1782240178; 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=eyBcxBXkJfGH9Gy/Xug3z1T1zNuaD60JPCtic+o/ssg=; b=Zr7AO/kRZMu3XfgqrqegIJObbjMW+s/9bVB8vdk5ne5pPGMr4kv62tGvs2EgKAZDLO YyNhglIlzz3ozM2KzqxllzCxkqy3/T8dlus8IiJ0K44Zqx3bf/w2RzJLYsF5WbCHmAtH 9naKnB14wvYvJDwaZbmGetKFn0eWqhuYIyBXueRgGI9jevavhlPK2MUnOCliU+jjIHbv ZIPEc+DOc2UXWAu2kyEmUw3MPdm3qo6UIGEr/LSU4keCmggwITbPd9ucbgnDGF2ZfEso BzuxhzMS1Cvqamt7Kbs9xAspiL/DBFC3anqQolZQv7XJKcIQkD4Xnq4nhr9CQvB3EqpS vMYg== X-Gm-Message-State: AOJu0Yzp9C5wUmauCFYC5Qg+XfFS9iNu30YcTWQwj5oIOUoOC3g/IosK IhYFPxD/gnh8dv41w3KlgDJh+1mcMRXQS6HK9njdRHy/TJOUVwKbUuYpwZWLO3ExGM9609mz6TU iF5x6oqDhtgLJhu9Pd3zCaAwR0Zsf7OAXkcO543Nt6NcUHDClYDJ0zjOrLRlb+GZ99dCB X-Gm-Gg: Acq92OG4XJz5jkkU8OH+NMqb6unzzXnbTRW4SzhLbNAXAvZ2rDHjehl3U3AOrA+koXa ZlaB4A+HKcBrS9Ysh9XSc24YaUGXW7D76vis3Cmn20bfh1D8KkSV7tKXTsPNDdlgTxxshhPcQos W3b7MDoqU0lLfdRXCEvBYbsOz32BnQqySaiWgcfb1oZRW/h3mMgVnXkAZD65MpazqNLoWapyZJp yyPsdppVvimvT2aIqBVeU7uR+fvdXGN3tAmoArPTWMvZC1HEcun/xa95GAmfPiVu+twtzQqeEwL lPuuFWc1gaPjk0oSD1XCZJBpbfPF32g73lS4ryaPxpVlx9lfDNXfdONFS40deQlTE+LCRsDhyEJ RW/nATlsxXCrG48aHnYKEDaxYuOCc4i2pWDhpdSrzGanNfksfgiXDE8BdPCuzWdElnNEmvJVc2q /Gqlb749I= X-Received: by 2002:a05:6a00:1da5:b0:83a:ebec:452f with SMTP id d2e1a72fcca58-845246b6b72mr271179b3a.42.1781635378462; Tue, 16 Jun 2026 11:42:58 -0700 (PDT) X-Received: by 2002:a05:6a00:1da5:b0:83a:ebec:452f with SMTP id d2e1a72fcca58-845246b6b72mr271150b3a.42.1781635377865; Tue, 16 Jun 2026 11:42:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 19/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_filter_cb_t Date: Tue, 16 Jun 2026 11:42:23 -0700 Message-ID: <20260616184230.303038-20-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX80hQ3INLKTjP D4O0HMRO7fZto2jHsS2+ZKvJsB0iV6Xz7ptZSA0sQLQlQlVdYiJeFzSDCHHHjnHGDEgkzWTKPbE lAez+Q7XhhvR3hAxIzEdJFM1MQCHAbU= X-Authority-Analysis: v=2.4 cv=FJwrAeos c=1 sm=1 tr=0 ts=6a319933 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=ZpZNCfPiCzbVQKdpNmsA:9 a=2VI0MkxyNR6bbpdq8BZq:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0yPHouNu96DM s8YNUd2g0h0+0xaokJJINzOCyClPiRDgoUmiCgazLSj++4z4s/+iBTM3EfwQJUy2ehrg9NGbvyu U75rU4ZWAMxF3pNFnHzEEoyi/tgaLhXsFYyaxpyxOQ6ML0F84tkbd73gogXevvL9qwXjPRnL/pQ F6+XDrybqcJGWF13cl1qGau8gT65jsit8KPsJWXbfIXi8nny1NrCyDGx/CTgMY94TVsIAzx17Lk ESdjwdxkss94Do8NUVu8VdQJ9VJjAo4V5hiJnxw6htSWk/9yGAjSkST3IJqqaGkz21VlHav3Yob G5u99gFLgMwu1i9L1Pnng8V+A4WiO54MBTP78gElGEVH5L2/stKGpzyn7RvdGQdG/avGFrMRA2j l2jWCRDKR/BJzEJ8eig/pPo7aEsTlBfMYq3Gk+VY1nNDrMWoMTtS4kkDdUWX6cUuo482g4JxoRy IKpYLBUQl6QZQ1jlQUQ== X-Proofpoint-ORIG-GUID: GhUBCMvxuqG0kj5b2Rv1U3iW31czwvx1 X-Proofpoint-GUID: GhUBCMvxuqG0kj5b2Rv1U3iW31czwvx1 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 adultscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635526995158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-20-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635490; cv=none; d=zohomail.com; s=zohoarc; b=arKaBq4PfgRmTCIF8lKpV0YR5OxN/EYIg5o8iyHiD03Luw3OhHBpu1p5feHq661z6R8TBjmCuK81otArWxNtvLLg2J7OxgeIdG26rXj3KCUH5S18LyuVh2LSUhUiye26vom3xL7UL8B0h6rWx+KeAHszkgHNUCt2LPvejcsGN1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635490; 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=yiVbwioTL3ye/4BGE87zaCpYjIA8+N/nxRR1dbBuLUI=; b=kwcXkDf9lzdycGbW2w+v6y0dfDDUinKnIwJix2FtuJFEBQ0t4ejjMWyll4gmG31j9BJsufJbjPv4AtRCjENUCH+Uu6TqZ/dsQB1VizyEwcuLn09Qbo71jup36iDtVX0O5Ew8y6IAk6dwB6sYvlazBxJgHy6R5fI+k1orf1I3FSM= 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 1781635490844492.53475862364144; Tue, 16 Jun 2026 11:44:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl4-0005V7-BL; Tue, 16 Jun 2026 14:43:34 -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 1wZYkm-0004l2-0a for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:16 -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 1wZYkj-0000TU-SX for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:15 -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 65GIOSTt330734 for ; Tue, 16 Jun 2026 18:43:01 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09gbku1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:01 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8423f544944so3413749b3a.3 for ; Tue, 16 Jun 2026 11:43:01 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:42:58 -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=yiVbwioTL3y e/4BGE87zaCpYjIA8+N/nxRR1dbBuLUI=; b=Q8ymY2TYWQMDJ7SpCsmU/V3Gy0N e7fkPIX2A/g7SDFCvrQy0JRN06GGbeL+IiFYM0jQkLK40cbk+vcHGM4PYwyfphkv 6DJHSyV34nJKKucGGN1bA2DmEkGx7C2NOd4CiwfsZPY1IvShZi/attIf2C/oFfe4 AJH7C2/IsfHfmzDbp9YadhDJ7ZTl0bogbq3XTwIpB3UpFqk9CtEdjMReYcX7M6Mn Gp5LvR+oVsBpqx35/QzGXNpPAu1i8wIn3qk1s7gaoFLX8Z+dxfZwNCPRdEo70Rwu Yvfh5npawHzh40KE2EnlAKjf1vhd/k/4X8zQnhYrxEDRSB1xstHZVsmm5Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635380; x=1782240180; 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=yiVbwioTL3ye/4BGE87zaCpYjIA8+N/nxRR1dbBuLUI=; b=TeYseXatNGyTizyfsx2ws1n8fTZjSYMZO1Gvb45vcik3S2IEy/7dFz6sB+/cO0NGfC QTQ3I0R0nrSDk8y70wooE7G4gKHMzskqA2ZrlcXMrdbRUXL+NgqkjHefcXUVTpm+QDeT aEY8psqsMKGG65+Y6GErQBeZj+NXptQrr3ft+u0sp21EOmGvnqLDSgW2SSExcmxkaX7C d9KKXAY/U59Y5sc/8RUxpl1mjAUtsbFgicxDolJQx4DtpVNKtvQ11Yyavflw6PNShE/t +4j0AleLC0S0TKREt1F8p5s7S6rqySD1JWhvqP71sqr1Oc+sza5FIWfz1j8/6ODU3t4Z n7Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635380; x=1782240180; 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=yiVbwioTL3ye/4BGE87zaCpYjIA8+N/nxRR1dbBuLUI=; b=NIF3RDb0w+R097JKO/oZNPqq9Y/3SQ+90Iy3Pc2Pd0rPYkWy7+jQ3I9Mgn9k28C+1N V46MKXMpAvbvLjFNcmkOyTrzMwUqoBWuivNwWxt7YAtNbAtS+qOXo7OPWubzfoWFPBh9 xxt6W45TP/CPKwGCX0p7YykHK3Qce0P6VgFCB4DAc/pOvU47BjtneY8BewUS1c6x2+0g hP464j8DEP95z62wRnG3LuT1+cSIArxwHEFmru8/oiTACKgtfUJ0ewI7jmhooF1uv36W jDjvMRhx5APfq7AA02mq7gXCaUDRF0xmkDH8Se+QJ1XcF8pwRutdWHbU+hD3lT5lS/8E D5+A== X-Gm-Message-State: AOJu0YwvG+Y15diL9V7Mg1+is+6Bkep13Szk0cuhFXwWUbein/KSE+Y9 YVn2sp4rPZOjLyKckECJ2M7kousBKfqAjpXDlqgUUb2xBhaH/9Cajgc2sg9mrhN8Zxl2RzE/gnI D3YwbtTuhLNmrVhwoK1bGpXgwTMo1CqPS7A4N/5RHv0kiAgfoPCS5w/PY3WA54Sp/HCKP X-Gm-Gg: Acq92OFhSbsa35UdLDqZfIVoTsy/lzZCgVFu7g9g3/n70RoHIYPyhwthT+Tik7jg5XZ x4AxHdNPzSWj3IYe6plSzH+j/QBmqUqyFVetqPkOukMKkoUPfBAsaC+lYL9Ka3vt9YCahv/zq5j XJEMPWBrBT/HyP0V/CRVrJmj6+PE+1jB0vz22lYyvfGMoOTcthRmRRFX2w21mHvVC9Srn6AkeCc UVsjz3jgdGU85ol3d+XeQYrpvGD6skQfTgefvwD92oDO7SY18a2qLovbG5HNe+0GYkc8CskT5c7 tVKxi51ls3WmxVNutA51g/EL2K9BB3YibtXg1JIN5S6UIrU+WWDVi6q8xl8RccRhfTNT8CZOHne 8L0b/MXLlHN4sdux1LvHypugmIqVbCUuuVZ3I9FjP3s4+T6Zsf1ivbi+pwdsFUawrmXvFQiHUpZ 3Mzs4ih9w= X-Received: by 2002:a05:6a00:8014:b0:842:432e:b7ff with SMTP id d2e1a72fcca58-845244820ffmr337573b3a.17.1781635380142; Tue, 16 Jun 2026 11:43:00 -0700 (PDT) X-Received: by 2002:a05:6a00:8014:b0:842:432e:b7ff with SMTP id d2e1a72fcca58-845244820ffmr337553b3a.17.1781635379690; Tue, 16 Jun 2026 11:42:59 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 20/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_filter_cb Date: Tue, 16 Jun 2026 11:42:24 -0700 Message-ID: <20260616184230.303038-21-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX3TA1EwRW+Pw5 PIClBCB+zR2uigtDAue0Ao62OZjRkKx7UScYnVgcgADav1BlY0qhMV9RZVoaLuKteb1MuoAY28x uA3+Qdmdcz7rPM+8suRtf+48sYdb5xKlWVGBS5njCic6C6vFiUEfgHc8S471sEi5dbp3gzmk2Xr 9BLmEqZSvyPaxCS5JkbBXgdykZGfh/3LWeK9rBmAOFZgzK3/elOFs917rw3V3X9UK9yBL65gadT yVUFDpIFDTqg9fW9Txn6LEgUoD1AhKROVUVrgB+UWGKV3cUnqy2sEdc4RrQmqlqn5CvF7CGo9pq O8xZ4qlIBKO+IXU7sNhk648WSXLk0tlC/JyvohscJgu5heSpLIgQkU9txhZzw+kH27WYQo2ZgDP bAFlD3RAzMthBuqsWwaTcOZQ9+vQg2hZFH7FC2BSe5WhTYqtUc1nnUhB5Sh8NUkvMpxMgDP9YqV VduWRetITO/i5VgNu+g== X-Proofpoint-ORIG-GUID: Q2nxNdfZaDWe9ve3qzQCllBnkQp8H9mm X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXw2z2K0PWRyOH zFGlfCHEca1v21hqSHsLKU2G7WUNYUG2/VzL4Z4HfHwhIUiGC13musNXhDC0jEhj2FzccOjagSP s+2sPWX5kaZDYiZ5iYHOK2lgKdGuHdg= X-Authority-Analysis: v=2.4 cv=DLa/JSNb c=1 sm=1 tr=0 ts=6a319935 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=Rmn1aRlouh7kj9PRvo8A:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: Q2nxNdfZaDWe9ve3qzQCllBnkQp8H9mm 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635492787158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-21-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635551; cv=none; d=zohomail.com; s=zohoarc; b=kYJmNm/GifUwOLmBd/xHb/JHlbJCzai5TEdfQWf8ssDkBMy4IrJ03zcRrtD62o4OKRFU8oA0i2PIFJAMrrcUh08vFlXe6hRqBeo5DrKnsRmhH/GAWmB8doOzh/hX042lvzahNs79EjNvjsqtwgk5GJcptTEg6qjs3hKBo+kXIn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635551; 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=travdE4zR8x9DEp5YqtsA2O11xDjJU54CBIk8xi0gw4=; b=Z5grdBCAI5cQGG6jW+urJ+yD8Z9/crkiFnVOr809wL6oAFVdUELKYwM2ab0Mo5SkbEX/x4n/JtlN21ExJCcBw67GrM3r0HovmGDwGy3qsb91Mh1kl94yzpBsfKTTRK2Xnotlat3gyYjLVzE6kDbwv4JS5Jzib9tQbVxNmLx8UMo= 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 1781635551611588.2637628219213; Tue, 16 Jun 2026 11:45:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYkx-00059u-N2; Tue, 16 Jun 2026 14:43:27 -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 1wZYkl-0004l1-S9 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:16 -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 1wZYkj-0000U5-Tf for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:15 -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 65GIOjI5382369 for ; Tue, 16 Jun 2026 18:43:02 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfmy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:02 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8423f3e4728so3490689b3a.2 for ; Tue, 16 Jun 2026 11:43:02 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43: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=travdE4zR8x 9DEp5YqtsA2O11xDjJU54CBIk8xi0gw4=; b=UQWzn5hrLmqrto1gsxPIULQyurt VHcMXNUIhVd8bc+QAd485Hg3H7Lll4mdY482Nq4SQsKd+fVHZviqsnYKRzia8rhk 7upi+Qi+ezfKkMDTY8j6dtiJ0j2Z7FJIB1xfmYcaoM9E3RxlCYMNXJEXtKPDPz4u itABAEflsktJqeS+U9jchWtnSwqnfxox7/6uiWJnid2A1xtj/VWFPeRZ/9W5DHWr M1CIVktBouOCUTD/fBz5wr3UbGbFrFkdtmDB/goljmqVQubF8s5yPiZ7rfqVZa5+ cje54OkV3bAR1Ug2zCxD2NQUFW3tzsC15DrMINBjVOZFtdRuzB0fpgxaumQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635381; x=1782240181; 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=travdE4zR8x9DEp5YqtsA2O11xDjJU54CBIk8xi0gw4=; b=ZtOTCTM36CnVkoT6A4acGqZwwk3l+iS0HJs4dD3zQ40xXKOv5Q97W9SBGGSx+odbAz MpwEbOtp75F/pQoRwTE0tJgqhgRxvmj2YdGxE77CLFxRXX9ideSSPaW3nvxQI3huLMO1 cpBV1qUwL4nSNHQhbQtA9/awWXBdig4mmLIwSaviNF+faKbg6WHJhYXxbbjgrSigY/R4 NUAx5iFCSaxm3QNVl/oujjmf9w/XeMVOsbncDLTiuRFl8Ln6ZmjeSKEBePopttacMirV 8LNPck9DY0/mwTUzxAeyFgfFKFJfTQkUNmUipupEVuCfdattRZL7cJwW9Ilu/C7uRM1b FZ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635381; x=1782240181; 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=travdE4zR8x9DEp5YqtsA2O11xDjJU54CBIk8xi0gw4=; b=MzlppKO+h+h9myDYAQQUUaGdaM5Emo9A9yIs/4v8xvhlb2VtSe3xtLKL/sJi3Wx/r0 0y14ono7xHSBk6ZZb/klse06LPI1eHbq4u6LfJ4ihEtTrXs77D/IdPtwf7ISwckyWR/z l5OorFM07iln29vR6/aTTjShRxHw/gmoo/USVfbqFKacXHZ/+QWKO3oLGoDGifHlMepc b1ieKh84q5WmXK1JS6cVaf/Jkth8qxquXVDPeBh6ePrumOCwAd10agvTXVlSAFpfAoeT nGiPH8eIzHcTTefmmw/KH2grCsAk0Rgj7vGnzyPmJCabftv+JeDZllRSI3JPXGPRXTsL 7uDQ== X-Gm-Message-State: AOJu0YyVYha8+wIjKR8lv9sP5uXD/RAdMSKu865OeIOXWlYz79LhiWvV Rq4QNS+lUtralS+E3ANSjtb9GpkPHkSweAHoHOlRJDxBrgV5MKWsSh+2YUW6DMJUWQ0oX+Ny26C vBYqQMjAwPi86WIWkjt00bnX/ODs7YaZiwQXaTPJHmW4sgU6kOTJySSe64M80IzYySUbE X-Gm-Gg: Acq92OG57WqctUKznynn/AfwcfJUwnCucOW3UT+HwEzo8vQdk5v1GWBUdP5bvri/iyW XsUpkKD2hT1/i1VaaSHXdXi4GR1qlsknIgqu6AS2dLDV+72GXMGHRg2dFJBb0qVV0/KZ/OR5wx5 ZOmdEs+CTAnFcxUrzYk6vpV9bf9cSvVHHpfH8YyY0Mu1CcrVqEQtpBKOA11yf+1IXFnGJfym/80 oZd4OobQvUmJai6VxnvulkYzOncLVThADU2EC6oCblTsiU4o4Sv0E6eMbvJ8XW8VEIrjizWFCyO 2O/Ahdl7PHMTCoyy/u3BG3eKmNZatr2RHaAb6pOZHsh9hevttBQDqpLAm9fRBsVT0u0a8udO24s PRrIeBBOt6FY83jefmmcvEa1y44IM9crgWqysqibFbi0slMR1C0cSBrEVqULboL4Au10s5eMnCz 9KGQLLh50= X-Received: by 2002:a05:6a00:80f:b0:842:5b63:6116 with SMTP id d2e1a72fcca58-8452443f077mr372322b3a.7.1781635381293; Tue, 16 Jun 2026 11:43:01 -0700 (PDT) X-Received: by 2002:a05:6a00:80f:b0:842:5b63:6116 with SMTP id d2e1a72fcca58-8452443f077mr372293b3a.7.1781635380762; Tue, 16 Jun 2026 11:43:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 21/26] plugins: remove qemu_plugin_id from qemu_plugin_vcpu_syscall_ret_cb_t Date: Tue, 16 Jun 2026 11:42:25 -0700 Message-ID: <20260616184230.303038-22-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: rX48M5wWl9I4hDepvi_piS_X2y7H-sXF X-Proofpoint-ORIG-GUID: rX48M5wWl9I4hDepvi_piS_X2y7H-sXF X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a319936 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=wqG2-qjEQvTc715uQEMA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfX0Alw7Bc0Nnt4 bb5IIpSpAqHIGFlZpPjS/wLz97ZIB9bERdgkrTlSmVwFMvITdehFDOXlwM20XBNKT3fFU3nWeaV H4dLqCwVbLbrUrfXRI7TSo9FGY+3bLKGmNZvWQ2Kqc2+TQp464zb2+UXCxbPLLiSDdQ5GKYYkKI LNRReZftnWqVSoOmEthW+9dIVQNzaVbFHnFilFis9flvkY7t+qkhYgSQfFp53kpgpc5X921qbal aga5WThKT4HBkWQQZveimpVb1LnxWsrDO3JZMOhB0piYW3WTY/h2muoqMN+1vBNI7UrquVC+PU7 SFPpM88Oodm09Ug9/dvR2aM6Z6hJQqsXyTUGTu68Cfa/hvDTakQxMfYhfsI9zNMDgdVvdf3YwkQ TGbGXTU0iqI0YycGSu8bYT6TyhbNzEJrzErrl919f97P9Mor+/uMlIcOnyXdgrlMZHkW8BuIZYQ 1jFXwTG3edM7csIYvBg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MCBTYWx0ZWRfXwPzLrnO3tlkq Odz6J8fn5uPutqcqQdJ3gYfqMAwczcR7UQ+oMTLGII+6UwwFFjAHoaWjQ9uZ49HvneKC+1tIFKS +HXt+M3Hg7CXGzApr6nZObo73KWPd/Q= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160190 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: 1781635553152158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-22-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635527; cv=none; d=zohomail.com; s=zohoarc; b=D4nozAKyfrS5zbmyCztpUkTXKO5ca0KUwH6zWd4hzP7COhPSYPaPb3gkjQgnqda6HAmu5hGxHMUnCblDV5a04iMnjItWbPPlIdRjLZhnnL8C1PSQJVWo26FEq0l0cZ/P6NgG3YcshadNOF6URs4QayyfmJmv8q8r9oYkKfH31QU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635527; 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=tY1o+stizURECalBslE/70IyflG64DiO56m5PTWttXQ=; b=Bfid2AiUHAIAjOkhj3bifx34KxZHHxXtbhWdysF7GAfDfH/m20Da3jGoD12W+jmVDczRek4qqoXLOYA2EFdJFLuECJuWre+LVyTjwMFEWVO7Q9GTjZGeKd4Th3dEBelxiaImqIXG4OGyvvX+R0lHbEJH5tToce9kjMj79dY0hAQ= 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 1781635527021692.4886590236911; Tue, 16 Jun 2026 11:45:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl3-0005PG-GS; Tue, 16 Jun 2026 14:43: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 1wZYkn-0004m2-Fy for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:18 -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 1wZYkk-0000UR-Ig for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:17 -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 65GIOqgA382584 for ; Tue, 16 Jun 2026 18:43:03 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfn3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:03 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8425a9979e1so3209040b3a.2 for ; Tue, 16 Jun 2026 11:43:03 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43:01 -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=tY1o+stizUR ECalBslE/70IyflG64DiO56m5PTWttXQ=; b=cKKEV1F84rQQq12WmY4pCCx+Vuf u7H1dW3825AzNDg0kaa/UezovB/aRPq4bUEQQsySjXgEXXutlDVioj3/ibbcN2oN 12VjDPaj4rRMQvg+DnHwin3n/+r1V7s00YbH+hyNLs0Ur0esHd3AXjLfklDQGuYp aSxt/2iT1FSKqUnCc+gHlWfwQ8vtUa0hQK8SoCV6kpVCn4N8nYy7+F9iBjcTF0ur Wx5v2Cq0FdNNC4rUXFnXB934kLJfZvuARztaf5MlfScQjteOF5tvyxeJd7n757yN J37uMrJuloLPCebZIS8XBvF2aAOCAS5MXZIVep4nJG8ooN3a8f0Q9CoZ63A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635383; x=1782240183; 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=tY1o+stizURECalBslE/70IyflG64DiO56m5PTWttXQ=; b=FOjnn1mprr86XAlPj/HqJ1aY+B4h6gVxdunMmLqckemnUNPnjAnOBfl5e5ooP3PEtN PjJJMTs0MkFUs+v7MzQb93uYyLjalVnMJ016f5pJVauH/aZ0vdBbO1qxREvh/V63Ww5m lLk9E0oOAQwocGQ3aMfGP797MHf1RZ/CTyEQHZxRIiji+aUSK+q4JRDxw9/1lgc1hTB+ H8I+aaGZcqN6TVpr2iCy29j23bF5NrLcCjHsNi1wRjXNuFfQH+IXyGMMXkL8vjuoh9kH hdb02ay8sCx32kf00hVWg9d4cc2CAbMsTlkWRJpOfrDNel4bNhgrmqj+2yMJaFohbdSy 5J5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635383; x=1782240183; 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=tY1o+stizURECalBslE/70IyflG64DiO56m5PTWttXQ=; b=BL3a/ps8jOFoV70raRtB8TNaK3Tn9CSE/DvWd/4PUanxu4trLOoCa6RQ8TzYJKJxGg mjNRKLDAq/xXnJb/vpC79RdhpUdCNioaKahqa+sLltNoBBPDX8913I3DOrhCEIgRLZJ2 F1SCXUffG0oFcF/3lK7xp4xZ0jpMBx50KrvlTCK4LNQhzd2GUXSsDF+JxRvUzLk8Lhnz lZ4djkNb3N9HzWcsj7p748TYeXD4UgeOlhFk1gqa4lz5n+UNALhvXrAq4HmiwuliZwbS lCzlWMiS+vtZJr9b2nXOCP5yo4FZEM3DTqU1S+BdrgPN7VAEX9cxbnTFNyv5+CK8bqSf XnAQ== X-Gm-Message-State: AOJu0Yzp16ldAJsHHe7L9BBjfWm1D2d0WT9W5OowVuNJCPfqdkoe4YEQ Slw5bQ7PCoC6EMkbHBSG/jQVE1vJCGvANvthEEoMey5KyQQ4vNuzWdTcD5SHVTF3LVVGagWAJD2 Hw7dw8B3CPrhQglSUQaWV3/bIetzvAdelnjUCbuiR6JleLvoV/xh9FnLXqFloojaeZDzY X-Gm-Gg: Acq92OHQeDos8T/kpX1/Il3vQKt0O719gnakmAjDwhXu6Kud4eawVHAPpbRrs0T+4HF SFp1oS71MEdS8ZpInQVGmDbL8F29QAwUkMRw9/a1Ywf1hKtZotWN3rS9rOY5/qBywRo863RYZ3K 3YuVUeSgJmNMsxr8s4R/9LWVAWEbzE5uJ0ef5EZs+/6E/XX60EACe7u3ZOU6bCDrqyl3Uf/jcUq zm+WR3jWBnsRWsiNgVP9Kiu5vIBGIVuJYG2lazPzQMsT5QlV8/mzUcjZIBlq2aA8gPyAo7Lt0jH c1fT7OgFqemmW8BKGU/PWqxkYPCONKU6X2IBrq011n3BqM4xb8V0baT/iO2s59ROGi8AOrkQqve zM9I3H4Ar71nrBwapR5jSBz7jo8Lv7qPf/6Nzvf03AourH7nfYdHa0QJQO94ZMILFSWYST8LyOQ ZfB6oF+OQ= X-Received: by 2002:a05:6a00:3d54:b0:843:468d:7804 with SMTP id d2e1a72fcca58-84524575795mr359064b3a.34.1781635382670; Tue, 16 Jun 2026 11:43:02 -0700 (PDT) X-Received: by 2002:a05:6a00:3d54:b0:843:468d:7804 with SMTP id d2e1a72fcca58-84524575795mr359033b3a.34.1781635382115; Tue, 16 Jun 2026 11:43:02 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 22/26] plugins: add userdata to qemu_plugin_register_vcpu_syscall_ret_cb Date: Tue, 16 Jun 2026 11:42:26 -0700 Message-ID: <20260616184230.303038-23-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: qpktzwQy32Qou9wSK6r0If-zu92JlXf0 X-Proofpoint-ORIG-GUID: qpktzwQy32Qou9wSK6r0If-zu92JlXf0 X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a319937 cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=HFGiEJlbZgj7dAjcEtYA:9 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX0yc4dpe2tsj2 paVgsCfIgpW0coAuf58wL+k9tneyo0YhiJ6nyKMilEPBkkFeu8u5fVYSpJtwkBnn8K1TE89PIzY WpoBVuAP0JXq5Pyyaezmwcv2ZNtfak7hqZ7EC1KgOk2MjJerlenYMrWNtq2RSj0pAb2A5NLkCKR v4MUj/wqiVfVCP7Ff66bkGJLV+XOiRikLeuyQxRE20NmIP0X3Z1deQES+4u4ogAyorI3GTKZu93 TjhFFCF541hC2YKMztF7at8cMhWu25I4F71R/o2Zfb4MVsxb84POl2VTyvi2kdOtnsaQHNgRNLI 7JQy/XgDkVSK7ycXPcrCtTTXDMyF5NIJNZE0nm8M/VZvH43wgT2UBoi4t4NMOH9WjT2DKd9YaIh KrCMEG6x+uWZUqI/eq+HVr8Y7m0SpzNFEbyPZcaSMz6R0mv2ZVwsdOekHbbBvzjw04krAfZsvzP rGdN35qLoOWVrYoL/XA== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfXw9DG1kTizUfh uGMu3bV7RlW0M66LlnpRfjUagYS0E62yRnjI3ylNbdK9mVwPBco/N3jAFKtOyfik0mSLVLK7pxY axXx2FGDvoFcRdUKYBK5ShA0OhPJLbU= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160191 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: 1781635529022158500 Content-Type: text/plain; charset="utf-8" Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-23-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635484; cv=none; d=zohomail.com; s=zohoarc; b=IGzyZJVbpwyJHNAKkm/ZxfRolK+rS+e2Xg28CJp5ytnV0Jb2uOw80dk4WuhzjQelIj95GWSZ36PYXR+TImFYxZ+HQlaxiLypxKpnOgJoJpM0Tx7u04e/18uyL7o9X2NNZ6MyD7ppD/xQ3A3YGxB4sfYaWMpDMW+vuDRqscamLX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635484; 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=6a/dqxfG3A/Aev/oPDhWaZKrpInAwI8mspSH5mJbZb8=; b=ItX3fvzcghqKIR9yjWU7yYKCC48/e8h1ZxXHA1Q1/zqNspP64JmsvUruziS4Q3qH07TY8pxIVBr58tvLRpJrO+d63QPC93l5EiJdAOZGVrgxBbjQby5EkB0T+TNGXp4x6TF6Qp+cdTZx3tMryD4s8iXNORw1/BlXnthsyFmCHGg= 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 1781635484054679.9321196870378; Tue, 16 Jun 2026 11:44:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl3-0005Nx-3j; Tue, 16 Jun 2026 14:43: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 1wZYkp-0004qM-Is for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:19 -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 1wZYkm-0000Uv-B0 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:19 -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 65GIOcbf382311 for ; Tue, 16 Jun 2026 18:43:05 GMT Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfn6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:04 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8423970cb30so3323460b3a.2 for ; Tue, 16 Jun 2026 11:43:04 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43:02 -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= 6a/dqxfG3A/Aev/oPDhWaZKrpInAwI8mspSH5mJbZb8=; b=ARBrGdjb7syzT23+ FPOe6ZPB2PGc8bMHl+jEke+v5Ji7Ini81F+fibZ7ZooB1aqSog2zVqG5bXIBPPo8 W4g96DJjGuwZZfmwnVBT3y4pZy++SrLTop339lwnYKt1s0mmhYJFPBvjlIKHAfj0 5tF5wQIvfBZG77Q/gJv156THKC9qaEzl7aUOd+THdKj0PtSGbKEmGtvTx82ePe2M C4R6WHITp0PwWPqUSK84+hxX+fYCSw0qAMCjYb4NvaOyvZPhzLQXlVBSnQDk0I+6 tafqIqKPFNjlBsRJjVDAUJIKE3XCyiNK+D4NNIvGQlhUZcvUkl7vZfbP95n+BgMD pT9X2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635384; x=1782240184; 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=6a/dqxfG3A/Aev/oPDhWaZKrpInAwI8mspSH5mJbZb8=; b=bL09kfVsGSkTZLfijwJyM/ZLEnCoPohC1oyRGzJ8dy8BTBqPUfsPHV+qeJ54o3sCDo TB3GZTF7Qb+XmDYqLTPG31F3TzSOxS/vuaEvs3mfOjrv0lY6qW3zaNRm54aQPaEzRh3c n5iBJHK7PsdUxP8LF8DXFWweJb+RsNmpySW3S/wOiSwPX7k62l9eIMck1iqYEFzojsQ6 AyO7DPUKrhcPMkrJ9rwegH5/LMQ2Xc1Cz3blhUGY4ekdBB2neJ/A/4C+QaLPUEIHUfaL VumnzfzxLwM7E/Ya6IO8LZV5vkz6oAGCPjiqg8aBAm33a6iHg9sTbnJpZr5Ioo+Cu9V+ XLKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635384; x=1782240184; 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=6a/dqxfG3A/Aev/oPDhWaZKrpInAwI8mspSH5mJbZb8=; b=Bm4qjHE0E8BOewMCANTkTDfptG6XD4zBbLRhai6QlnHOnraWGg/NK22+rv1Iir3Vhv LnDTPlo5/3OiSh+R/3xcqUB7duPR7yWJgJIJ9DXVO0hFl7hzZhGFzNj2xlUiXpQZ6ggB HQ6JbrKF+22lql4Ywol4ViRUBkk8SZ9SOfkDyQefhKc1FX9/A1J1YU9yU9dsuB5lbnfM 5dKdOFVLlNCyyYNfqyWlcRtcpXv2npetSoTM1qoTl2XzcIICEj0CcxZXYz1iaWezRMxt rZpAoV7kr0UHeh/xh3BHO3VSxOzmGCiUOE/8wxcQYiTLNGIM7su9lZ5T+szOdIT9iCEU rU3w== X-Gm-Message-State: AOJu0Yzfag8sTtAAA6DoJNUvg+xGtSU0tZXkHY5fcZhIGPafQwPIleDY LqJl0u421vLauA1BST0xBxQjEusGiTyA4hxRLPW5lgj0WSJ0xk1GLBLcdaPUHN4foALBxRI4WVm clHeCHJ2XhlvNEU7Ff28y57kVmshTItxPW5309jeq+q1oAGkeLzxrJoBa6AKHUa72RFMc X-Gm-Gg: Acq92OF0tc8I/ZIowHyFfGhDHYS4h8TvFeG1NEyTMe5QRslGEc4D+nPE2Vr6zLQmjSb ruiIglclk4Aeic7xTKY6ioZwVj47eS120R28lQ8wIHx7bzpOsaStcLV9JMmp3LzS/jNmjuKscD/ 4DCdI8lHRyddY/2v8Qj63W2+lr2+uPADAJc7ugrMEBDMuE6z+eOdh0MBPGWYARxFgFY3fp8EWr1 emVFQNjl4bB071F5LF5HJBG+9eBVlUWbtMnmOQAbt+7nY65uqtmNL8faqjjcFm7sNyUc/87jhfh MA/v/uCgZEemRIvxgrDkt2wwv9gX3RXxS9QP1JdSkv9o1LTCti5l0GT+AGVMEAC1l7QJdqhWFTt xUOlAQh+cprNytHb1Sei2efl2Uo4dGlAV31sckwbGk6qo2/Bj8O403RhX7+bptv8axTH+z1xkuU imIK6iDYs= X-Received: by 2002:a05:6a00:2e87:b0:842:3be7:4d55 with SMTP id d2e1a72fcca58-84524452dd7mr342292b3a.11.1781635383881; Tue, 16 Jun 2026 11:43:03 -0700 (PDT) X-Received: by 2002:a05:6a00:2e87:b0:842:3be7:4d55 with SMTP id d2e1a72fcca58-84524452dd7mr342269b3a.11.1781635383343; Tue, 16 Jun 2026 11:43:03 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 23/26] plugins: use consistent parameter documentation for userdata Date: Tue, 16 Jun 2026 11:42:27 -0700 Message-ID: <20260616184230.303038-24-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 5OAksztmwwjzyNt6vWosk9FMSb_xarcs X-Proofpoint-ORIG-GUID: 5OAksztmwwjzyNt6vWosk9FMSb_xarcs X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a319938 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=n1GYMWs_v2V8MhWbidwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX/IMuJtGNH76f 6g30KQtzgQtlJs0DWxDns7UlLIgKjmmyzP7uGftP4fc3LSdz4LpTEgManjDMqMYEayGDrUoSNRM Ad5PRYnMLn0OLDj4VY74OaG9N5ivN0QWmX8+EsAGxsE+mWyLTg0scTI2saOqQeDsUehIVJQX3Oh 5Fcl52In3P85Tot5Z6xjr9txj7DPQTqXkvatuoC0mNuOT8ysCSx9F0djcQdObUQU8Pre8XAzut+ 4QY9ZmdGSNb31HRxjd9sVy4rhUo/NnL9aY8/Cq38TDlFV+4ig6C3SY+aqqx2sVZ/20GjX0Dx/BP hNtNgA8uAz5wXvlMfBjZeLzcHeoI84Ihoz5DcBuaV6rrLcrUMYxUpHXfpGYtQDma5UH9QaDrC5q /7QG+Ya/T4YDSRsVAocAe8TyOogGCqfHbstHtjMitPGIMWCt9TecjJ7Y4iVSZuBzl4RP2oavmOt VNSJ0Iz3VHaW/wCjEUw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX0hadDh/DPiqP l5JOdd37gPy5oBflH6rvn7cqPn7ee60ub5AD9AfPSC9Y5WQnwfcmA8GgK7uFHOa2ZqbhNoTZckN UocEXVHFygGjZ0bqcAxns8+8jckaQuU= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160191 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: 1781635484749158500 Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-24-pierrick= .bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier --- 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635519; cv=none; d=zohomail.com; s=zohoarc; b=gj+qj/TtDUnW9IEVLtryXByi9bdlum7o/hFEgL6zjulVu0Vjo75Cap4VQBYrlGSforRu7bxo/NSdCPdW/8HYq340Miqbj8d+OlfH6iZa2kCxYTZ26e1GGaLokHb1fCMh9M4m8n7LLmhJAdd/Vo0iEcCvWTbZu2Ga5C0UfDQrasA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635519; 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=UIQg4+/jWnCuz+7fw91XflPBlK2moTKwrhihIzUNTG8=; b=dsqUpKOMe2XhxKBFIOJ3HXnAQOeyf2Dl9cBVOtz3AbubaIIoD7464M2cqqQPuXcvA0z4cIDsuddb56XD9NTcdGQQmTFgdiuw8dCyb52JEk44aIet6lLhs+AK9C0YlJgIl60BtX6emtJetj+k6FJmFCeudHnpkdtgRRmSFECwzc0= 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 1781635519837156.1557221164304; Tue, 16 Jun 2026 11:45:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYlD-0005bB-3d; Tue, 16 Jun 2026 14:43:43 -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 1wZYkq-0004ru-IV for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:20 -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 1wZYko-0000V6-0p for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:19 -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 65GIOcbg382311 for ; Tue, 16 Jun 2026 18:43:06 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu4dkjfna-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:05 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-84238e83851so3200452b3a.1 for ; Tue, 16 Jun 2026 11:43:05 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43: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=UIQg4+/jWnC uz+7fw91XflPBlK2moTKwrhihIzUNTG8=; b=e0EUx3Th9F2DCSjO9bOHL/d7Zt5 LIb/BUShFggkkMNIuk1qa8wH9iNEJW0kiiN4tlWfD+/VJDT6RJbaTqK3lyXFS3Cl zAPYLlPosT8LyweYW62rzkO2/nUEq2d73T9Gjr/PAV39nS2dPI9mTv6pBlJRJyWL h/u1qsyH8tf1CS7wpOFq/douQTZaFxTmlbuskD1Bi7oAqg1G1CNrkao/8+QOCzyX kWtt+OC/n0ceA1GjkimASVToOs8hBHUfHRgROoJCNoWzKD5TrKBI3Jif5tahgWQk 9T1YCDrT9oTy3Pm0Gaf9TH1uFju92xLv09+ylGTb9xXZcVd03XoMUdGVuYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635385; x=1782240185; 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=UIQg4+/jWnCuz+7fw91XflPBlK2moTKwrhihIzUNTG8=; b=Vv/xjEWTv0oD6RZoYYzQqr7l0sJ3R6LYdONdSR4pEPwDlmleGGt3UOAOzHIPNU9dYe wzDpnLs4db4zSYgSS+BQHCPRYR+HCD2Ln0p7tZa9tdcNlFSusNkTDIpGliPYj7uPhIOB EVuz0C44lMKerah0nB0xfBDFW8v0xO9DTs5tlaZ3uKjKPSkGE1uMUJIfo5SJpRu9yShE 01m7pB5SfSlckSGpb/vK33s8bEJn6yIyOvKoCCF/KnnwIGIRFuJBrZdfQSaOENn0RrXA bvFMk2rH02DT0uVjOZTqzVT4DDicLYn4ZWi/5mmOndlGuOztIGPv5lhsVGyzuNG9CyKw Acfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635385; x=1782240185; 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=UIQg4+/jWnCuz+7fw91XflPBlK2moTKwrhihIzUNTG8=; b=Qnxuz6F3qzuLBeKNsP27YsPC36WkQCjreQnoUaCvIR11VW69QOKulnGLZIhOEddOwA tjUWAckO6wDiku3FkCCwf8rly9Qi9Ng3Ny1+kp8Jon+4E8hc7mjz0F3wrnRRF2WacFOx 9Kdsqt/rnwbmyxUHoUrlhuN2J0relvFwJz5Zm+KFD85L3Q3BvtvsGaL3GTJ7T2ZXKVzV d8sOLcQHi9n7/Vr2DA/560xLvpE5wWdch2tMxAyuU3yXmKHTqWFzRTcW8baKt0sHqHJ0 oDE/XhN+JnXhqbGkkdSwARdNv2T9nM/rPOoxUtNTpFzc1XMpH/K5X0o7wO0IDUjw/gPn Q0iA== X-Gm-Message-State: AOJu0YzB88OBltZ3gKn3jcp+c2OSmmQqENjjKy7iPvYjq1UDrfNpEL3Q omQ+6j35WPT4o5Eyk8Mlr1sG6hhjkwuaiS9SN+vzEk7PtXmfA5SvfJAVY7AjCgC8Zj6O1osD1dK fpZu3Re0MxBMJBFAsMVRiE1nKZEXonFCcbyk8PPhlvBOj/0ejQmwNl5HhNMI4citGw86k X-Gm-Gg: Acq92OGPWnBIU7DYZUsCC/hQoTIQ5t9OhYnXBsHjpSHM6HJoDofrN1rwFUBnOaw6NxY RXH29MJ22gOYvXezQYCm++VfxO6LaGdYcRPFYuzkQaI8LlwODWbhHeWUEsI4ZlRChvzcmJrjRpt BllaHZYUjweslGZSR0ZIU74EN9hC7gsaTgZS/ppeSxyqVStqc/d4c+Uecqh5QveWiv4VZw5EQi7 yRKVgZPaEN0MKf18MpPgvxQKJFH7l4eUULD5FyQYZ1lleBsg3GYp82Q1Kc6BlKeh4QIW1grURZS wVRpAwDUW18tx+gOSS/X3p+FIppftsGUHmgyKx6fzrJYSSxG6s3xp1OUcSqO1OttTmE9e2obZPx dUqhugsld/u8/Z0VZd5QfAHbKEHW8UbO7WYpEz2HOEetmTtisf8tQSdFUsIUQWxzZFFC2m3IRAT +YqRsS4uM= X-Received: by 2002:a05:6a00:10d2:b0:837:f79d:909 with SMTP id d2e1a72fcca58-845245ab745mr307936b3a.39.1781635385026; Tue, 16 Jun 2026 11:43:05 -0700 (PDT) X-Received: by 2002:a05:6a00:10d2:b0:837:f79d:909 with SMTP id d2e1a72fcca58-845245ab745mr307916b3a.39.1781635384645; Tue, 16 Jun 2026 11:43:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 24/26] scripts/checkpatch: ignore spaces required around some operators in C++ Date: Tue, 16 Jun 2026 11:42:28 -0700 Message-ID: <20260616184230.303038-25-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 2C5OUf3fuw8c4zhE8eLj5yL4wvLTjvIV X-Proofpoint-ORIG-GUID: 2C5OUf3fuw8c4zhE8eLj5yL4wvLTjvIV X-Authority-Analysis: v=2.4 cv=Ibi3n2qa c=1 sm=1 tr=0 ts=6a319939 cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=nUVG7euvARLiU1CHTZIA:9 a=IoOABgeZipijB_acs4fv:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX/vg7a1zMjunI o3pB0ux9hFyFyXyPHAFG+Ds1J4kjoDaUy7tNxyhqoNvqzHVmJTbQBncD6dAMgctntz34eQGmf5E mZOkWt93cgrz038zj6zrb0JzOg4+rq6NY8SzNPLrlfsakKXu1MSN9cMG/jJHrOXEpqqPkxSkc7N yl0mjpxQ1iFhwx1JpoirTdJtmss0f8uRe0jY57eEsxCR7o+1r9gar0mIvbcJUlaQ/6QXYBd7WUs +79JwaVj+FlVjNUmDjLUs1jdaZa/GLcD2mHusi1WrLsoXDQJyz/62ZaWVcZ1TFNB6wVNoHYtK0h JpQUIAMCLK6oTZpePytNlK5DJR9EaLpcNWnuABEJdB+7wpDBESehOdndaJi/GqxpASSlmSydcVa mF/+Y2MfBhcI9UjC3fKBPVulGAGe4igRUYtJbHrSBqT11lQ4gf8mdABEoEIIzUJXlOc4dWownYt sLrUDUQxIhd1x5nKpIw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX88/hZmcAutS6 5Oco8cBJ8GHrTTizjvyH/poqPMB6DL3c1nmdaB4ObH4Iv7FoHDn4wHaNYEsKLGgwsPBhZY+cy8u iy4BNZfxQiitPFWnk5m+35YrS4Vpqvw= 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160191 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: 1781635520919158500 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; = ^ Reviewed-by: Peter Maydell Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-25-pierrick= .bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier --- 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635443; cv=none; d=zohomail.com; s=zohoarc; b=ZFrljD46unQcWZTs3fQC81ue0Qr+FRfM0iaZ0ryL0+PLEX8UGKdl40CwlGJVO/ratOnP/9WVhG/opI06qijHWkZ/JhlrsuEQAez7PocztmsIqg1tYTT3KCP5OtJILIGHhxsSXUhM1NN/vZNVeQqH5R9pfIXD58lpbsFK0koun7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635443; 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=K1HLDWkn+5ASuxJ/N8JVlpoKPwTz5uJ5EAhZ394Q2ms=; b=J2xtJTl/UcsIWTKWQRJuw82kJWuMfv+3GE0cdfZ//GqqWeHSD1mep4hspwXcpKIN8qp6lDZTPnxmuGtINCfZWjG0PINhyLJX1fb30WBHsHLc7HM9z4DIxKi53egn7J9FQ89/8DsxLBaKNDrbFGJ2dJrViHDmPTYFY/OGRb3ovcE= 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 1781635443635903.5033334415369; Tue, 16 Jun 2026 11:44:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYlG-0006Au-Jh; Tue, 16 Jun 2026 14:43:46 -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 1wZYkr-0004ug-VC for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:22 -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 1wZYkq-0000VH-01 for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:21 -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 65GIOplD172527 for ; Tue, 16 Jun 2026 18:43:07 GMT Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4eu09kbhy8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:07 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8423efbfb61so3500167b3a.0 for ; Tue, 16 Jun 2026 11:43:07 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43:05 -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= K1HLDWkn+5ASuxJ/N8JVlpoKPwTz5uJ5EAhZ394Q2ms=; b=jJP8YHpD6JvwNbUU nr0r7xO4tF3Yr5r7s2FDz5fkXGbtyDllKBECbqhq7GGWw+bMX5yCwcDoLWvghBRu tFFK9h17OEZT3mTir6+po6RmVE/awgnEbs+ZaI64lY46dy0u6zbq26kZoFxM5Tci WMis0NVipD8uO+qwTsfRuLSPPvLwO9TdnnHNxkA+w9ENOqWmbUf9C+P8Z4sSHQZm qkERFkwSiSgxI/kZkuf8BGNmc4oGGeKj2gRBUMHeCI/DWsKwXd+LKdaCOcbrTRsp yFVu4fMA8uB+PkddON8bIDI5ro6ixqBGqTNhf5L7eSUU/emQ/OV65hbD9q32VY1h hk25sg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635386; x=1782240186; 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=K1HLDWkn+5ASuxJ/N8JVlpoKPwTz5uJ5EAhZ394Q2ms=; b=X32JLrSczqrm/8iwjhfxnxbAK61Ffpn5m8H28MP0duCoHYt3ppkBmXF+uaYssKeSiD WMbP5ab9W4VN3ccgRzmnv5kCS9DbabswiK74wbB4X3C7EIDoFGauwXVhkn4ORxi+izZR zPA9yCwMNJsBUs0QVKRpt6jSa+HCNQsJnAxurxrA8F4FDQ4/oV1AdNXgiqcVmgk7cwIf sHL8FEvCVJDpkiypPq9ILk9voiqhvv7GORn9zd0sgWxqJc0h6cXtkjjzNECyxORMJvR7 C3v/aJDhMfK+Mh2rHrUpHE61C7YcsqOsC1qehNfVLy0BwypkUC4lT2H1ppqlbl38xJqx V1Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635386; x=1782240186; 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=K1HLDWkn+5ASuxJ/N8JVlpoKPwTz5uJ5EAhZ394Q2ms=; b=dmR6O5K/7bTIBRnvaUt0VxCVeLnZyndkkjbcMK9TjhqWx0nGB9Mb6HjCkGXyNM/Ne4 hWoAHT5ihRWi/gYwXNFDeU7YSxdXyfGC62/b/d33H75I0vGTU7wv9Gm5TQ4B+8YWHOzD CHgor59SjJ5P/hbZQgxQVAeRE6Mp2iKvAZ1L3L7arlFciaAtHwxYsWKAEw61jwA/P+Lt lwbPPre3wfQPwnGJoYuS7IwgMwCIg5TAk8NEsZFBI/TJ2LMwsR55w4szOO//s1Uxsciw EWfcfd8oJZLNdU9ndnXI5+5cyVaoEi8GR86Qdc3mxpn8+iaAB460OASnBYdYJt7c1Jiz 96/g== X-Gm-Message-State: AOJu0YwYL9T1xjspFpKiWjjzbnzqnawv0JS3UwZ+/tWe2aMArzpDmmYM yK7bcy+u0d871WxfFFpxQERwgmWPxfdzIZcXHtIwCiXycvP/mtWVo9znBxEJHSoThKZJHbXzx4U xXlvCQLOa5yu/6OuKsyzkDsE1tqzpUEOICT7Tza+IlnPqiQxp0HG533/Wfoqi6nspWd0q X-Gm-Gg: Acq92OGmAKy3p3qxbMxasm/ir1kxX8ylNxmgTsbM4w6OSafet8zeBvvKxvRybCxTcDn pYkvVFyx9IEN4ivIivUXck6DIkFNHAcLlGh0iGSClrlCvN8foevl+bdmYVtXNX99Z/HQstIEp4x d3hUEWUKtXJSn9xO+ULNE97iZYr26InZ8niHA/AJQkLIQC/xuooRtgo49cZcX5UkfSBCRZ1fsRv r0auy5hp+IyA/RxWo5sR5wHBxBaZBu/erclDwOnlSDZwqH5nMct1Y2XzCg0un8Z0FWsn+xxLEN6 iXB+lVAmGdy3V/ier9KLJvGoQzAoINQdlZMcGfmdE3p46PmsIDbm0IGVjKAM8/nT6d0t2U7F3LZ kIIAnktYSs2dHzVL6K9d3a0GbGhH1XmL0EK6r12uoUU4qRw6k/V9O9QQ3T2cC7LVc6dJM1SB3Ah zYkWUT+hw= X-Received: by 2002:a05:6a00:1995:b0:82f:48e:241c with SMTP id d2e1a72fcca58-8452455005amr330188b3a.23.1781635386210; Tue, 16 Jun 2026 11:43:06 -0700 (PDT) X-Received: by 2002:a05:6a00:1995:b0:82f:48e:241c with SMTP id d2e1a72fcca58-8452455005amr330160b3a.23.1781635385730; Tue, 16 Jun 2026 11:43:05 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 25/26] scripts/checkpatch: remove check on forbidden space before '[' in C++ Date: Tue, 16 Jun 2026 11:42:29 -0700 Message-ID: <20260616184230.303038-26-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-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-Info: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX6QjpOi8Shufx 1wa2MJKv9wsYKEUded20TJcnUHfzqb2qFxYDv0ugA0r//01B5bj7wtlme3Y02Sj98l++srdqYTh iQonWA4QWReqMRt7jBoTZJEhTkr9F38= X-Proofpoint-GUID: T5pbu0ID3tVsYednZPruVIh2E-f-EZR2 X-Authority-Analysis: v=2.4 cv=DoZmPm/+ c=1 sm=1 tr=0 ts=6a31993b cx=c_pps a=mDZGXZTwRPZaeRUbqKGCBw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=KKAkSRfTAAAA:8 a=S56xvJB5AAAA:8 a=w4RrlNedZYh1fdpaRdcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=zc0IvFSfCIW2DFIPzwfm:22 a=cvBusfyB2V15izCimMoJ:22 a=MH9Ivq0PDQRhlrFuIVvX:22 X-Proofpoint-ORIG-GUID: T5pbu0ID3tVsYednZPruVIh2E-f-EZR2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX5J1IKW4plSnO r7k9eBnvPNt6zaeoc9o66Ky/kc/gWwvS4e1KoQt5oD0LJA5r3NkDo1ouggUF3jLyML/8P3ThEAW FS8jHkUTxGwn7nOl3LO2EShpopq4aIKMCs/MQ5zaP9ObRRa7lqdiCxqYk8p/SU6wjETyTFDqrRg RYJpcD2stuXCXhiVlumAo7vml2Zl+ewyMpIEqsNnSaejLI8jmDFFhkcK/mayHuHN2Uc4O8IH/qd 59JySuAnJ3Z+Hd2yiTlnRIApeC30BOYM4LNMvaskwjiPijsK/al7gN82e9YlQfDrW1NcMuaFYor xnTMmDrhFaiWydly4NSOhD7E8uzy8Fp7GSfVJxCUW+xJv3gaskElMKBARNxEDnxm5B5xu9EoHC7 2NzlGwtEkNohEkVe2pO4hK3cyPJRkoMKgbacKFd4W6+N2ih2qkdOTyYs7iYDFkl+yAm6jalhICG ooqLrVwkMAuHFuuykOw== 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 phishscore=0 adultscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160191 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: 1781635444552158500 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 Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-26-pierrick= .bouvier@oss.qualcomm.com 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.47.3 From nobody Sun Jul 26 13:29:18 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=1781635425; cv=none; d=zohomail.com; s=zohoarc; b=gtgTU9gs6dT8/Dl0EDo8NgaVftrDb6NKJ0Zh397EKtEAfFLtvxqsX4me1WIX1W6vqZtXXf5K6KhENrePt4VzeoLgKiNZQkBJ2TnFoin5vn3K7/MgKr0gs9UbxV/75ijDSMoj2hfombDHIEK0F3D9TsZNxg2dJ6cLuiXukXpnfm4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781635425; 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=i7fAeaaOPcn19y/dAG/sD8eZZ4gnfNsQjKyrEUqzSYg=; b=SICllXEuWtoc9tJSXATu3vXH8pAJliqvQXjBra77N5nDGMBPCTfqulYQ6ImiGpvT2OPwXg2xWtApBWOJ+imXaE4MYqJC3D/TRrOLG59oSpCA2+lkKlEo73mPJfFOX+iRBcpdrpeaI4xxp8cfD9lYIjx9NkAz5XmAVn3KMK3O0LA= 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 1781635425854703.5034128089573; Tue, 16 Jun 2026 11:43:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wZYl2-0005Hy-6l; Tue, 16 Jun 2026 14:43: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 1wZYkj-0004hk-Fy for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:16 -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 1wZYkg-0000VP-8g for qemu-devel@nongnu.org; Tue, 16 Jun 2026 14:43:13 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65GIOeK23966063 for ; Tue, 16 Jun 2026 18:43:08 GMT Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4etx8kc7yh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 16 Jun 2026 18:43:08 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-842688fa7b8so132734b3a.0 for ; Tue, 16 Jun 2026 11:43:08 -0700 (PDT) Received: from pc.taild8403c.ts.net (216-71-219-44.dyn.novuscom.net. [216.71.219.44]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8434b048496sm14602946b3a.54.2026.06.16.11.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 11:43:05 -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=i7fAeaaOPcn 19y/dAG/sD8eZZ4gnfNsQjKyrEUqzSYg=; b=Sua31umkKBscSJEzcAbOB1DlngW xWMRiL9R7bodm9gujMK1E0meshlFNcLGS4o9RgwTsyvG5f6mKHVZF9O+/CWgVA21 7ews6d/hppPp760akOLeRUXDCZEfv9fP15ajuPBExUVSRcgIlTj6HGTv5QhXia3v BUXP0q4Dmh+WhAC9vXoJBmIbVEsABpG+LTF+aLIiYqJddNrEtHOZsx25Xl8COAaR 2dFiTtP1C7ZiT/ua/96OoJVEZC2W3WZKFK9VD4YtCxjzKNq8BLQBP6e6ZMPCOeM5 w3GXlaoLSiCS7Gfhoj95dONoWR4hnG2mGetu5isGdNw5zncO3YVyOBGcz1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1781635387; x=1782240187; 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=i7fAeaaOPcn19y/dAG/sD8eZZ4gnfNsQjKyrEUqzSYg=; b=YkkAFwS6L723ZCUZnRckJkEqKaYWGbZUu2+PNvB3NlCvjMls6ZwRzcoPw/3BQJEA0l ZLKoQjGez/wo73M7tW50u0DfOyrSK6qLIq1fCCB7v+wyRDKzcqlXZaM/X2ShCanerZzo jKGBtJaIc4hTunJspKAP/e8ftGCefemLLIFwC3kHjvBhi4KUPqS6MY5tyD2XHBZcCZq8 h4LgYPaXCor8hVK+hTJfmrPDSgvjiJBaDQ/BSd29kpXBqMtQQQPGa2UVCXIb+IViF+5e bHu4GzW7+YHBBuOhR6RXQbMDF7srm8fMNDYoMZTiKfGo96KJGA//SUiFaIyWiX+kx5/S r9wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781635387; x=1782240187; 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=i7fAeaaOPcn19y/dAG/sD8eZZ4gnfNsQjKyrEUqzSYg=; b=G/EdvDCSVoTJwdbco2krmma63kDcJwRKhNWpT2WAzgh89e3/sPPFacvHuIYeffHtZY rlub+5xiGm2Uijr1nJ96EHYDx7E8X8+/v2JK4jK7ONeoIenO/fhJABoRYAO2YABhlb6E LPLIf2UuP2dIaI5DoQNqqy7JoxdYj1/k3KLBf0/SUb0X/0pwRJbrnD4cVDSKEXfPyT8g IN7WDgoA0n+0lvZadW6x8U5ubbbUIZ20yOnZR29czh8ku9AMr3KaA7RjiKJW/D3Sc21D zgU204NEbwMLUg2XDABSgjP7ULykHm4XrAo5GG/U7gEexWrT+svJ3tIUNoqG5pmfxUON OfjQ== X-Gm-Message-State: AOJu0Yy8yZy6W3mZXIE1ureL9r5rLvvCc6302nwbsnLk81GnJOSmbNI4 Z19lIubrdTpUIjBj/oQtdF98Mdmfi3TpHuoAQgwkX6WOimeQxxSN5nYqQGxfLY3DIoVYRsdRVUM oR3zcqpp3KR1MEvK4lw3Wrlb0mLyXlJLgeieW1uQJzLpkiRcQNBxGfsnP81an/j3g8uSq X-Gm-Gg: Acq92OEYfnTe6kZMRSLx8ue36D+rFXwHP6yPYMz2thcX/ZKRsb1Ur3OGfgUPGJokJBD NKX5fSB7+eFEfjTG/ltRGOYucM30uLaNDsvvbAuVWmjFoNYaTGWN63TqOmgbNClx2xUZDKwuJ6Y 7MApix2HaWFS6gFa5RmhYF8vOZQkXEsoU7TXNN1DpXCPDQBaz44UqLjXNDGvVICRSLE0UVLy1DF rO70xXNuEx6GM7Jc9HBDnbs+uU3nner2w8cpn3iviOzl/gloFxGVwABXB+kjPIOV3cTWLfIarhl BgClCXEafsZ21eH8Voar9syh60AWdVsl+tG6lQJuT+0n2xcaZ7hiwWk6TFzlM2b9Zxm2dg/LE+r ScBJYwwlRdn1Eo0dGLcnWqeXjVKtGnIwDbGWURYiFXk7S1kmc482+B5PPHMS8ypgAJwI04vECST lYdwQ2oQc= X-Received: by 2002:a05:6a00:2e14:b0:842:63f5:d097 with SMTP id d2e1a72fcca58-84513e0def9mr4363591b3a.3.1781635387539; Tue, 16 Jun 2026 11:43:07 -0700 (PDT) X-Received: by 2002:a05:6a00:2e14:b0:842:63f5:d097 with SMTP id d2e1a72fcca58-84513e0def9mr4363568b3a.3.1781635387000; Tue, 16 Jun 2026 11:43:07 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org, peter.maydell@linaro.org, richard.henderson@linaro.org, pbonzini@redhat.com, stefanha@redhat.com Cc: pierrick.bouvier@oss.qualcomm.com Subject: [PULL 26/26] plugins/cpp: register callbacks using captureless lambda Date: Tue, 16 Jun 2026 11:42:30 -0700 Message-ID: <20260616184230.303038-27-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> References: <20260616184230.303038-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX8vRxnoyWkcmM MkduuSq0kDsTGEDt8XDiIhhk5mbUQJ2+xQxEsfoCui50eVHSzHG1Y5cP4sAQkRHA+yjcrTAplJh 1UdqTOfyQcFmE/tQ3GLWs31e1meZZnZVEFKcppmwwCKFHJjT0S8y8yci1V5KnbVvZNMVQWQYAqG 4yPqdnvOmtzf5HMzxcH/23PtgnRT7Tq/A0Pg7dhpuL6x3sse2ttrRTWTqaPRS1jMOWohcu9UaSd nQ2AmZ7WQRCtI9Xx9PjYe76UnCFraOn2wBOjgasflT+/r1OD7Tk/kGVhchUFchX6yQ/Zwc8bZ6q yn5ZlUjOSyaMSyjiNgNbRcP+r5peBmu3yJ9aCuD+MNhb9DFX/vT3VH25YWF3SXuz/xfk0A9tE0w 82RUklBUMAxaO27zUAVzczX8uNfSk5vBv5flUAmqbD0FqtQ/5iZwJbvjOMCHBx1nkYs0N8cLMd+ 5/u8BhVwodd//7fj7iA== X-Proofpoint-Spam-Info: AW1haW4tMjYwNjE2MDE5MSBTYWx0ZWRfX5WNizbcf/nXU kMExdvVAsSXpMdiEHV0EwtpShZLRFC4jhCS5V4ATjwIQKwk6jzBhPDoyEJYld6RQznS/+AVmAUt 3UZ38a0NDOhWhpl6o30WcLVCtlwWrTQ= X-Proofpoint-ORIG-GUID: Pkx9U6xh8keS9nCIrIT32h6D5rj2NERK X-Authority-Analysis: v=2.4 cv=dZawG3Xe c=1 sm=1 tr=0 ts=6a31993c cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=D90kLAkOAllNM0JH3EsA:9 a=O8hF6Hzn-FEA:10 a=IoOABgeZipijB_acs4fv:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: Pkx9U6xh8keS9nCIrIT32h6D5rj2NERK 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-16_05,2026-06-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606040000 definitions=main-2606160191 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: 1781635426270158500 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. Reviewed-by: Manos Pitsidianakis Link: https://lore.kernel.org/qemu-devel/20260615193526.2883349-27-pierrick= .bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier --- 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.47.3