qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object


From: Stefan Hajnoczi
Subject: Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object
Date: Fri, 17 Dec 2021 08:28:07 +0000

On Fri, Dec 17, 2021 at 02:31:14AM +0000, Jag Raman wrote:
> 
> 
> > On Dec 16, 2021, at 4:58 AM, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > 
> > On Wed, Dec 15, 2021 at 10:35:28AM -0500, Jagannathan Raman wrote:
> >> +static void vfu_object_set_socket(Object *obj, Visitor *v, const char 
> >> *name,
> >> +                                  void *opaque, Error **errp)
> >> +{
> >> +    VfuObject *o = VFU_OBJECT(obj);
> >> +
> >> +    qapi_free_SocketAddress(o->socket);
> >> +
> >> +    o->socket = NULL;
> >> +
> >> +    visit_type_SocketAddress(v, name, &o->socket, errp);
> >> +
> >> +    if (o->socket->type != SOCKET_ADDRESS_TYPE_UNIX) {
> >> +        qapi_free_SocketAddress(o->socket);
> >> +        o->socket = NULL;
> >> +        error_setg(errp, "vfu: Unsupported socket type - %s",
> >> +                   o->socket->u.q_unix.path);
> >> +        return;
> >> +    }
> >> +
> >> +    trace_vfu_prop("socket", o->socket->u.q_unix.path);
> >> +}
> >> +
> >> +static void vfu_object_set_device(Object *obj, const char *str, Error 
> >> **errp)
> >> +{
> >> +    VfuObject *o = VFU_OBJECT(obj);
> >> +
> >> +    g_free(o->device);
> >> +
> >> +    o->device = g_strdup(str);
> >> +
> >> +    trace_vfu_prop("device", str);
> >> +}
> > 
> > It appears "socket" and "device" can be changed after the
> > vfio-user server has started. In the best case it just means the
> > properties contain values that do not reflect the actual socket/device
> > currently in use, which is confusing.
> 
> I’m not sure about the scenario in which that would occur, but will add that 
> check.

Properties can be modified using the qom-set monitor command. This can
happen any time.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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