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

[PATCH 09/23] tools/init-dom0less: Only seed legacy xenstore grants


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Thu, 6 Mar 2025 17:03:29 -0500
  • 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=h3tMNxxL+69wngCwofVJ/wGbA20D0gJe7GF8lfRxq1Y=; b=TgFfai0727G/lazIs4SVgYNtYCrn6bE21tVpmuRqYsxfiNeiHjIPyRu+3cive6Z7FzykDe6RrkFc2ihR3eezzVEQsLvLSu28YkeIeiODhZc0q4oxal3LGSVKq1ROPS6nkdndFwGzNa6snTCg85uPtxGHJN2A/YiiYmzTd5G5OPsB3/ayLy9s46dIize9CAjS6TrJ/YpKYcBT9O5WL/YbtgrutvgYosDeIBfsSJxx1XUVbmUgkkaLu2DYxJfIeECvAeMYLaFeb2dranl0YaOR1PnrklNKiKwq957vQbuvzMmeWCiZxSSoo63CYAWsirsT36DdScAZOv62Tg0dW8/ONA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=EV3DAIknSCgP+WWDAKPkYKyVWbeAinVltIoL0TLyxOtziNhzrGp56j40Ocgi6j5L6QSPyz96RG+uNoxl80bP1agFEyRpMC1/LvXzr0ysDyP0p/secFJk8q2xLN48l4ZEz92u2Tzzxo77qvm6qGTtLFfjh6lzm7/4xiLkGZDXUuYSNMoPW3uTTaHGSLfKBQd47BCyUCXw1aj+Ie6CBk0zcHWxqKZq1leOzincZas+JWFUuFfbLLfDPvUCjkBifs7w6oNYNSuPb/liToQ+A5UUZmLWImFYwuwxeLbh9o3yCU/kxgFzrH9xXznht7urrOfklFHAzgxhCKj+3DItIXf91g==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Thu, 06 Mar 2025 22:04:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The hardware domain is unable to seed a control domain, but we want the
control domain to use xenstore.  Rely on the hypervisor to seed dom0less
grant table entries for Xenstore, so this seeding is unnecessary.

However, that only works for the new xenstore late init.  The legacy
protocol which uses init-dom0less to populate the page still needs to
seed the grant.

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

diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c
index 17579fe2e8..91edf17b6c 100644
--- a/tools/helpers/init-dom0less.c
+++ b/tools/helpers/init-dom0less.c
@@ -286,12 +286,12 @@ static int init_domain(struct xs_handle *xsh,
                 xenstore_pfn);
         if (rc < 0)
             return rc;
-    }
 
-    rc = xc_dom_gnttab_seed(xch, info->domid, true,
-                            (xen_pfn_t)-1, xenstore_pfn, 0, 0);
-    if (rc)
-        err(1, "xc_dom_gnttab_seed");
+        rc = xc_dom_gnttab_seed(xch, info->domid, true,
+                                (xen_pfn_t)-1, xenstore_pfn, 0, 0);
+        if (rc)
+               err(1, "xc_dom_gnttab_seed");
+    }
 
     libxl_uuid_generate(&uuid);
     xc_domain_sethandle(xch, info->domid, libxl_uuid_bytearray(&uuid));
-- 
2.48.1




 


Rackspace

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