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

[xen staging] tools/init-dom0less: Only seed legacy xenstore grants



commit 375c4837ee10d481254e8910b873a6ce03cfd742
Author:     Jason Andryuk <jason.andryuk@xxxxxxx>
AuthorDate: Wed Apr 16 17:29:09 2025 -0400
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Fri Apr 18 13:41:29 2025 -0700

    tools/init-dom0less: Only seed legacy xenstore grants
    
    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>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 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));
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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