]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: add mdev support to virNodeDeviceCreateXML()
authorJonathon Jongsma <jjongsma@redhat.com>
Thu, 18 Jun 2020 21:05:59 +0000 (16:05 -0500)
committerErik Skultety <eskultet@redhat.com>
Fri, 19 Jun 2020 08:39:55 +0000 (10:39 +0200)
commit9691440ecbc7d9383a1410f1067a4f9221f2de2c
treeeab590f4fb24c534666ee37bd6a05ccb75fe897a
parent4583a73470803ff74587496c5562899237bcf3b9
nodedev: add mdev support to virNodeDeviceCreateXML()

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@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
libvirt.spec.in
m4/virt-external-programs.m4
src/conf/virnodedeviceobj.c
src/conf/virnodedeviceobj.h
src/libvirt_private.syms
src/node_device/node_device_driver.c
src/node_device/node_device_driver.h