On 03.11.23 02:42, Jason Andryuk wrote:
On Thu, Nov 2, 2023 at 4:23 AM Juergen Gross <jgr...@suse.com> wrote:On 01.11.23 20:21, Jason Andryuk wrote:On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross <jgr...@suse.com> wrote:Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross <jgr...@suse.com>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.
Thanks, but I think this should be part of the initial series. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature