On Fri, Dec 17, 2021 at 02:31:14AM +0000, Jag Raman wrote: > > > > On Dec 16, 2021, at 4:58 AM, Stefan Hajnoczi <stefa...@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
signature.asc
Description: PGP signature