qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 04/12] vfio-user: instantiate vfio-user context


From: Stefan Hajnoczi
Subject: Re: [PATCH v3 04/12] vfio-user: instantiate vfio-user context
Date: Mon, 1 Nov 2021 10:35:56 +0000

On Fri, Oct 29, 2021 at 02:59:02PM +0000, Jag Raman wrote:
> 
> 
> > On Oct 27, 2021, at 11:59 AM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > 
> > On Mon, Oct 11, 2021 at 01:31:09AM -0400, Jagannathan Raman wrote:
> >> @@ -94,9 +101,31 @@ static void vfu_object_set_device(Object *obj, const 
> >> char *str, Error **errp)
> >>     trace_vfu_prop("device", str);
> >> }
> >> 
> >> +/*
> >> + * vfio-user-server depends on the availability of the 'socket' and 
> >> 'device'
> >> + * properties. It also depends on devices instantiated in QEMU. These
> >> + * dependencies are not available during the instance_init phase of this
> >> + * object's life-cycle. As such, the server is initialized after the
> >> + * machine is setup. machine_init_done_notifier notifies vfio-user-server
> >> + * when the machine is setup, and the dependencies are available.
> >> + */
> >> +static void vfu_object_machine_done(Notifier *notifier, void *data)
> >> +{
> >> +    VfuObject *o = container_of(notifier, VfuObject, machine_done);
> > 
> > Was there a check for non-NULL o->socket before this? Maybe it's not
> > needed because QAPI treats 'socket' as a required field and refuses to
> > create the SocketAddress if it's missing?
> 
> Yes,  “socket” is a required option. The server will not launch without that 
> option.

Thanks for confirming!

> I believe optional parameters are defined within ‘[‘ and ‘]’ braces in 
> "./qapi/qom.json"

Optional parameters have the asterisk ('*'). Block quotes are for lists.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]