On Thu, Jun 18, 2020 at 04:05:59PM -0500, Jonathon Jongsma wrote: > With recent additions to the node device xml schema, an xml schema can > now describe a mdev device sufficiently for libvirt to create and start > the device using the mdevctl utility. > > Note that some of the the configuration for a mediated device must be > passed to mdevctl as a JSON-formatted file. In order to avoid creating > and cleaning up temporary files, the JSON is instead fed to stdin and we > pass the filename /dev/stdin to mdevctl. While this may not be portable, > neither are mediated devices, so I don't believe it should cause any > problems. > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx> > --- ... > diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c > index 3a34a324ca..fd20d5f9e2 100644 > --- a/src/conf/virnodedeviceobj.c > +++ b/src/conf/virnodedeviceobj.c > @@ -399,6 +399,40 @@ virNodeDeviceObjListFindSCSIHostByWWNs(virNodeDeviceObjListPtr devs, > &data); > } > > +static int > +virNodeDeviceObjListFindMediatedDeviceByUUIDCallback(const void *payload, > + const void *name G_GNUC_UNUSED, > + const void *opaque G_GNUC_UNUSED) @opaque is used I'll fix this before merging. Erik