[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] dom0less: Move single-xenstore check from bindings to set_xs_domain()
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Thu, 17 Jul 2025 16:28:05 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AUgcQSgyKVINx4y+SPwCGex3eBJUIr6NGgNnsgwphdk=; b=vuEUl7/k8rKEvYEcvcswo2ij6zVmftkV7P3uBgkak56Qr9ZedgQrzxNwQdCjXrI3KZJSxYatQteRiVo3BFJD10aXHBd4762k/H5B0y+dLrKuQ2mdwals41kR0LcNmjOZxvKAk79L1cJdY1WML9FgkDs+zWgi+ZRXr/xJRibWpG5igCvcTFLsJPtZXY7lNS5BW6+uiCUS6QQDov3GjGgI49k6C0ITgt71wn0bOld5Fwox9mFz9si+Gk1mkJptpwz3gi/fg+NwF7rPkMOXTOaiv1myL7l6fj93cnW5jhqQn0pH9hrIsGJk2HMetkqMp5VgvZQLWZA+HjASchAn+E8LHg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WPUZS9HxwW4AhbJuG5/eGxg0zfwoF19D6Qjf7RydJcZlxrFYuNDH4A2+awYgjSjTynYM2Orw7KGosqBbgwewBxcqKp9lA1Ip1NV/4hXbgGy26VWPcauovEwj+BaaZoqMddMO5OpsWsZwiGptWlyY1Y/YI7qX1XYVNxIpeyBouKueLi9nt/xwV+/ZyA2QR4xUAHS8J1xh7cgBwvz9XkVqIQxGAvGsMQXxX8nVNzH6fYO97m6leecWzV5jm05Yun9oXM1h9Odduh5m7u3C0Cx0KQktbqJ6nY/XJonGDhiDxU3NR/sL2VNhh4Hj4Sxbo6UM4n9Ut4p0IHMa29QQanF58Q==
- Cc: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
- Delivery-date: Thu, 17 Jul 2025 14:28:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Later patches extract the bindings to a separate file, where that global
won't be available. Make the check when calling the function instead so
the bindings remain agnostic.
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
---
xen/common/device-tree/dom0less-build.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/xen/common/device-tree/dom0less-build.c
b/xen/common/device-tree/dom0less-build.c
index 87828d4d9d..0012046574 100644
--- a/xen/common/device-tree/dom0less-build.c
+++ b/xen/common/device-tree/dom0less-build.c
@@ -38,6 +38,9 @@ static bool __initdata need_xenstore;
void __init set_xs_domain(struct domain *d)
{
+ if ( xs_domid != DOMID_INVALID )
+ panic("Only 1 xenstore domain can be specified! (%u)", xs_domid);
+
xs_domid = d->domain_id;
set_global_virq_handler(d, VIRQ_DOM_EXC);
}
@@ -876,10 +879,6 @@ void __init create_domUs(void)
if ( val & DOMAIN_CAPS_XENSTORE )
{
- if ( xs_domid != DOMID_INVALID )
- panic("Only 1 xenstore domain can be specified! (%u)\n",
- xs_domid);
-
d_cfg.flags |= XEN_DOMCTL_CDF_xs_domain;
d_cfg.max_evtchn_port = -1;
}
base-commit: 14d96bd64d8b82cb7666005221c90fb0c93785a8
--
2.43.0
|