[libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt

Jonathon Jongsma posted 11 patches 3 years, 10 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200616142759.4625-1-jjongsma@redhat.com
There is a newer version of this series
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
[libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt
Posted by Jonathon Jongsma 3 years, 10 months ago
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

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt
Posted by Erik Skultety 3 years, 10 months ago
On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote:
> 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

So, looks like that the gitlab pipeline doesn't like your changes
https://gitlab.com/eskultety/libvirt/-/pipelines/156830100

However, I can run the same thing locally with
"make -C ci ci-check@fedora-31" successfully as well as on bare metal without
mdevctl installed, so I'll have to look into that more closely what's going on,
this is merely an FYI if you don't run your builds in gitlab by any chance. If
you do, great, that means that I forgot how to push to a git branch [1], anyways,
I'll look into that failure in the morning.

[1] https://www.youtube.com/watch?v=67aJIo1XdPw

Regards,
Erik

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt
Posted by Erik Skultety 3 years, 10 months ago
On Tue, Jun 16, 2020 at 07:23:40PM +0200, Erik Skultety wrote:
> On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote:
> > 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
>
> So, looks like that the gitlab pipeline doesn't like your changes
> https://gitlab.com/eskultety/libvirt/-/pipelines/156830100
>
> However, I can run the same thing locally with
> "make -C ci ci-check@fedora-31" successfully as well as on bare metal without
> mdevctl installed, so I'll have to look into that more closely what's going on,
> this is merely an FYI if you don't run your builds in gitlab by any chance. If

Got it. I forgot that gitlab is running distcheck whereas the containers from
the ci/ directory only run "check" (there's only ci-check command). You're
missing "nodedevmdevctldata" in the EXTRA_DIST list in tests/Makefile.am

Regards,
Erik

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt
Posted by Jonathon Jongsma 3 years, 10 months ago
On Tue, 2020-06-16 at 19:53 +0200, Erik Skultety wrote:
> On Tue, Jun 16, 2020 at 07:23:40PM +0200, Erik Skultety wrote:
> > On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote:
> > > 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
> > 
> > So, looks like that the gitlab pipeline doesn't like your changes
> > https://gitlab.com/eskultety/libvirt/-/pipelines/156830100
> > 
> > However, I can run the same thing locally with
> > "make -C ci ci-check@fedora-31" successfully as well as on bare
> > metal without
> > mdevctl installed, so I'll have to look into that more closely
> > what's going on,
> > this is merely an FYI if you don't run your builds in gitlab by any
> > chance. If
> 
> Got it. I forgot that gitlab is running distcheck whereas the
> containers from
> the ci/ directory only run "check" (there's only ci-check command).
> You're
> missing "nodedevmdevctldata" in the EXTRA_DIST list in
> tests/Makefile.am
> 
> Regards,
> Erik


This is a good reminder, thanks. I have not been pushing my WIP
branches to gitlab, so I haven't been running the gitlab CI. 

Jonathon

Re: [libvirt PATCH v3 00/11] Add ability to create mediated devices in libvirt
Posted by Michal Privoznik 3 years, 10 months ago
On 6/16/20 7:23 PM, Erik Skultety wrote:
> On Tue, Jun 16, 2020 at 09:27:48AM -0500, Jonathon Jongsma wrote:
>> 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
> 
> So, looks like that the gitlab pipeline doesn't like your changes
> https://gitlab.com/eskultety/libvirt/-/pipelines/156830100
> 
> However, I can run the same thing locally with
> "make -C ci ci-check@fedora-31" successfully as well as on bare metal without
> mdevctl installed, so I'll have to look into that more closely what's going on,
> this is merely an FYI if you don't run your builds in gitlab by any chance. If
> you do, great, that means that I forgot how to push to a git branch [1], anyways,
> I'll look into that failure in the morning.

Yeah, this is very weird because I cannot reproduce the issue.

The patches look good though.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

However, what's missing is news.rst addition. But that can be a follow 
up patch.

Michal