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

[Xen-changelog] Added some clarifying comments regarding xenbus/xenstore kernel startup.



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 5df423407700ae4ef9e9020501b24eb659febc8c
# Parent  8016551fde9825fc82bfa4762f17b98e7519b823
Added some clarifying comments regarding xenbus/xenstore kernel startup.

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r 8016551fde98 -r 5df423407700 
linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c
--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Sun Oct  9 
17:52:54 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c        Sun Oct  9 
19:55:53 2005
@@ -246,7 +246,10 @@
                                   PAGE_SHIFT);
                ret = xen_start_info->store_mfn;
 
-               /* We'll return then this will wait for daemon to answer */
+               /* 
+               ** Complete initialization of xenbus (viz. set up the 
+               ** connection to xenstored now that it has started). 
+               */
                kthread_run(do_xenbus_probe, NULL, "xenbus_probe");
        }
        break;
diff -r 8016551fde98 -r 5df423407700 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Sun Oct  9 
17:52:54 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Sun Oct  9 
19:55:53 2005
@@ -666,12 +666,16 @@
 }
 EXPORT_SYMBOL(unregister_xenstore_notifier);
 
-/* called from a thread in privcmd/privcmd.c */
+/* 
+** Called either from below xenbus_probe_init() initcall (for domUs) 
+** or, for dom0, from a thread created in privcmd/privcmd.c (after 
+** the user-space tools have invoked initDomainStore()) 
+*/
 int do_xenbus_probe(void *unused)
 {
        int err = 0;
 
-       /* Initialize xenstore comms unless already done. */
+       /* Initialize the interface to xenstore. */
        err = xs_init();
        if (err) {
                printk("XENBUS: Error initializing xenstore comms:"
@@ -703,6 +707,10 @@
        device_register(&xenbus_frontend.dev);
        device_register(&xenbus_backend.dev);
 
+       /* 
+       ** Domain0 doesn't have a store_evtchn yet - this will
+       ** be set up later by xend invoking initDomainStore() 
+       */
        if (!xen_start_info->store_evtchn)
                return 0;
 
diff -r 8016551fde98 -r 5df423407700 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c       Sun Oct  9 
17:52:54 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c       Sun Oct  9 
19:55:53 2005
@@ -780,6 +780,9 @@
        }
 }
 
+/*
+** Initialize the interface to xenstore. 
+*/
 int xs_init(void)
 {
        int err;
@@ -793,6 +796,7 @@
        init_MUTEX(&xs_state.transaction_mutex);
        xs_state.transaction_pid = -1;
 
+       /* Initialize the shared memory rings to talk to xenstored */
        err = xb_init_comms();
        if (err)
                return err;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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