The series add a dual state to the mdev node devices as these objects
can be active and defined at the same time. These two states can
become different. To be able to also introspect the persisted and
transient nodedevs filtering is added. To be able to also dump the XML
of an inactive state while the node device is active a new option is
added.
The last three patches add the capability to update a mdev node device.
This can be done on the persisted configuration, on the active
configuration or on both. To support this v1.3.0 of mdevctl is required.
Changes since v1:
* replaced spec file requirement for v1.3.0 of mdevctl by a dynamic
support check and an unsupported message if not available.
* removed persisted precheck in virsh
* renamed persisted and persist into persistent
* addressed all other review comments made on v1
* added NEWS
Boris Fiuczynski (11):
virmdev: prepare type and attributes for dual state
node_device: refactor mdev attributes handling
node_device: remove unnecessary checks in virNodeDeviceDefFormat
nodedev: add an active config to mdev
tools: add option inactive to nodedev-dumpxml
nodedev: add persisted and transient filter on list
tools: add switches persisted and transient to nodedev-list
virsh: doc fix on nodedev-list
api: add virNodeDeviceUpdate()
nodedev: Implement virNodeDeviceUpdateXML
virsh: add nodedev-update
NEWS.rst | 7 +
docs/manpages/virsh.rst | 36 +-
include/libvirt/libvirt-nodedev.h | 31 ++
libvirt.spec.in | 1 +
src/access/viraccessperm.c | 1 +
src/access/viraccessperm.h | 6 +
src/conf/node_device_conf.c | 76 +--
src/conf/node_device_conf.h | 14 +-
src/conf/virnodedeviceobj.c | 50 ++
src/conf/virnodedeviceobj.h | 3 +
src/driver-nodedev.h | 6 +
src/libvirt-nodedev.c | 47 +-
src/libvirt_private.syms | 1 +
src/libvirt_public.syms | 5 +
src/node_device/node_device_driver.c | 459 +++++++++++++++---
src/node_device/node_device_driver.h | 17 +-
src/node_device/node_device_udev.c | 5 +-
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 17 +-
src/remote_protocol-structs | 6 +
src/test/test_driver.c | 6 +-
src/util/virmdev.h | 6 +
...60c_c60c_c60c_c60c_c60cc60cc60c_update.xml | 16 +
tests/nodedevmdevctldata/mdevctl-modify.argv | 25 +
tests/nodedevmdevctldata/mdevctl-modify.json | 1 +
tests/nodedevmdevctltest.c | 94 +++-
...v_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml | 14 +
...d_b7f0_4fea_b468_f1da537d301b_inactive.xml | 1 +
...v_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml | 10 +
...c_c60c_c60c_c60c_c60cc60cc60c_inactive.xml | 9 +
...9_36ea_4111_8f0a_8c9a70e21366_inactive.xml | 1 +
...9_495e_4243_ad9f_beb3f14c23d9_inactive.xml | 1 +
...4_f554_4dc1_809d_b2a01e8e48ad_inactive.xml | 8 +
...6_1ca8_49ac_b176_871d16c13076_inactive.xml | 1 +
tests/nodedevxml2xmltest.c | 59 ++-
tools/virsh-nodedev.c | 132 ++++-
36 files changed, 1030 insertions(+), 143 deletions(-)
create mode 100644
tests/nodedevmdevctldata/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c_update.xml
create mode 100644 tests/nodedevmdevctldata/mdevctl-modify.argv
create mode 100644 tests/nodedevmdevctldata/mdevctl-modify.json
create mode 100644 tests/nodedevschemadata/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml
create mode 120000
tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b_inactive.xml
create mode 100644 tests/nodedevxml2xmlout/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c.xml
create mode 100644
tests/nodedevxml2xmlout/mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c_inactive.xml
create mode 120000
tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366_inactive.xml
create mode 120000
tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9_inactive.xml
create mode 100644
tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad_inactive.xml
create mode 120000
tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076_inactive.xml
--
2.42.0