[PATCH libvirt v1 0/6] Fix ZPCI address auto-generation on s390

Shalini Chellathurai Saroja shalini at linux.ibm.com
Thu Apr 9 10:30:59 UTC 2020


The ZPCI address validation or autogeneration does not work as
expected in the following scenarios
1. uid = 0 and fid = 0
2. uid = 0 and fid > 0
3. uid = 0 and fid not specified
4. uid not specified and fid > 0
5. 2 ZPCI devices with uid > 0 and fid not specified.

This is because of the following reasons
1. If uid = 0 or fid = 0 the code assumes that user has not specified
   the corresponding address
2. If either uid or fid is provided, the code assumes that both uid
   and fid addresses are specified by the user.

This patch fixes these issues.

Shalini Chellathurai Saroja (6):
  conf: fix ZPCI address validation on s390
  tests: qemu: add tests for ZPCI on s390
  conf: fix ZPCI address auto-generation on s390
  qemu: move ZPCI uid validation into device validation
  tests: qemu: add more tests for ZPCI on S390
  tests: add test with PCI and CCW device

 src/conf/device_conf.c                        | 45 ++++++--------
 src/conf/domain_addr.c                        | 59 +++++++++++++------
 src/conf/domain_conf.c                        |  2 +-
 src/libvirt_private.syms                      |  4 +-
 src/qemu/qemu_validate.c                      | 26 +++++++-
 src/util/virpci.c                             | 23 ++------
 src/util/virpci.h                             |  6 +-
 .../hostdev-vfio-zpci-autogenerate-fids.args  | 31 ++++++++++
 .../hostdev-vfio-zpci-autogenerate-fids.xml   | 29 +++++++++
 .../hostdev-vfio-zpci-autogenerate-uids.args  | 31 ++++++++++
 .../hostdev-vfio-zpci-autogenerate-uids.xml   | 29 +++++++++
 .../hostdev-vfio-zpci-ccw-memballoon.args     | 28 +++++++++
 .../hostdev-vfio-zpci-ccw-memballoon.xml      | 17 ++++++
 .../hostdev-vfio-zpci-duplicate.xml           | 30 ++++++++++
 ...ostdev-vfio-zpci-invalid-uid-valid-fid.xml | 21 +++++++
 .../hostdev-vfio-zpci-multidomain-many.args   |  6 +-
 .../hostdev-vfio-zpci-set-zero.xml            | 21 +++++++
 .../hostdev-vfio-zpci-uid-set-zero.xml        | 20 +++++++
 tests/qemuxml2argvtest.c                      | 25 ++++++++
 .../hostdev-vfio-zpci-multidomain-many.xml    |  6 +-
 20 files changed, 387 insertions(+), 72 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-fids.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-autogenerate-uids.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.args
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-ccw-memballoon.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-duplicate.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-invalid-uid-valid-fid.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-set-zero.xml
 create mode 100644 tests/qemuxml2argvdata/hostdev-vfio-zpci-uid-set-zero.xml

-- 
2.21.1





More information about the libvir-list mailing list