[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 22/23] xen/Kconfig: introduce HAS_STATIC_MEMORY





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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.