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: 1925241 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=U+62dtAQ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VL7Br3y75z1yZP for ; Fri, 19 Apr 2024 05:29:40 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxXRY-0005jl-Aa; Thu, 18 Apr 2024 15:29:12 -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 1rxXQc-0002Os-CW for qemu-ppc@nongnu.org; Thu, 18 Apr 2024 15:28:15 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxXQX-0007j7-TN for qemu-ppc@nongnu.org; Thu, 18 Apr 2024 15:28:13 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-34665dd7744so791913f8f.1 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=N1El3eJsvXFff5EwQFJHB0ik8JyE38nmRpQH8aEpMxUaue0FnkNIQRBuKBYUTX03Wf tj30g/0ry0/BdOUYwne9/U6+0+bTpj67HItde0PzCwphHeVAYOS/E3eW0l84Gl4DLbbD QkAPmF5M6cICxLf1KU37agGspnMJmpcug/apeHYTv4I+4fkwGknw4rJnZpTbLo+Xb2qQ 9ZFggCSDnZw7aQurCFVECUydgMLaBbTFbhw+KLe13x8FndaKE4uL2HHUb48HJq5/vKHQ oxOeGLeWakDf/XKH/V4rSWwPp/TLl0itE1zKCNCnP5LQTXvMHnNi+K2PtdDy0fR8fDSu ewXQ== X-Forwarded-Encrypted: i=1; AJvYcCXepBTR08k7tPWTZRqiN4aU2AzRqx3AozwXJgtbsLROfGTOsNQ2KS+bfFFaV6LR2wGnXsG+qRfmlSOgY8v/RR4bSRY3 X-Gm-Message-State: AOJu0YyTH1I9skwOsXt4uPmww8cAEZmDkdhVhn7aXBN07G7yqsZ2EhLL Z2OjiiZ2gKa3U+JuP4Ld8r0JaLBcgFMJh9v0fl9pdNwcuAAQwPuzZhpXnSi7Cvw= X-Google-Smtp-Source: AGHT+IFY7dL6kQPENW/Gj6CBDv/d1qDFxnP7kZvuVmZ8Q0jxIs8r9dKZcEdctT8ubfxSRPUALhnlPg== 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::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.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) {