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

Re: [PATCH 03/29] tools/xenlogd: connect to frontend



On Thu, Nov 2, 2023 at 4:23 AM Juergen Gross <jgross@xxxxxxxx> wrote:
>
> On 01.11.23 20:21, Jason Andryuk wrote:
> > On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross <jgross@xxxxxxxx> wrote:
> >>
> >> Add the code for connecting to frontends to xenlogd.
> >>
> >> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> >
> >> diff --git a/tools/xenlogd/xenlogd.c b/tools/xenlogd/xenlogd.c
> >> index 792d1026a3..da0a09a122 100644
> >> --- a/tools/xenlogd/xenlogd.c
> >> +++ b/tools/xenlogd/xenlogd.c
> >
> >> +static void connect_device(device *device)
> >> +{
> >> +    unsigned int val;
> >> +    xenevtchn_port_or_error_t evtchn;
> > 1.> +
> >> +    val = read_frontend_node_uint(device, "version", 0);
> >> +    if ( val != 1 )
> >> +        return connect_err(device, "frontend specifies illegal version");
> >> +    val = read_frontend_node_uint(device, "num-rings", 0);
> >> +    if ( val != 1 )
> >> +        return connect_err(device, "frontend specifies illegal ring 
> >> number");
> >
> > Linux uses 2 rings (XEN_9PFS_NUM_RINGS), and it doesn't connect when
> > max-rings is less than that.
> >
> > max_rings = xenbus_read_unsigned(dev->otherend, "max-rings", 0);
> > if (max_rings < XEN_9PFS_NUM_RINGS)
> >      return -EINVAL;
> >
> > new_device() writes max-rings as 1.  So this works for mini-os, but
> > not Linux.  I'm not requesting you to change it - just noting it.
>
> Thanks for the note. I'll change it to allow more rings.

I'm happy to work on Linux compatibility as a follow up, if you just
want to focus on your Mini-OS use case.

Regards,
Jason



 


Rackspace

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