[libvirt PATCH v2 0/7] Enable autostarting mediated devices

Jonathon Jongsma jjongsma at redhat.com
Fri Jun 4 18:53:36 UTC 2021


This series replaces the initial patch that was recently reverted. It
implements the autostart feature using a new virNodeDeviceGet/SetAutostart()
API that is consistent with how other libvirt objects handle autostart. It also
adds a counterpart virsh command nodedev-autostart.

In order to easily check the 'autostart' status of the device (since it is no
longer part of the device xml), a new virsh command is introduced:
nodedev-info. This also presents a few more basic bits of information about the
device, including 'active' and 'persistent' status, which requires exposing new
APIs on the node device: IsActive() and IsPersistent(). These APIs are
consistent with existing libvirt objects.

Changes in version 2:
 - Parse the autostart property from mdevctl output.
 - only re-sending patch 2/7, all others were already ACKED

Jonathon Jongsma (7):
  api: add virNodeDevice(Get|Set)Autostart()
  nodedev: implement virNodeDevice(Get|Set)Autostart()
  nodedev: Add tests for mdevctl autostart command
  virsh: add nodedev-autostart
  api: add virNodeDeviceIsPersistent()/IsActive()
  nodedev: Implement virNodeDeviceIsPersistent()/IsActive()
  virsh: add nodedev-info

 docs/manpages/virsh.rst                       |  27 +++
 include/libvirt/libvirt-nodedev.h             |  10 +
 src/conf/node_device_conf.h                   |   1 +
 src/conf/virnodedeviceobj.c                   |  16 ++
 src/conf/virnodedeviceobj.h                   |   6 +
 src/driver-nodedev.h                          |  18 ++
 src/libvirt-nodedev.c                         | 141 ++++++++++++++
 src/libvirt_private.syms                      |   2 +
 src/libvirt_public.syms                       |   6 +
 src/node_device/node_device_driver.c          | 183 +++++++++++++++++-
 src/node_device/node_device_driver.h          |  19 ++
 src/node_device/node_device_udev.c            |  30 ++-
 src/remote/remote_driver.c                    |   6 +-
 src/remote/remote_protocol.x                  |  59 +++++-
 src/remote_protocol-structs                   |  26 +++
 .../nodedevmdevctldata/mdevctl-autostart.argv |   8 +
 tests/nodedevmdevctltest.c                    |  54 ++++++
 tools/virsh-nodedev.c                         | 139 +++++++++++++
 18 files changed, 744 insertions(+), 7 deletions(-)
 create mode 100644 tests/nodedevmdevctldata/mdevctl-autostart.argv

-- 
2.31.1





More information about the libvir-list mailing list