On Mon, Oct 05, 2020 at 11:50:56AM -0700, elena.ufimts...@oracle.com wrote: > +static void remote_object_machine_done(Notifier *notifier, void *data) > +{ > + RemoteObject *o = container_of(notifier, RemoteObject, machine_done); > + DeviceState *dev = NULL; > + QIOChannel *ioc = NULL; > + Coroutine *co = NULL; > + RemoteCommDev *comdev = NULL; > + Error *err = NULL; > + > + dev = qdev_find_recursive(sysbus_get_default(), o->devid); > + if (!dev || !object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) { > + error_report("%s is not a PCI device", o->devid); > + return; > + } > + > + ioc = qio_channel_new_fd(o->fd, &err); > + if (!ioc) { > + error_report_err(err); > + return; > + } > + qio_channel_set_blocking(ioc, false, NULL); > + qio_channel_set_feature(ioc, QIO_CHANNEL_FEATURE_FD_PASS);
This flag is already set by qio_channel_socket_set_fd() from qio_channel_new_fd() so the call to qio_channel_set_feature() can be dropped. You may want to check the presence of the feature in case a non-AF_UNIX fd was passed though.
signature.asc
Description: PGP signature