Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread Stefan Hajnoczi
On Wed, Sep 08, 2021 at 03:21:19PM +, John Levon wrote: > On Wed, Sep 08, 2021 at 04:02:22PM +0100, Stefan Hajnoczi wrote: > > > > We'd have to have a whole separate API to do that, so a separate thread > > > seems a > > > better approach? > > > > Whether to support non-blocking properly in

Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread John Levon
On Wed, Sep 08, 2021 at 04:02:22PM +0100, Stefan Hajnoczi wrote: > > We'd have to have a whole separate API to do that, so a separate thread > > seems a > > better approach? > > Whether to support non-blocking properly in libvfio-user is a decision > for you. If libvfio-user doesn't support

Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread Stefan Hajnoczi
On Wed, Sep 08, 2021 at 01:37:53PM +, John Levon wrote: > On Wed, Sep 08, 2021 at 01:58:46PM +0100, Stefan Hajnoczi wrote: > > > > +static void *vfu_object_attach_ctx(void *opaque) > > > +{ > > > +VfuObject *o = opaque; > > > +int ret; > > > + > > > +retry_attach: > > > +ret =

Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread John Levon
On Wed, Sep 08, 2021 at 01:58:46PM +0100, Stefan Hajnoczi wrote: > > +static void *vfu_object_attach_ctx(void *opaque) > > +{ > > +VfuObject *o = opaque; > > +int ret; > > + > > +retry_attach: > > +ret = vfu_attach_ctx(o->vfu_ctx); > > +if (ret < 0 && (errno == EAGAIN || errno ==

Re: [PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-09-08 Thread Stefan Hajnoczi
On Fri, Aug 27, 2021 at 01:53:24PM -0400, Jagannathan Raman wrote: > Setup a handler to run vfio-user context. The context is driven by > messages to the file descriptor associated with it - get the fd for > the context and hook up the handler with it > > Signed-off-by: Elena Ufimtseva >

[PATCH RFC server v2 05/11] vfio-user: run vfio-user context

2021-08-27 Thread Jagannathan Raman
Setup a handler to run vfio-user context. The context is driven by messages to the file descriptor associated with it - get the fd for the context and hook up the handler with it Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman ---