From patchwork Mon Mar 17 16:13:29 2025 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: 874170 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp2080428wrq; Mon, 17 Mar 2025 09:14:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUs7Da8OTl2COaWlqv5l+E+EhDRNmV3/aEyBJPqLSBeZAgPs0gvJ0Bwhm+hib1LUvf0OaEnSg==@linaro.org X-Google-Smtp-Source: AGHT+IEj2MF6w9AZVUIi1E/LdoW68W9PnJDYxF1WIG2uKHQMUmoeaOscm60Eh8qmBVBiVZQiTZBv X-Received: by 2002:a05:620a:45ac:b0:7c5:5883:8fb3 with SMTP id af79cd13be357-7c57c79bb70mr2371790885a.8.1742228085217; Mon, 17 Mar 2025 09:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742228085; cv=none; d=google.com; s=arc-20240605; b=huzi7Tg9Hp5/5EWapG0RA2hV8JUjV78VJ9JnZPEyhcr8ZG7VnRYudBD1aIYaoDAZVU AIo1dhqUzUlAzv7ST4c7jUlD68/d0XRf2wRKZjvGAgSYPcQrvqp6czXO4apzmx16l+9M reGJJJWrR3Z3KMXia3NyHiiyWHvnzZjnT0o+/XT5ISEHS08/mhBeBIL6gdAsTJ2IbGpi q0LQnppw4KEopZ2o1/5G/WXdT8nPLwCpnRa4hq0NJlvUPtVALxXXrdyQCmtJn1BDMosj J9obPnym2o5AYWJ4nHVt/NrlyZErpEMisKM64UuKV4r6dvWAnm4f7XPD9qXiCc2jOhlw MBfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=9NJx4AwvlUnmR3t10jY6mrzdFJXWIigMof79SEafyw0=; fh=L4CqAz5iXYQKLL498qv2voEhIAC08MejK+77ddFNBus=; b=OYsAce7LKWzozFxU8uVPM6wOM1616YCp1h3RCiMRK2aQ2Ra1+WIkU3OEETH4qbGoa2 CPDuMZieozZYhV1Atw66N4cLl9duGEu9DbXDd9KnPw1eoAv4vEiAiz5W07LE5JV9XelK GfUVFraF0v+BuJVDDzUJDtcoBVq4RsGmuR1GR7eKOhMOkD4bWdJSxDilV241xNQ3BEZS G3pEwk8ed4v1C+a22Eh1OR0yiiu38Sc6/oO5KjCt4aP/XsQoId7hOXxywRCPGC9A8QuF TFtwV6m4NuSplHp4UY36fK5CNn9JiS02vxgZGe/a0lNxvpsMOOXTXFetjL2Z4otWGBgj R5KA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WH7gs6MX; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d32c97si1034447385a.628.2025.03.17.09.14.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Mar 2025 09:14:45 -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=WH7gs6MX; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuD6I-0003Xl-2C; Mon, 17 Mar 2025 12:14: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 1tuD61-0003UY-7Q for qemu-devel@nongnu.org; Mon, 17 Mar 2025 12:13:45 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuD5y-0003h8-Ni for qemu-devel@nongnu.org; Mon, 17 Mar 2025 12:13:44 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-38f2f391864so2649082f8f.3 for ; Mon, 17 Mar 2025 09:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742228021; x=1742832821; 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=9NJx4AwvlUnmR3t10jY6mrzdFJXWIigMof79SEafyw0=; b=WH7gs6MXPT7bIK5cwM+7jpCegc0vSzJCHw8KB9u5LsSVo3/nt7ZYyTzb14u8yX8btG RnkaNBsci7UoL4nM8tCSC9Y8nliQcYpTRmFdis5/RqsWbUScCNZB2gAEuQatPuCztTFH 55Zwhvhj7E8y40TaakKtQDkgcqTqttL1d3nAjMAZ5A/U9zPQvew0VXZP2/Qyd4+j7ODn d6VV5keoU2jlEPOjAik1O063YcqWfUWLNYhBAASep5DcdqW+gedbZ3El8CmyCB/iAB8X tw/jsqFFlSu4OnFCaB+sZ9MjUqpa+un9Pq7EB86Z3n/HioqYk7dtQc7SzNyJGwukx+Pt r9Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742228021; x=1742832821; 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=9NJx4AwvlUnmR3t10jY6mrzdFJXWIigMof79SEafyw0=; b=VwGJHVRnhPvOFStGOFCV8Hjv1zOiCET3URuY3Cct/tQPvKBz04yMXJ39wSMxCfYXsT 3rwTacxyqHwFOHyDWIAW5/ThQYwyVW4E3cn6SWD41VCacnppc809/gVCznik6A9e9jbU WCXc1kqigwmBLcwShyQZouw8vvKDcPGJ8jspTmf6avuMz46Zy0pU9cFQekTYmQMYhc5b G/Bmk6iU0Z0HGhHjr3adtwRFvaQVu00w8zNfBX1YseYs9+pBz3eS/Vhz4rqIUyypINKT l4UuWvmD+eId/rnMnTA32D/oB1bJFaQRDNxOGut8YNLStayYmjqL49WxBF/s3+T/55yQ cx5Q== X-Gm-Message-State: AOJu0Yz76xEaKP2Zdnn+sjHGFB7TF/VCoBRnDWOV0d4GbZKBTwgbOFru rHMFmtoyqPJUyvrzFr6RMZO/Pi2dZBjKxzEThYaJiFY1OGupo9NNvTrU8e7lFvG/7KwAMiArPKn i X-Gm-Gg: ASbGnctXKC9bo/sSYCos0iidhsWg+BWd6OM0GeUbiEYMgQyxV/3pYPOuPyD9ISR260S WyhVUbr/oyO00oPTyuDCEdz2K5Udqx6jUY+Bi/YO1o8dixfLXkWPtMLUH9ChQ7SziuG0Xj0454A YyKFYP6r6+HsjGuIphY8QtMKEPuKADzt9a5BouExTmuQTF05bOVBFkCn9jwnPlcogLcom15braS yUXshazqmjF4onNgWiB2S9Evms0uMWy2vH+vRKUlJYvsLXqsAXBVoJfgOXOZMsLw07fJCxu2tsC oqoxtxmrGmPpFYoRIl1DpAoQXqM1PTa6+XeWR1riw3HNvkZSB7FTYAa1TWl2F9Mm079dQ/hexOQ BUWmlsKU+ms2t0yCnkcY= X-Received: by 2002:a05:6000:1789:b0:391:29f:4f87 with SMTP id ffacd0b85a97d-3971fadef12mr13442481f8f.49.1742228020705; Mon, 17 Mar 2025 09:13:40 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-395c83b6a32sm15681861f8f.33.2025.03.17.09.13.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 17 Mar 2025 09:13:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Xu , Pierrick Bouvier , David Hildenbrand , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 2/2] exec: Restrict memory-internal.h to system/ Date: Mon, 17 Mar 2025 17:13:29 +0100 Message-ID: <20250317161329.40300-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250317161329.40300-1-philmd@linaro.org> References: <20250317161329.40300-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 Only file units within the system/ directory need access to "memory-internal.h". Restrict its scope by moving it there. The comment from commit 9d70618c684 ("memory-internal.h: Remove obsolete claim that header is obsolete") is now obsolete, remove it. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- {include/exec => system}/memory-internal.h | 6 ------ system/memory.c | 3 ++- system/physmem.c | 3 ++- 4 files changed, 5 insertions(+), 9 deletions(-) rename {include/exec => system}/memory-internal.h (88%) diff --git a/MAINTAINERS b/MAINTAINERS index 8f470a1c9b7..b9f6c3cf15c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3115,7 +3115,7 @@ F: system/ioport.c F: system/memory.c F: system/memory_mapping.c F: system/physmem.c -F: include/exec/memory-internal.h +F: system/memory-internal.h F: scripts/coccinelle/memory-region-housekeeping.cocci Memory devices diff --git a/include/exec/memory-internal.h b/system/memory-internal.h similarity index 88% rename from include/exec/memory-internal.h rename to system/memory-internal.h index c75178a3d6b..085e81a9fe4 100644 --- a/include/exec/memory-internal.h +++ b/system/memory-internal.h @@ -11,12 +11,6 @@ * */ -/* - * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY, - * for declarations which are shared between the memory subsystem's - * internals and the TCG TLB code. Do not include it from elsewhere. - */ - #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H diff --git a/system/memory.c b/system/memory.c index eddd21a6cdb..f9b34cf4254 100644 --- a/system/memory.c +++ b/system/memory.c @@ -25,7 +25,6 @@ #include "qom/object.h" #include "trace.h" -#include "exec/memory-internal.h" #include "exec/ram_addr.h" #include "system/kvm.h" #include "system/runstate.h" @@ -35,6 +34,8 @@ #include "migration/vmstate.h" #include "exec/address-spaces.h" +#include "memory-internal.h" + //#define DEBUG_UNASSIGNED static unsigned memory_region_transaction_depth; diff --git a/system/physmem.c b/system/physmem.c index e97de3ef65c..d4fbda9310d 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -66,7 +66,6 @@ #include "qemu/main-loop.h" #include "system/replay.h" -#include "exec/memory-internal.h" #include "exec/ram_addr.h" #include "qemu/pmem.h" @@ -88,6 +87,8 @@ #include #endif +#include "memory-internal.h" + //#define DEBUG_SUBPAGE /* ram_list is read under rcu_read_lock()/rcu_read_unlock(). Writes