]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
tools/init-dom0less: Only seed legacy xenstore grants
authorJason Andryuk <jason.andryuk@amd.com>
Wed, 16 Apr 2025 21:29:09 +0000 (17:29 -0400)
committerStefano Stabellini <stefano.stabellini@amd.com>
Fri, 18 Apr 2025 20:41:29 +0000 (13:41 -0700)
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@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
tools/helpers/init-dom0less.c

index 17579fe2e8d4a473577472d5204630cd5bb02cf0..91edf17b6cef279f1813afa7674b08d94c1dcf6d 100644 (file)
@@ -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));