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

[PATCH v5 11/11] tools/xenstored: Remove hardcoded implicit path


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Fri, 25 Jul 2025 19:58:58 -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=JMb+CZpB0PdG90Nd9aOEvc5avbnSZpQyX1THv7zdhO4=; b=tj0CwMmRCtIM/QKpEKsQ/PGBHWKX3w8/Ikr64WuRmRtymngCIIB7NkBXDDCmPxcS/xXAe3yDSyLaFd11ArSmQN5ghJ99bhKaQqbIf3Q1SfTrwR6FkY9o9Hya/T5XD5pSzv6zHh81RCPtr2vHzu+9sxUnGWOKThNQ+KJJHeqf3QAugwOZ3Ys8fzwjrEnMpYABy/36SHm4+41Cs9LE4NCnfvq9hT0MLW0tu3jjql2f+HBzCxZBc1bmtfgZnWwLDINi4KA4j2UW11KEQm3rm/FbDrEpCuLN5QKjUuJ1IsUFq7ZRNlH9SrcG2ij3cYeDp6NvqJj5lPzrlwSVg7pimaFKfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xlrYDzRUVd6QyEQqaAchGjRjBkrEAV9D2Efq+D5ZT2bEcrbBn4uIY787LdM71COj+RSROb9PnKRhUYVfxYkWb6gZYMNh3p7YV1Jbz5bK0Xt8OeyS+ze12Xwly5VpDGVxol+HFLLjGshXL/IBuomdsLWwgIjgE0uSaPaIzvXadXkEuSuo3NBM+hHf7ku9+tOLBlf6q02WR2+AH3vqbSQTLwTrNtnqkxSPlUC1Jq5GKRhIfbScDCuaNnNE+G/Wr1tH12hDSNojnTRQ/j52s9EtQa2veKyo8tyRDlf/HorQaWcIXBtMOym+PaFxp+auhP8OvLonMyuyAvU5zF42AsdH4g==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Sat, 26 Jul 2025 00:01:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Update get_implicit_path to return the correct value for a non-dom0
xenstored domain.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
v5:
R-b: Juergen
---
 tools/xenstored/domain.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c
index be8dd19eb8..d083dfb65e 100644
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c
@@ -1238,11 +1238,13 @@ static int close_xgt_handle(void *_handle)
        return 0;
 }
 
+static char store_domain_path[] = "/local/domain/65535";
+
 /* Returns the implicit path of a connection (only domains have this) */
 const char *get_implicit_path(const struct connection *conn)
 {
        if (!conn->domain)
-               return "/local/domain/0";
+               return store_domain_path;
        return conn->domain->path;
 }
 
@@ -1312,6 +1314,9 @@ void init_domains(void)
        if (priv_domid == DOMID_INVALID)
                barf("Could not determine xenstore domid\n");
 
+       snprintf(store_domain_path, sizeof(store_domain_path),
+                "/local/domain/%u", store_domid);
+
        /*
         * Local domid must be first to setup structures for firing the special
         * watches.
-- 
2.50.1




 


Rackspace

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