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

Re: [PATCH v2 15/17] tools/init-dom0less: Factor out xenstore setup


  • To: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Fri, 18 Jul 2025 18:37:16 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com 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=PAcLzcNqk6f1og9tlW0haAs827oTZcwps+2zzEVafhQ=; b=YZAM616PbpoaWVX3+EJSsjLsGwcoLZENmrTeEkzgVOHwuo7n5ZwoZ+NczAd0gChrY3G++62MzZMQAUXFrShvTOutQoeTbbW2BHN4iFqEZXMugjagQW9ALADqYGJIg3B+MRzuSQe27O0FsppLBaQXGOoDS/c9GoeGr9J9ijHocZUoQDsCB7T55yGM+SeRCZSDg+W8BOFGly4B+19nDnwW6EbKklqhIhUcUuaooJol+yvtcl20sBGMbFI77u1OTZdAD8yIf24h4NgPO1VmBgTzY2TXMACjcrmIFQkHJmvEHMl6g3XRUiq+I5Hq9VilIhj/IRClK2J/i05RoN2cnkbo/g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X7sds0Bs5nLhSpYdb1ubqCRCfeFzvbIc6E5rBqtWhGhO0dv3f2GN6RFJWl5DrAvC4swbzhscdfivgoArB+eeoEk5mX+/u+BLeV4OZWj8ikMs0fhuntzdcho7glcBeh68h7P9zyjJN5lJZZHklapZra+k3+D09gPMq55pu+xDgRzZFM/Nq43EhmXsadywj6ewcG1rR/i8LkuZIpEb1S5QAC40T97H8vqbSB3T+US4q4A6//Pfcr1VEM6OJgwNI9hyrNxbSlf4D9KYhn9q4IevKt6xFgEH1a2LdlNQGev9fRnhDYL3PB7JRKdxnUR463spzmN92zx2SqH598ZZlyEVPg==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 18 Jul 2025 22:53:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2025-07-17 06:33, Juergen Gross wrote:
On 16.07.25 23:15, Jason Andryuk wrote:
Factor out the xenstore setup code into configure_xenstore().  This is
in preparation for handling already-introduced domains.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
  tools/helpers/init-dom0less.c | 51 ++++++++++++++++++++++++-----------
  1 file changed, 36 insertions(+), 15 deletions(-)

diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init- dom0less.c
index a182dce563..6ae7cf2e7e 100644
--- a/tools/helpers/init-dom0less.c
+++ b/tools/helpers/init-dom0less.c
@@ -235,43 +235,43 @@ err:
      return rc;
  }
-static int init_domain(struct xs_handle *xsh,
-                       struct xc_interface_core *xch,
-                       xenforeignmemory_handle *xfh,
-                       libxl_dominfo *info)
+static int configure_xenstore(struct xs_handle *xsh,
+                              struct xc_interface_core *xch,
+                              xenforeignmemory_handle *xfh,
+                              libxl_dominfo *info,
+                              uint64_t *xenstore_evtchn,
+                              uint64_t *xenstore_pfn)

This is becoming a little bit convoluted.

Wouldn't it be better to have a struct containing most of the parameters
(at least the handles and info)?

An alternative might be to make those global variables in order to avoid
passing them around everywhere.

Yes, I'd be happy with either of those options.

Thanks,
Jason



 


Rackspace

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