[libvirt] [PATCH v3 0/6] PCI hostdev partial assignment support

Daniel Henrique Barboza danielhb413 at gmail.com
Tue Nov 26 13:33:55 UTC 2019


changes from previous version [1]:
- do not overload address type='none'. A new address type called
'unassigned' is introduced;
- there is no unassigned' flag being created in virDomainHostdevDef.
The logic added by new address type is enough;
- do not allow function zero of multifunction devices to be
unassigned.

Nothing too special to discuss in this cover letter. More details
can be found at the discussions of the previous version [1]. Commit
messages of the patches have more background info as well.

[1] https://www.redhat.com/archives/libvir-list/2019-November/msg01099.html

Daniel Henrique Barboza (6):
  Introducing new address type='unassigned' for PCI hostdevs
  qemu: handle unassigned PCI hostdevs in command line and alias
  virhostdev.c: check all IOMMU devs in virHostdevPreparePCIDevices
  formatdomain.html.in: document <address type='unassigned'/>
  utils: PCI multifunction detection helpers
  domain_conf.c: don't allow function zero to be unassigned

 docs/formatdomain.html.in                     | 14 +++
 docs/schemas/domaincommon.rng                 |  5 ++
 src/conf/device_conf.c                        |  2 +
 src/conf/device_conf.h                        |  1 +
 src/conf/domain_conf.c                        | 20 ++++-
 src/libvirt_private.syms                      |  2 +
 src/qemu/qemu_alias.c                         |  6 ++
 src/qemu/qemu_command.c                       |  5 ++
 src/qemu/qemu_domain.c                        |  1 +
 src/qemu/qemu_domain_address.c                |  5 ++
 src/util/virhostdev.c                         | 88 +++++++++++++++++--
 src/util/virhostdev.h                         |  3 +
 src/util/virpci.c                             | 17 ++++
 src/util/virpci.h                             |  2 +
 .../hostdev-pci-address-unassigned.args       | 31 +++++++
 .../hostdev-pci-address-unassigned.xml        | 42 +++++++++
 ...pci-multifunction-zero-unassigned-fail.xml | 42 +++++++++
 tests/qemuxml2argvtest.c                      |  8 ++
 .../hostdev-pci-address-unassigned.xml        | 58 ++++++++++++
 tests/qemuxml2xmltest.c                       |  1 +
 tests/virpcimock.c                            |  9 +-
 21 files changed, 351 insertions(+), 11 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-unassigned.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-address-unassigned.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-multifunction-zero-unassigned-fail.xml
 create mode 100644 tests/qemuxml2xmloutdata/hostdev-pci-address-unassigned.xml

-- 
2.23.0





More information about the libvir-list mailing list