From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] hvc_xen: introduce HVC_XEN_FRONTEND
Date: Tue, 13 Mar 2012 19:20:27 -0400 [thread overview]
Message-ID: <20120313232027.GA18386@phenom.dumpdata.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203131824130.923@kaball-desktop>
On Tue, Mar 13, 2012 at 06:30:44PM +0000, Stefano Stabellini wrote:
> 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).
Yup. Seems to work with PV and HVM in both Xen 4.1 (with patch) and Xen 4.0.
>
> ---
>
> 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@eu.citrix.com>
>
> 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;
next prev parent reply other threads:[~2012-03-13 23:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-21 11:30 [PATCH] hvc_xen: introduce HVC_XEN_FRONTEND Stefano Stabellini
2012-02-21 14:43 ` Konrad Rzeszutek Wilk
2012-03-04 16:06 ` Konrad Rzeszutek Wilk
2012-03-05 22:45 ` Stefano Stabellini
2012-03-13 16:29 ` Konrad Rzeszutek Wilk
2012-03-13 18:30 ` Stefano Stabellini
2012-03-13 23:20 ` Konrad Rzeszutek Wilk [this message]
2012-03-13 23:34 ` Matt Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120313232027.GA18386@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.