Retrieve zPCI hardware information from VFIO
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest10 patches 7 repliesIn review
- v29 patches 10 repliesSuperseded
- v17 patches 5 repliesSuperseded
Changes in v3 from the cover letter
- Added ACKs/RBs (thanks!)
- Squashed the first 2 patches, and tried again using by formatting the set with --find-renames / diff.renames. (Thanks Richard and Paolo!) As before, this first patch can be applied separately but is included here for the sake of simplicity.
- Copied patch 'vfio: Create shared routine for scanning info capabilities' from the 'Accomodate vfio DMA limiting' set, as it's now needed here too. We can drop it from this set later once the former is applied.
- Refresh the linux-header placeholder. Manually omit the qatomic->atomic pvrdma revert for now.
- New patch to add a helper function for finding VFIO_DEVICE_GET_INFO capabilities. Depends on 'vfio: Create shared routine for scanning info capabilities'
- re-write the last patch to use VFIO_DEVICE_GET_INFO capabilities instead of a vfio device region
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | s390x/pci: Move header files to include/hw/s390xMAINTAINERS hw/ hw/ +3 more | +6 | 1 reply | |
| 2/10 | vfio: Create shared routine for scanning info capabilitieshw/ | +13 | 0 replies | |
| 3/10 | update-linux-headers: Add vfio_zdev.hscripts/ | +1 | 0 replies | |
| 4/10 | linux-headers: update against 5.9-rc8linux-headers/ linux-headers/ linux-headers/ | +93 | 0 replies | |
| 5/10 | s390x/pci: create a header dedicated to PCI CLPinclude/ include/ include/ | +212 | 0 replies | |
| 6/10 | s390x/pci: use a PCI Group structurehw/ hw/ include/ | +66 | 1 reply | |
| 7/10 | s390x/pci: clean up s390 PCI groupshw/ | +12 | 1 reply | |
| 8/10 | s390x/pci: use a PCI Function structurehw/ hw/ include/ | +20 | 1 reply | |
| 9/10 | vfio: Add routine for finding VFIO_DEVICE_GET_INFO capabilitieshw/ include/ | +12 | 1 reply | |
| 10/10 | s390x/pci: get zPCI function info from hosthw/ hw/ hw/ +3 more | +233 | 2 replies |
Reviews trailers per patch
8 of 10 patches have a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé | Cornelia Huck |
|---|---|---|
| 1/10 | R-b | |
| 2/10 | R-b | R-b |
| 3/10 | A-b | |
| 4/10 | ||
| 5/10 | R-b | |
| 6/10 | R-b | |
| 7/10 | R-b | |
| 8/10 | R-b | |
| 9/10 | R-b | |
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/10] Retrieve zPCI hardware information from VFIO
This patchset adds code to s390 pci to examine the VFIO_DEVICE_GET_INFO capability chain, looking for capabilities that describe the underlying hardware and features of the passed-through device.
The retrieval of this information is done once per function (and for a subset of data, once per function group) and is performed at time of device plug. Some elements provided via the capability chain must still be forced to default values for now to reflect what QEMU actually provides support for.
The original work for this feature was done by Pierre Morel.
Associated kernel patchset:
https://lkml.org/lkml/2020/10/7/813
Tested using a host kernel with/without the VFIO_DEVICE_GET_INFO changes and a QEMU with/without the VFIO_DEVICE_GET_INFO changes to validate VFIO_DEVICE_GET_INFO remains backwards-compatible.
Changes since v2:
- Added ACKs/RBs (thanks!)
- Squashed the first 2 patches, and tried again using by formatting the set with --find-renames / diff.renames. (Thanks Richard and Paolo!) As before, this first patch can be applied separately but is included here for the sake of simplicity.
- Copied patch 'vfio: Create shared routine for scanning info capabilities' from the 'Accomodate vfio DMA limiting' set, as it's now needed here too. We can drop it from this set later once the former is applied.
- Refresh the linux-header placeholder. Manually omit the qatomic->atomic pvrdma revert for now.
- New patch to add a helper function for finding VFIO_DEVICE_GET_INFO capabilities. Depends on 'vfio: Create shared routine for scanning info capabilities'
- re-write the last patch to use VFIO_DEVICE_GET_INFO capabilities instead of a vfio device region
Matthew Rosato (7):
s390x/pci: Move header files to include/hw/s390x
vfio: Create shared routine for scanning info capabilities
update-linux-headers: Add vfio_zdev.h
linux-headers: update against 5.9-rc8
s390x/pci: clean up s390 PCI groups
vfio: Add routine for finding VFIO_DEVICE_GET_INFO capabilities s390x/pci: get zPCI function info from host
Pierre Morel (3):
s390x/pci: create a header dedicated to PCI CLP
s390x/pci: use a PCI Group structure
s390x/pci: use a PCI Function structure
MAINTAINERS | 1 +
hw/s390x/meson.build | 1 +
hw/s390x/s390-pci-bus.c | 86 ++++++++-
hw/s390x/s390-pci-inst.c | 33 ++--
hw/s390x/s390-pci-vfio.c | 197 +++++++++++++++++++++
hw/s390x/s390-virtio-ccw.c | 2 +-
hw/vfio/common.c | 31 +++-
{hw => include/hw}/s390x/s390-pci-bus.h | 13 ++
.../hw/s390x/s390-pci-clp.h | 123 ++-----------
include/hw/s390x/s390-pci-inst.h | 116 ++++++++++++
include/hw/s390x/s390-pci-vfio.h | 19 ++
include/hw/vfio/vfio-common.h | 2 +
linux-headers/linux/kvm.h | 6 +-
linux-headers/linux/vfio.h | 11 ++
linux-headers/linux/vfio_zdev.h | 78 ++++++++
scripts/update-linux-headers.sh | 2 +-
16 files changed, 575 insertions(+), 146 deletions(-)
create mode 100644 hw/s390x/s390-pci-vfio.c
rename {hw => include/hw}/s390x/s390-pci-bus.h (96%)
rename hw/s390x/s390-pci-inst.h => include/hw/s390x/s390-pci-clp.h (59%)
create mode 100644 include/hw/s390x/s390-pci-inst.h
create mode 100644 include/hw/s390x/s390-pci-vfio.h
create mode 100644 linux-headers/linux/vfio_zdev.hSignature · 1 line
1.8.3.1