From patchwork Thu Apr 18 19:25:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789846 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp736056wrm; Thu, 18 Apr 2024 12:31:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBobr9jU/0lwZtTKHhOpEve7mP7pen9tw65H6wUCkkXUpq0iTZw/xmvFlw2PRLYwq0tBEtu8OwbwcewZ2/ZgQ+ X-Google-Smtp-Source: AGHT+IGzm8zq/dRM0okMyTp4hoq6kTHUMHEqlKtudJOK1+aY1deiKUSZcZ+ApV3GA8Zd5EUF/h+X X-Received: by 2002:a67:f90a:0:b0:47b:bba6:2c8f with SMTP id t10-20020a67f90a000000b0047bbba62c8fmr3051038vsq.20.1713468686843; Thu, 18 Apr 2024 12:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713468686; cv=none; d=google.com; s=arc-20160816; b=Z0fnxRWwxnBhXFV0ZMJxphCDGYSzu3KO/ib4ma1AtOi0uRPyvuS8rIw380ErPui3aX LC5UMiX8WaqZNGe3ma3n6jiGKZoYf/C9LkumXC+1SDy5SpmoLYTubtzMmRlSSnInNBTl APu9czbvydtfi2L/W3R3yzquqTvDymyp/8lZZwkF9Dde/BvoEH+ZGegChG0Kt7ROgMrs jUZaa+nyw3661QOFBOFT84W7aRi5eMEJTPTwo7R2NJOnd0pVD/NxBRYkSwzhJomWfVS/ f6ti+Adk1zABGTgujE6YKBOL/p8dC6dD9GWjsZVsmfVFNapn08lyuXexMzmF61ps7tsr gmTw== 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=Hca3+XmwqR0YOlaHOdTYyVt5U6rBmejaVD76pmxE3UI=; fh=sjtlXEq9AKZX+M8uPT6LqNYn3M8GwZJ7Ax5I5xvYU1c=; b=pUQ43qbm5f6XPRnYn21BorIFVhxAS1iSLITSnkLTO9nCO4KnSA1Y5wDKqcgyPjuhQn mv//kIEt6fgtaJdsDsaToA0MAYfE92ZIG78L8j8ETNXDdCuoKE4USIG8nusvO+dKLeBL scNmGTagud83PuhNys9CcCN9ApPMD+zXgcwbGYNkDO+blJRGNrN1LmsdCra+7PxIY2g2 W1ZIDlW9oM/L4HE2QudBdDjIx7dJ23M8Vg1Jy/HThIV9j2WFJWCOsNpU0dS29fkslj1O uyEJuRfAhTUyKmXzuZR9tA8fVBb2bnWI55wIIw502i4T9hoqG8T+z3lGnLT/sqslPFEW +/lA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U+62dtAQ; 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 f28-20020a056102151c00b0047baba03146si499484vsv.737.2024.04.18.12.31.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2024 12:31:26 -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=U+62dtAQ; 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 1rxXTL-0002xq-UV; Thu, 18 Apr 2024 15:31:03 -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 1rxXQd-0002P8-BQ for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:28:16 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxXQa-0007jF-2K for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:28:15 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-347c197a464so864178f8f.2 for ; Thu, 18 Apr 2024 12:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713468488; x=1714073288; 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=Hca3+XmwqR0YOlaHOdTYyVt5U6rBmejaVD76pmxE3UI=; b=U+62dtAQYNMKJwbQefk4ISLFHpeNHmL1Te0MJWqzNfXZEF0rTZHRzYuPj4YhZEHMMa r0LuvJ0KYTUbsg6ovg9wb8qdJ4JRL62m+Y21kPaBtLg5E1tG0QaudMbBexhkUhFJMW8a n+bF6a7xxTugAFPyioN/F9lsTWTaOFRjJIjL8Ju5QXrUUNBFx8/M/8/XjuxPGsaTy+xZ ER4F347ydE9OkgffZftt89c1OlMk9AhciLYP2KZpQR4d+612P3fAT4q28crMCMqLFYVT 39t9YLO1cQC+Qr9VqK6WvV94Bi3u1AYIK2jlJ+FjE/9V4RsPJHLbcqBQwaxq8UGqq/zb vlfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713468488; x=1714073288; 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=Hca3+XmwqR0YOlaHOdTYyVt5U6rBmejaVD76pmxE3UI=; b=frGCHFT6kJy5T/iqanE1P6BJP82dYSZ6wt9vb4htBObApddYBygIR/8iuWxpQRK8Bw TtqYKDkuFI05KgGP/iqeo9zMh2DXYI0T0ocG6lw6t7jf0iJF1k+X0ZesVCPgkuptHpRL ak8iSWnmPoQC9hMhXVQso5ETMVud9vESxxfmKUHPFdcPEoe8Zxk399r2HRC2BO5TJ0Qq 1Gj2xv12leMvW/2d8O77M9UlI3LfX3Yw11Yxv4nBHcXQoL+4uLDhzyQ2R6wnH8Acz34g F8eL5rTWqkUUejytRuUEeE7Z9NBDqvjTnLTUbHcyfbPWXvR7tAEAXQ4qfSQFCzxQUc9x NwbA== X-Gm-Message-State: AOJu0Yz7DfQnSxYAO50+CvFVbPlOMtvVXmDMRqwe7/oq+A4EY07X0FIE TMtd69pAZWhnG7IOsDFpBhfKp0Pz01cVabIADJSARp/7JH/IASGDaVa8gn1S3ya+zC+NlX9myLJ X X-Received: by 2002:adf:e40e:0:b0:34a:3eec:c379 with SMTP id g14-20020adfe40e000000b0034a3eecc379mr650087wrm.67.1713468488275; Thu, 18 Apr 2024 12:28:08 -0700 (PDT) Received: from m1x-phil.lan ([176.176.151.213]) by smtp.gmail.com with ESMTPSA id f5-20020a170906138500b00a5531e61002sm1247131ejc.206.2024.04.18.12.28.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Apr 2024 12:28:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 21/24] plugins: Un-inline qemu_plugin_disable_mem_helpers() Date: Thu, 18 Apr 2024 21:25:20 +0200 Message-ID: <20240418192525.97451-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240418192525.97451-1-philmd@linaro.org> References: <20240418192525.97451-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 "qemu/plugin.h" only include the huge "hw/core/cpu.h" because qemu_plugin_disable_mem_helpers() accesses CPUState::plugin_mem_cbs. In order to avoid including it, un-inline qemu_plugin_disable_mem_helpers(). Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/plugin.h | 6 +----- plugins/core.c | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index 41db748eda..28467c4a28 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -15,7 +15,6 @@ #include "qemu/plugin-event.h" #include "qemu/bitmap.h" #include "exec/memopidx.h" -#include "hw/core/cpu.h" /* * Option parsing/processing. @@ -227,10 +226,7 @@ void qemu_plugin_atexit_cb(void); void qemu_plugin_add_dyn_cb_arr(GArray *arr); -static inline void qemu_plugin_disable_mem_helpers(CPUState *cpu) -{ - cpu->plugin_mem_cbs = NULL; -} +void qemu_plugin_disable_mem_helpers(CPUState *cpu); /** * qemu_plugin_user_exit(): clean-up callbacks before calling exit callbacks diff --git a/plugins/core.c b/plugins/core.c index 11ca20e626..b25092abb5 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -493,6 +493,11 @@ void exec_inline_op(struct qemu_plugin_dyn_cb *cb, int cpu_index) } } +void qemu_plugin_disable_mem_helpers(CPUState *cpu) +{ + cpu->plugin_mem_cbs = NULL; +} + void qemu_plugin_vcpu_mem_cb(CPUState *cpu, uint64_t vaddr, MemOpIdx oi, enum qemu_plugin_mem_rw rw) {