[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/8] tools/init-dom0less: Only introduce un-introduced domains
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 26 Aug 2025 17:08:42 -0400
- 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=O1nbcQMEjUBeFeC495BtfRnJCx+JGQKE9Ow3xrFdZyA=; b=wXoPzQ2JzGgDMrkHE0GL4WUQTxXTVmg1rRrG89iak1XbfQInHr2QYMImRW64Oo+YB3mI91FbKjNXejDp3npgYxcp2KFZOn60SiccgAX9G8k0dyxOeU2uPq1yyF037+Ba/s5RQhCNX565IMr7GxEAhmgl5bNozGRDC9P6ETzM+CDafxifJ5YaVwWC47NhFOMoRv3FLFnjD+h6t+6cCKV2zjKKPnv6wUt5kBCt3pQUr1UrRbGCLqFQ4cRuiUpGl2LcGAXV+6Ceud+9ZH21Ylo54XO4dNOHhyhBa2xwBVyvoB/S2D9BzXkvsaVmUzJLtiLCEBq1pWvBNxgJfPerNstRqg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cNMaNmKhwa2ssg4KDbuKe0xaCNuCDW1jtZPx5qh/iONpalsAkCRgwui9qG36waMy28JrGOgsHyanAy8TI0CP1b3kWGUXDMQYh4Zu5uxFZ+TwvN3yboI7wFgoQF4cajh7R8prLL/WMpx7Yb6FO4gxrTgZLpWcpYGW1GZq/a7qIsqF55P/piqnWIoSdfDH6VBokelaHE22gFevS1coQw3mnOV6wGuKjDpk0ZD6OrEgjT61QFOmbpyvJJRgH+nAcZ1jx8y0mztDIMHptTnWWorkZvRh1MPBUw9BSIK1j6k6aX5n3/eXryZPkwenRNcV9UcOJLnCs5vP9EUy87kxfnVEVA==
- Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Tue, 26 Aug 2025 21:09:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
In preparation for supporting already-introduced domain, only call
xs_introduce_domain() if a domain is not already introduced. Their
xenstore entries will be written, but the xenstore introduction is
skipped.
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
v3:
Reordered
---
tools/helpers/init-dom0less.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c
index 8de8e44ad3..3906c4b61a 100644
--- a/tools/helpers/init-dom0less.c
+++ b/tools/helpers/init-dom0less.c
@@ -319,9 +319,13 @@ static int init_domain(libxl_dominfo *info)
if (rc)
err(1, "writing to xenstore");
- rc = xs_introduce_domain(xsh, info->domid, xenstore_pfn, xenstore_evtchn);
- if (!rc)
- err(1, "xs_introduce_domain");
+ if (!xs_is_domain_introduced(xsh, info->domid)) {
+ rc = xs_introduce_domain(xsh, info->domid, xenstore_pfn,
+ xenstore_evtchn);
+ if (!rc)
+ err(1, "xs_introduce_domain");
+ }
+
return 0;
}
--
2.50.1
|