This is the first portion of an effort to support persistent mediated devices
with libvirt. This first series simply enables creating and destroying
non-persistent mediated devices via the virNodeDeviceCreateXML() and
virNodeDeviceDestroy() functions. The 'mdevctl' utility[1] provides the backend
implementation.
Changes in v3:
- Includes all of the changes mentioned by Michal
- makes iommuGroup element optional for the nodedev schema (per Erik)
- substitutes a placeholder for the path to the mdevctl binary before
comparing to the expected output
[1]
https://github.com/mdevctl/mdevctl
Jonathon Jongsma (11):
nodedev: make iommuGroup optional for mdevs
nodedev: factor out nodeDeviceHasCapability()
nodedev: add support for mdev attributes
nodedev: refactor nodeDeviceFindNewDevice()
nodedev: store mdev UUID in mdev caps
nodedev: add mdev support to virNodeDeviceCreateXML()
nodedev: Build a non-loadable driver lib
nodedev: Add testing for 'mdevctl start'
nodedev: add mdev support to virNodeDeviceDestroy()
nodedev: Add testing for 'mdevctl stop'
docs: note node device fields that are read-only
build-aux/syntax-check.mk | 2 +-
docs/formatnode.html.in | 21 +-
docs/schemas/nodedev.rng | 18 +-
libvirt.spec.in | 2 +
m4/virt-external-programs.m4 | 3 +
src/conf/node_device_conf.c | 64 +++-
src/conf/node_device_conf.h | 3 +
src/conf/virnodedeviceobj.c | 34 ++
src/conf/virnodedeviceobj.h | 3 +
src/libvirt_private.syms | 3 +
src/node_device/Makefile.inc.am | 23 +-
src/node_device/node_device_driver.c | 360 ++++++++++++++++--
src/node_device/node_device_driver.h | 8 +
src/node_device/node_device_udev.c | 5 +-
src/util/virmdev.c | 12 +
src/util/virmdev.h | 11 +
tests/Makefile.am | 14 +
...019_36ea_4111_8f0a_8c9a70e21366-start.argv | 1 +
...019_36ea_4111_8f0a_8c9a70e21366-start.json | 1 +
...d39_495e_4243_ad9f_beb3f14c23d9-start.argv | 1 +
...d39_495e_4243_ad9f_beb3f14c23d9-start.json | 1 +
...916_1ca8_49ac_b176_871d16c13076-start.argv | 1 +
...916_1ca8_49ac_b176_871d16c13076-start.json | 1 +
tests/nodedevmdevctldata/mdevctl-stop.argv | 1 +
tests/nodedevmdevctltest.c | 304 +++++++++++++++
...v_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 7 +
...v_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 9 +
...v_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 8 +
28 files changed, 853 insertions(+), 68 deletions(-)
create mode 100644
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv
create mode 100644
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.json
create mode 100644
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv
create mode 100644
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.json
create mode 100644
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv
create mode 100644
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.json
create mode 100644 tests/nodedevmdevctldata/mdevctl-stop.argv
create mode 100644 tests/nodedevmdevctltest.c
create mode 100644 tests/nodedevschemadata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml
create mode 100644 tests/nodedevschemadata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml
create mode 100644 tests/nodedevschemadata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml
--
2.21.3