From: Matthew Rosato <mjrosato@linux.ibm.com> To: cohuck@redhat.com, thuth@redhat.com Cc: pmorel@linux.ibm.com, schnelle@linux.ibm.com, rth@twiddle.net, david@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, mst@redhat.com, pbonzini@redhat.com, alex.williamson@redhat.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [PATCH v3 00/10] Retrieve zPCI hardware information from VFIO Date: Wed, 7 Oct 2020 15:04:05 -0400 [thread overview] Message-ID: <1602097455-15658-1-git-send-email-mjrosato@linux.ibm.com> (raw) 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.h -- 1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Rosato <mjrosato@linux.ibm.com> To: cohuck@redhat.com, thuth@redhat.com Cc: kvm@vger.kernel.org, pmorel@linux.ibm.com, david@redhat.com, schnelle@linux.ibm.com, qemu-s390x@nongnu.org, qemu-devel@nongnu.org, pasic@linux.ibm.com, borntraeger@de.ibm.com, alex.williamson@redhat.com, mst@redhat.com, pbonzini@redhat.com, rth@twiddle.net Subject: [PATCH v3 00/10] Retrieve zPCI hardware information from VFIO Date: Wed, 7 Oct 2020 15:04:05 -0400 [thread overview] Message-ID: <1602097455-15658-1-git-send-email-mjrosato@linux.ibm.com> (raw) 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.h -- 1.8.3.1
next reply other threads:[~2020-10-07 19:04 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-07 19:04 Matthew Rosato [this message] 2020-10-07 19:04 ` [PATCH v3 00/10] Retrieve zPCI hardware information from VFIO Matthew Rosato 2020-10-07 19:04 ` [PATCH v3 01/10] s390x/pci: Move header files to include/hw/s390x Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 9:50 ` Cornelia Huck 2020-10-09 9:50 ` Cornelia Huck 2020-10-07 19:04 ` [PATCH v3 02/10] vfio: Create shared routine for scanning info capabilities Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-07 19:04 ` [PATCH v3 03/10] update-linux-headers: Add vfio_zdev.h Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-07 19:04 ` [PATCH v3 04/10] linux-headers: update against 5.9-rc8 Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-07 19:04 ` [PATCH v3 05/10] s390x/pci: create a header dedicated to PCI CLP Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-07 19:04 ` [PATCH v3 06/10] s390x/pci: use a PCI Group structure Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 10:53 ` Cornelia Huck 2020-10-09 10:53 ` Cornelia Huck 2020-10-07 19:04 ` [PATCH v3 07/10] s390x/pci: clean up s390 PCI groups Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 10:54 ` Cornelia Huck 2020-10-09 10:54 ` Cornelia Huck 2020-10-07 19:04 ` [PATCH v3 08/10] s390x/pci: use a PCI Function structure Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 10:56 ` Cornelia Huck 2020-10-09 10:56 ` Cornelia Huck 2020-10-07 19:04 ` [PATCH v3 09/10] vfio: Add routine for finding VFIO_DEVICE_GET_INFO capabilities Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 9:53 ` Cornelia Huck 2020-10-09 9:53 ` Cornelia Huck 2020-10-07 19:04 ` [PATCH v3 10/10] s390x/pci: get zPCI function info from host Matthew Rosato 2020-10-07 19:04 ` Matthew Rosato 2020-10-09 15:48 ` Cornelia Huck 2020-10-09 15:48 ` Cornelia Huck 2020-10-09 16:10 ` Matthew Rosato 2020-10-09 16:10 ` Matthew Rosato
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1602097455-15658-1-git-send-email-mjrosato@linux.ibm.com \ --to=mjrosato@linux.ibm.com \ --cc=alex.williamson@redhat.com \ --cc=borntraeger@de.ibm.com \ --cc=cohuck@redhat.com \ --cc=david@redhat.com \ --cc=kvm@vger.kernel.org \ --cc=mst@redhat.com \ --cc=pasic@linux.ibm.com \ --cc=pbonzini@redhat.com \ --cc=pmorel@linux.ibm.com \ --cc=qemu-devel@nongnu.org \ --cc=qemu-s390x@nongnu.org \ --cc=rth@twiddle.net \ --cc=schnelle@linux.ibm.com \ --cc=thuth@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.