[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 22/23] xen/Kconfig: introduce HAS_STATIC_MEMORY
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Wed, 24 Jun 2026 17:26:47 +0200
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:In-Reply-To:From:Content-Language:References:Cc:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
- Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 24 Jun 2026 15:26:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 6/23/26 10:26 AM, Jan Beulich wrote:
On 17.06.2026 13:17, Oleksii Kurochko wrote:
Architectures that implement guest_physmap_add_pages() select
HAS_STATIC_MEMORY; STATIC_MEMORY then depends on it. ARM selects the
new flag; RISC-V does not, so CONFIG_STATIC_MEMORY is unavailable there
and randconfig builds no longer require an explicit STATIC_MEMORY=n
override to avoid a compilation error.
How did you come up with the connection to guest_physmap_add_pages()?
It is because of you mentioned in this sentense ...
That's a close sibling of guest_physmap_add_page(), and they all should
fall in the same group. The fact that right now static-mem is the only
caller of guest_physmap_add_pages() is secondary.
... (the last sentence)
New callers could
appear. guest_physmap_add_page() could likely (in principle) be
implemented in terms of guest_physmap_add_pages().
What you're after is a way to {en,dis}able STATIC_MEMORY on a per-arch
basis. That's all what matters here.
I will reword that part in the following way:
Introduce HAS_STATIC_MEMORY so that STATIC_MEMORY can be enabled or
disabled on a per-architecture basis. An architecture that supports
static memory selects HAS_STATIC_MEMORY, and STATIC_MEMORY depends on
it. ARM selects the new flag; RISC-V does not, so CONFIG_STATIC_MEMORY
is unavailable on RISC-V and randconfig builds no longer require an
explicit STATIC_MEMORY=n override to avoid a compilation error.
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -161,6 +161,9 @@ config HAS_SCHED_GRANULARITY
config HAS_SHARED_INFO
bool
+config HAS_STATIC_MEMORY
+ bool
+
config HAS_SOFT_RESET
bool
@@ -196,7 +199,7 @@ config NUMA
config STATIC_MEMORY
bool "Static Allocation Support (UNSUPPORTED)" if UNSUPPORTED
- depends on DOM0LESS_BOOT && HAS_DEVICE_TREE_DISCOVERY
+ depends on HAS_STATIC_MEMORY && DOM0LESS_BOOT &&
HAS_DEVICE_TREE_DISCOVERY
This may end up slightly neater as
depends on HAS_STATIC_MEMORY
depends on DOM0LESS_BOOT && HAS_DEVICE_TREE_DISCOVERY
I am okay with your suggestion and will apply it.
Thanks.
~ Oleksii
|