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

Re: [Xen-devel] [PATCH] hvc_xen: introduce HVC_XEN_FRONTEND



On Tue, 13 Mar 2012, Konrad Rzeszutek Wilk wrote:
> > Even a 'feature-pv-on-hvm-console' flag  wouldn't help.
> > 
> > Maybe we need to introduce an explicit check in xenbus_probe_device_type
> > to avoid calling bus->probe if type == "console" and dir[i] == "0", what
> > do you think?
> 
> If that works..?

Yes, it does: the appended patch might be ugly but fixes the problem for
me (tested xen 4.1, xm/xend, vfb enabled and disabled so both qemu and
xenconsoled as console backends).

---

xenbus: ignore console/0

Unfortunately xend creates a bogus console/0 frotend/backend entry pair
on xenstore that console backends cannot properly cope with.
Any guest behavior that is not completely ignoring console/0 is going
to either cause problems with xenconsoled or qemu.
Returning 0 or -ENODEV from xencons_probe is not enough because it is
going to cause the frontend state to become 4 or 6 respectively.
The best possible thing we can do here is just ignore the entry from
xenbus_probe_frontend.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c 
b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 9c57819..f20c5f1 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -53,6 +53,12 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, 
const char *type,
        char *nodename;
        int err;
 
+       /* ignore console/0 */
+       if (!strncmp(type, "console", 7) && !strncmp(name, "0", 1)) {
+               DPRINTK("Ignoring buggy device entry console/0");
+               return 0;
+       }
+
        nodename = kasprintf(GFP_KERNEL, "%s/%s/%s", bus->root, type, name);
        if (!nodename)
                return -ENOMEM;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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