From patchwork Sat Mar 16 01:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 780751 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp489551wrs; Fri, 15 Mar 2024 18:59:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwjs38aclBKewFFeC1Ow8tpClydRh2j1JgSr+b++yeT7hsXCdMw192p/sBUZthntetnwU2FbDYCVBRERot6CNL X-Google-Smtp-Source: AGHT+IF6sYfPfNWJxslovSeRMs5kve14MXk8oSu08HDR5ZVhI+h7pC4+R1Zko4DYkeiT+dcFBYRk X-Received: by 2002:a05:620a:2110:b0:789:e73d:9ec7 with SMTP id l16-20020a05620a211000b00789e73d9ec7mr2881121qkl.69.1710554381906; Fri, 15 Mar 2024 18:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710554381; cv=none; d=google.com; s=arc-20160816; b=JfKvGcvjJuiBZf761SmrxK0YzKfso4sZXi7gTrz9Oa84a4rwEOwkBwuxCTgzANp1nG tM3UJR0XzmqV47d0tizABY/AjlCHMnRmQfqEkMdkGHlJMc4EtUardAoTwV5ek1YvpDoW q8v0X+uteb88mWkKOzaqbsrWzRq3Dk6NyMriMvspnJOzBJdydMEQ8jGVHS+i/5HUr1xm xkAv4odjy4xkeToU3JQ70mYksWuJ8TbkeZNg0UG2Hya1l2Mna4GP48R4yvRr5CjXwSzf BSVjbVCt0MqmrBNh6oXQ2xknNH5oir5VCOHyiYAenvj9ODAtNYAxhl7b7GbR1n+bF0EO sQmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wurtzFqTOAUqad7j3dN96Y1gK8V7tm4jLC9zvYbsnSw=; fh=DfUxOGz7MnM49MBgqH5VPROGi+97fYtPWhcEZCG1Y5Q=; b=wFPx1D8ZhfeK+VkvvVwEpUa57sxVw7/gizn0gONxsZGjvLyNYuW3kff5I059Y8iPHz Bc3BPbnW4hGifAnzpWNyAz46WHMwYkfTI8nnhH4E6UnWtv70w8LozLw7XjSv+r6VDo12 4GjiiYwNNojAkU0sauPceAjjvYJMUuuKSrtJN7iRlbqDdy6XB64ZqChp378cgDOmcK40 Mc0nMafUG/FWvr2hXi20I8U3zl+1GJbRED5Sjoadto1lT6nMiNyZMR9Txt0zaJ7iwkRo KTV4ldkaujzxs816cDvbiwm9SZ1ZfDwKD1XZJ3li8juO1FUjckgiPFbOc2FCzHiX1zDY 6q3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VHRSitp0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dt21-20020a05620a479500b00789ed7b0a06si502011qkb.229.2024.03.15.18.59.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2024 18:59:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VHRSitp0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlJJN-00030o-Ll; Fri, 15 Mar 2024 21:58:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlJJD-0002x9-Rz for qemu-devel@nongnu.org; Fri, 15 Mar 2024 21:58:05 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rlJJ7-0000mP-Ts for qemu-devel@nongnu.org; Fri, 15 Mar 2024 21:58:03 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1dffd764036so23015ad.1 for ; Fri, 15 Mar 2024 18:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710554276; x=1711159076; 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=wurtzFqTOAUqad7j3dN96Y1gK8V7tm4jLC9zvYbsnSw=; b=VHRSitp0PaRKdlhLXq8aAOGV3LAcwS86Wz67sYdIWE8tqaocsGwM3CpStaswWrcZ9y XjeQcFknkZV1JNzxBpPMPSyOfVXmN5wSjp5JNmqrzmswFs7WVChqAWxDxozH2xtU0aFf rz1csP/ro8BsBBeEAoZaNOUqa3HQ5KTadYdm4Avuoym0FzIOAqDEOxvN01pTfDphLFuC 7sle6AJ+6RMtVX5uxed1fqgLwhk8fOaLBy0g23b3Nb6O0+PWBlL7DrXCP5g3WOAjc1zF Uu0QpqBvRbtqlZMrZgTClc+04og5cQli9zo2ISwGa0w7YyvrB8h/jcUkLNdxAEhiZh9w CMrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710554276; x=1711159076; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wurtzFqTOAUqad7j3dN96Y1gK8V7tm4jLC9zvYbsnSw=; b=KX4C8674pcYdNY/+787m8U61Jv4Pg2NaM+3LKg09ob0irKyZVTTZrykDa+tinsrVAq 47WH3PtHW1Wu+eKOhQsgvIi+Rs17jtBl92TfSE62eR0uENvI1jYy9rupiS2sbfDooKuu 5ZgV/U5H//IfcE/DDXec4stHy93EU0tjl98rIrHcL7tPb2mAygMFhFBwGR43BEsiiFgl QvHbspAwXgvWDQc7kk53FaV/abHa/ibjTkiK9dczasucbIWFNK+/9wxY9EMD4QeboSEO Mzj8iZECW/QdPoels0xcsEjidxwM9h9ep7z+in5ZUL+3R/ncQl3y4M0QVri3pkdVkP/T f0CQ== X-Gm-Message-State: AOJu0Yz9WJ6ISmZs6MXBl699ShBq1IFvztZZEehnUQ5/EWhkm5m+MgDf jSC5shZ3c30ELzPKyWiwJuFw5BMZbmSaPFmTdixPMDQDRaJrREH5wwXxqzGWDu5oyuXFZpdR8Hb 5 X-Received: by 2002:a17:902:f68b:b0:1dc:af70:9f78 with SMTP id l11-20020a170902f68b00b001dcaf709f78mr7915128plg.46.1710554276419; Fri, 15 Mar 2024 18:57:56 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b3-20020a170903228300b001dd42bbb08asm4592985plh.253.2024.03.15.18.57.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 18:57:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, alex.bennee@linaro.org Subject: [PATCH 16/22] plugins: Introduce PLUGIN_CB_MEM_REGULAR Date: Fri, 15 Mar 2024 15:57:14 -1000 Message-Id: <20240316015720.3661236-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240316015720.3661236-1-richard.henderson@linaro.org> References: <20240316015720.3661236-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use different enumerators for vcpu_udata and vcpu_mem callbacks. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 + accel/tcg/plugin-gen.c | 2 +- plugins/core.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index cf9758be55..34498da717 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -67,6 +67,7 @@ union qemu_plugin_cb_sig { enum plugin_dyn_cb_type { PLUGIN_CB_REGULAR, + PLUGIN_CB_MEM_REGULAR, PLUGIN_CB_INLINE, }; diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 669e343cfb..6f0731b479 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -367,7 +367,7 @@ static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb) if (cb->rw & rw) { switch (cb->type) { - case PLUGIN_CB_REGULAR: + case PLUGIN_CB_MEM_REGULAR: gen_mem_cb(cb, meminfo, addr); break; case PLUGIN_CB_INLINE: diff --git a/plugins/core.c b/plugins/core.c index b0615f1e7f..0213513ec6 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -391,7 +391,7 @@ void plugin_register_vcpu_mem_cb(GArray **arr, struct qemu_plugin_dyn_cb *dyn_cb = plugin_get_dyn_cb(arr); dyn_cb->userp = udata; - dyn_cb->type = PLUGIN_CB_REGULAR; + dyn_cb->type = PLUGIN_CB_MEM_REGULAR; dyn_cb->rw = rw; dyn_cb->regular.f.vcpu_mem = cb; @@ -547,7 +547,7 @@ void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr, break; } switch (cb->type) { - case PLUGIN_CB_REGULAR: + case PLUGIN_CB_MEM_REGULAR: cb->regular.f.vcpu_mem(cpu->cpu_index, make_plugin_meminfo(oi, rw), vaddr, cb->userp); break;