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

[xen staging] xenstored: Default priv_domid to store_domid



commit 31778404a1bb9fe09c53f87cdccc8ca92f729756
Author:     Jason Andryuk <jason.andryuk@xxxxxxx>
AuthorDate: Tue Nov 25 10:24:57 2025 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 25 10:24:57 2025 +0100

    xenstored: Default priv_domid to store_domid
    
    On a system without a control domain, a hardware|xenstore domain
    starting xenstored shows:
    common/grant_table.c:1041:d2v0 Could not find domain 32756
    gnttab: error: mmap failed: Invalid argument
    Could not initialize dom32756
    
    setup_structure() does not get called without priv_domid.  Subsequent
    introduce_domain() calls will fault when calling fire_special_watches().
    
    Default priv_domid to store_domid when there is no control domain.
    
    Fixes: e5b0a9405571 ("tools/xenstored: Auto-introduce domains")
    Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
---
 tools/xenstored/domain.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c
index 5ce539d640..d504e9994b 100644
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c
@@ -1388,6 +1388,12 @@ void init_domains(void)
        if (store_domid == DOMID_INVALID)
                barf("Could not determine xenstore domid\n");
 
+       if (priv_domid == DOMID_INVALID)
+       {
+               priv_domid = store_domid;
+               xprintf("priv_domid defaulted to %u\n", priv_domid);
+       }
+
        snprintf(store_domain_path, sizeof(store_domain_path),
                 "/local/domain/%u", store_domid);
 
--
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®.