Port-xen archive

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

console "not configured" when scanning xenbus devices



Hi list,

First, happy new year to you all. I wish you all the best :)

I would like you to approve/disapprove the following diff concerning console and xencons stuff during autoconfiguration. Simply put, this patch makes the xenbus probing code "jump" the device identified as "console" during xenbus bus scanning, thus avoiding all the

"unknown type console at xenbus0 id 0 not configured"

lines that print out during domU boot or resume, which can be misleading (see for example http://mail-index.netbsd.org/port-xen/2008/09/24/msg004367.html )

These lines are caused by the "dualism" encountered for the console configuration in a domU. As explained in the link above, console (known as "xencons") is initialized early during boot, when we are scanning for devices attached to hypervisor (so we can fall back early in ddb for debugging).

However, for the sake of completeness, xentools add an entry for the console inside xenstore, under device/console. Although this entry is not used during xencons attach (xenbus being not initialized yet), it is still processed by xenbus_probe code. Since it cannot find any driver for this device, UNCONF ensues.

Opinions welcome.

--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost
Index: arch/xen/xenbus/xenbus_probe.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/xenbus/xenbus_probe.c,v
retrieving revision 1.26
diff -u -u -r1.26 xenbus_probe.c
--- arch/xen/xenbus/xenbus_probe.c      29 Oct 2008 13:53:15 -0000      1.26
+++ arch/xen/xenbus/xenbus_probe.c      5 Jan 2009 13:54:06 -0000
@@ -395,6 +395,14 @@
                return err;
 
        for (i = 0; i < dir_n; i++) {
+               /*
+                * console is configured through xen_start_info when
+                * xencons is attaching to hypervisor, so avoid console
+                * probing when configuring xenbus devices
+                */
+               if (strcmp(dir[i], "console") == 0)
+                       continue;
+
                snprintf(path, sizeof(path), "device/%s", dir[i]);
                err = xenbus_probe_device_type(path, dir[i], NULL);
                if (err)


Home | Main Index | Thread Index | Old Index