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

Re: [PATCH v2 3/3] xen: introduce CONFIG_HAS_DOMAIN_TYPE





On 4/22/26 12:37 PM, Jan Beulich wrote:
On 22.04.2026 11:44, Oleksii Kurochko wrote:
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -29,6 +29,9 @@ config DOM0LESS_BOOT
  config DOMAIN_BUILD_HELPERS
        bool
+config HAS_DOMAIN_TYPE
+       bool
+
  config GRANT_TABLE
        bool "Grant table support" if EXPERT
        default y

Looks like I need to repeat my v1 comment: "Why here rather than where
the bulk of the other HAS_* are?" They are (or at least are suppoosed to
be) sorted, so that finding a particular entry (e.g. while checking for
name clashes) is easy.

Sorry, old version of this patch. I put it through the other HAS_* in this file just after HAS_DOM0LESS.


--- a/xen/include/xen/domain.h
+++ b/xen/include/xen/domain.h
@@ -13,6 +13,19 @@ struct guest_area {
      void *map;
  };
+#ifdef CONFIG_HAS_DOMAIN_TYPE
+enum __packed domain_type {
+    DOMAIN_32BIT,
+    DOMAIN_64BIT,
+};
+#define is_32bit_domain(d) ((d)->type == DOMAIN_32BIT)
+#define is_64bit_domain(d) ((d)->type == DOMAIN_64BIT)
+#elif !defined(CONFIG_64BIT)
+/* On 32-bit-only platforms all domains are 32-bit. */

Btw, while this may be true in practice right now, it is not given. A
32-bit hypervisor can in principle be capable of running 64-bit guests.

Agree that it could be.

Do you prefer to change this comment to "At the moment ... are expected to be 32-bit."?

Thanks.

~ Oleksii



 


Rackspace

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