[PATCH v3 00/21] PCI Multifunction hotplug/unplug support

Daniel Henrique Barboza posted 21 patches 5 days ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200520211143.2980117-1-danielhb413@gmail.com
src/conf/device_conf.h                        |   7 +
src/conf/domain_addr.c                        | 130 +++++-
src/conf/domain_addr.h                        |  43 +-
src/conf/domain_conf.c                        | 224 ++++++++-
src/conf/domain_conf.h                        |  38 ++
src/hypervisor/virhostdev.c                   |  29 ++
src/hypervisor/virhostdev.h                   |   2 +
src/libvirt_private.syms                      |  10 +
src/qemu/qemu_domain.c                        |  75 +++
src/qemu/qemu_domain.h                        |  21 +-
src/qemu/qemu_domain_address.c                | 311 ++++++++++++-
src/qemu/qemu_domain_address.h                |  17 +
src/qemu/qemu_driver.c                        | 243 +++++++---
src/qemu/qemu_hotplug.c                       | 431 +++++++++++++++---
src/qemu/qemu_hotplug.h                       |  14 +
src/qemu/qemu_validate.c                      |  56 +++
src/qemu/qemu_validate.h                      |   1 +
src/util/virpci.c                             |  17 +
src/util/virpci.h                             |   4 +
tests/qemuhotplugtest.c                       |  66 ++-
...emuhotplug-multifunction-hostdev-pci-2.xml |  14 +
...plug-multifunction-hostdev-pci-partial.xml |  27 ++
.../qemuhotplug-multifunction-hostdev-pci.xml |  26 ++
...live+multifunction-hostdev-pci-partial.xml |  82 ++++
...ug-base-live+multifunction-hostdev-pci.xml |  82 ++++
...-base-live+multifunction-hostdev-pci-2.xml |  59 +++
...es-base-live+multifunction-hostdev-pci.xml |  69 +++
.../hostdev-pci-address-unassigned.args       |   9 +-
.../hostdev-pci-multifunction.args            |  18 +-
.../hostdev-pci-multifunction.xml             |   8 +-
.../hostdev-pci-no-primary-function.xml       |  23 +
.../hostdev-pci-validate.args                 |  30 ++
.../qemuxml2argvdata/hostdev-pci-validate.xml |  29 ++
.../qemuxml2argvdata/pseries-hostdevs-1.args  |   5 +-
.../qemuxml2argvdata/pseries-hostdevs-3.args  |   5 +-
tests/qemuxml2argvtest.c                      |  14 +-
.../hostdev-pci-address-unassigned.xml        |   8 +-
.../hostdev-pci-multifunction.xml             |  24 +-
.../qemuxml2xmloutdata/pseries-hostdevs-1.xml |   4 +-
.../qemuxml2xmloutdata/pseries-hostdevs-3.xml |   4 +-
tests/virpcitestdata/0005-90-01.1.config      | Bin 256 -> 256 bytes
tests/virpcitestdata/0005-90-01.2.config      | Bin 256 -> 256 bytes
tests/virpcitestdata/0005-90-01.3.config      | Bin 0 -> 256 bytes
43 files changed, 2022 insertions(+), 257 deletions(-)
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci-2.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci-partial.xml
create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+multifunction-hostdev-pci-partial.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+multifunction-hostdev-pci.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live+multifunction-hostdev-pci-2.xml
create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live+multifunction-hostdev-pci.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-pci-no-primary-function.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-pci-validate.args
create mode 100644 tests/qemuxml2argvdata/hostdev-pci-validate.xml
create mode 100644 tests/virpcitestdata/0005-90-01.3.config

[PATCH v3 00/21] PCI Multifunction hotplug/unplug support

Posted by Daniel Henrique Barboza 5 days ago
This is the v3 of the same support sent to the mailing list
a few months ago. No major changes were made. Refer to the
v2 cover letter for a general view of the design used
across the patches.


Changes in v3:
- rebase to master at d265171b5784
- minor typo fixes


link to v2: https://www.redhat.com/archives/libvir-list/2020-January/msg01377.html
link to v1: https://www.redhat.com/archives/libvir-list/2020-January/msg01377.html

Daniel Henrique Barboza (4):
  utils: PCI multifunction detection helpers
  qemu_hotplug.c: tune unplugTimeout for multifunction detach
  qemu_hotplug: do not hotplug/hotunplug 'unassigned' hostdevs
  qemu_hotplug.c: use enhanced multifunction unplug if available

Shivaprasad G Bhat (17):
  qemu: address: Separate the slots into multiple aggregates
  virhostdev: Introduce virHostdevPCIDevicesBelongToSameSlot
  qemu: address: Enable auto addressing multifunction cards
  conf: qemu: validate multifunction hostdevice domain configs
  conf: Add helper to get active functions of a slot of domain
  qemu: hostdev: Move the hostdev preparation to a separate function
  qemu: hotplug: Move the detach of PCI device to the beginning of live
    hotplug
  qemu: hotplug: move assignment outside qemuDomainAttachHostPCIDevice
  Introduce virDomainDeviceDefParseXMLMany
  Introduce qemuDomainDeviceParseXMLMany
  qemu: refactor qemuDomain[Attach|Detach]DeviceConfig
  qemu: refactor qemuDomain[Attach|Detach]DeviceLive
  qemu: hotplug: Queue and wait for multiple devices
  domain: addr: Introduce virDomainPCIAddressEnsureMultifunctionAddress
  qemu: hotplug: Implement multifunction device hotplug
  qemu: hotplug: Prevent updates to multifunction device
  qemu: hotplug: Implement multifunction device unplug

 src/conf/device_conf.h                        |   7 +
 src/conf/domain_addr.c                        | 130 +++++-
 src/conf/domain_addr.h                        |  43 +-
 src/conf/domain_conf.c                        | 224 ++++++++-
 src/conf/domain_conf.h                        |  38 ++
 src/hypervisor/virhostdev.c                   |  29 ++
 src/hypervisor/virhostdev.h                   |   2 +
 src/libvirt_private.syms                      |  10 +
 src/qemu/qemu_domain.c                        |  75 +++
 src/qemu/qemu_domain.h                        |  21 +-
 src/qemu/qemu_domain_address.c                | 311 ++++++++++++-
 src/qemu/qemu_domain_address.h                |  17 +
 src/qemu/qemu_driver.c                        | 243 +++++++---
 src/qemu/qemu_hotplug.c                       | 431 +++++++++++++++---
 src/qemu/qemu_hotplug.h                       |  14 +
 src/qemu/qemu_validate.c                      |  56 +++
 src/qemu/qemu_validate.h                      |   1 +
 src/util/virpci.c                             |  17 +
 src/util/virpci.h                             |   4 +
 tests/qemuhotplugtest.c                       |  66 ++-
 ...emuhotplug-multifunction-hostdev-pci-2.xml |  14 +
 ...plug-multifunction-hostdev-pci-partial.xml |  27 ++
 .../qemuhotplug-multifunction-hostdev-pci.xml |  26 ++
 ...live+multifunction-hostdev-pci-partial.xml |  82 ++++
 ...ug-base-live+multifunction-hostdev-pci.xml |  82 ++++
 ...-base-live+multifunction-hostdev-pci-2.xml |  59 +++
 ...es-base-live+multifunction-hostdev-pci.xml |  69 +++
 .../hostdev-pci-address-unassigned.args       |   9 +-
 .../hostdev-pci-multifunction.args            |  18 +-
 .../hostdev-pci-multifunction.xml             |   8 +-
 .../hostdev-pci-no-primary-function.xml       |  23 +
 .../hostdev-pci-validate.args                 |  30 ++
 .../qemuxml2argvdata/hostdev-pci-validate.xml |  29 ++
 .../qemuxml2argvdata/pseries-hostdevs-1.args  |   5 +-
 .../qemuxml2argvdata/pseries-hostdevs-3.args  |   5 +-
 tests/qemuxml2argvtest.c                      |  14 +-
 .../hostdev-pci-address-unassigned.xml        |   8 +-
 .../hostdev-pci-multifunction.xml             |  24 +-
 .../qemuxml2xmloutdata/pseries-hostdevs-1.xml |   4 +-
 .../qemuxml2xmloutdata/pseries-hostdevs-3.xml |   4 +-
 tests/virpcitestdata/0005-90-01.1.config      | Bin 256 -> 256 bytes
 tests/virpcitestdata/0005-90-01.2.config      | Bin 256 -> 256 bytes
 tests/virpcitestdata/0005-90-01.3.config      | Bin 0 -> 256 bytes
 43 files changed, 2022 insertions(+), 257 deletions(-)
 create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci-2.xml
 create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci-partial.xml
 create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-multifunction-hostdev-pci.xml
 create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+multifunction-hostdev-pci-partial.xml
 create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+multifunction-hostdev-pci.xml
 create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live+multifunction-hostdev-pci-2.xml
 create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-pseries-base-live+multifunction-hostdev-pci.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-no-primary-function.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-validate.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-pci-validate.xml
 create mode 100644 tests/virpcitestdata/0005-90-01.3.config

-- 
2.26.2