[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/3] xen: introduce CONFIG_HAS_DOMAIN_TYPE
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Wed, 22 Apr 2026 15:38:09 +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: 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, 22 Apr 2026 13:38:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|