KVM: s390: enable zPCI for interpretive execution
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest21 patches 21 repliesIn review
- v822 patches 5 repliesSuperseded
- v722 patches 16 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 21 patches | 16 replies | Superseded | |
| v5 | 21 patches | 31 replies | Superseded | |
| v4 | 32 patches | 33 replies | Superseded | |
| v3 | 30 patches | 31 replies | Superseded | |
| v2 | 30 patches | 66 replies | Superseded | |
| v1 | 32 patches | 83 replies | Superseded |
Changes in v9 from the cover letter
- Rebase on top of 5.19-rc1, adjust ioctl and capability defines
- s/kzdev = 0/kzdev = NULL/ (Alex)
- rename vfio_pci_zdev_open to vfio_pci_zdev_open_device (Jason)
- rename vfio_pci_zdev_release to vfio_pci_zdev_close_device (Jason)
- make vfio_pci_zdev_close_device return void, instead WARN_ON or ignore errors in lower level function (kvm_s390_pci_unregister_kvm) (Jason)
- remove notifier accidentally left in struct zpci_dev + associated include statment (Jason)
- Remove patch 'KVM: s390: introduce CPU feature for zPCI Interpretation' based on discussion in QEMU thread.
Patches in v9 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | s390/sclp: detect the zPCI load/store interpretation facilityarch/ drivers/ | +2 | 0 replies | |
| 2/21 | s390/sclp: detect the AISII facilityarch/ drivers/ | +2 | 0 replies | |
| 3/21 | s390/sclp: detect the AENI facilityarch/ drivers/ | +2 | 0 replies | |
| 4/21 | s390/sclp: detect the AISI facilityarch/ drivers/ | +2 | 0 replies | |
| 5/21 | s390/airq: pass more TPI info to airq handlersarch/ arch/ arch/ +4 more | +26 | 0 replies | |
| 6/21 | s390/airq: allow for airq structure that uses an input vectorarch/ arch/ drivers/ +1 more | +15 | 0 replies | |
| 7/21 | s390/pci: externalize the SIC operation controls and routinearch/ arch/ arch/ | +23 | 0 replies | |
| 8/21 | s390/pci: stash associated GISA designationarch/ arch/ arch/ +2 more | +19 | 0 replies | |
| 9/21 | s390/pci: stash dtsm and maxstblarch/ arch/ arch/ | +8 | 0 replies | |
| 10/21 | vfio/pci: introduce CONFIG_VFIO_PCI_ZDEV_KVMdrivers/ drivers/ include/ | +13 | 5 replies | |
| 11/21 | KVM: s390: pci: add basic kvm_zdev structurearch/ arch/ arch/ +1 more | +61 | 0 replies | |
| 12/21 | KVM: s390: pci: do initial setup for AEN interpretationarch/ arch/ arch/ +4 more | +256 | 0 replies | |
| 13/21 | KVM: s390: pci: enable host forwarding of Adapter Event Notificationsarch/ arch/ arch/ +2 more | +103 | 0 replies | |
| 14/21 | KVM: s390: mechanism to enable guest zPCI Interpretationarch/ arch/ arch/ | +52 | 0 replies | |
| 15/21 | KVM: s390: pci: provide routines for enabling/disabling interrupt forwardingarch/ arch/ arch/ +1 more | +251 | 0 replies | |
| 16/21 | KVM: s390: pci: add routines to start/stop interpretive executionarch/ arch/ arch/ +3 more | +205 | 2 replies | |
| 17/21 | vfio-pci/zdev: add open/close device hooksdrivers/ drivers/ include/ | +43 | 2 replies | |
| 18/21 | vfio-pci/zdev: add function handle to clp base capabilitydrivers/ include/ | +6 | 1 reply | |
| 19/21 | vfio-pci/zdev: different maxstbl for interpreted devicesdrivers/ include/ | +8 | 1 reply | |
| 20/21 | KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devicesDocumentation/ arch/ arch/ +2 more | +181 | 2 replies | |
| 21/21 | MAINTAINERS: additional files related kvm s390 pci passthroughMAINTAINERS | +1 | 1 reply |
Reviews trailers per patch
All 21 patches have a Reviewed-by or Acked-by.
| Patch | Eric Farman | Christian Borntraeger | Claudio Imbrenda | Thomas Huth | Pierre Morel | Cornelia Huck | Niklas Schnelle | Alex Williamson |
|---|---|---|---|---|---|---|---|---|
| 1/21 | R-b | R-b | R-b | |||||
| 2/21 | R-b | R-b | R-b | |||||
| 3/21 | R-b | R-b | R-b | |||||
| 4/21 | R-b | R-b | R-b | |||||
| 5/21 | R-b | A-b | R-b | R-b | R-b | A-b | ||
| 6/21 | R-b | R-b | R-b | A-b | ||||
| 7/21 | R-b | R-b | R-b | |||||
| 8/21 | R-b | R-b | R-b | |||||
| 9/21 | R-b | R-b | R-b | |||||
| 10/21 | R-b | A-b | ||||||
| 11/21 | R-b | R-b | R-b | |||||
| 12/21 | R-b | |||||||
| 13/21 | R-b | R-b | ||||||
| 14/21 | R-b | R-b | ||||||
| 15/21 | R-b | A-b | ||||||
| 16/21 | A-b | |||||||
| 17/21 | R-b | A-b | ||||||
| 18/21 | R-b | R-b | A-b | |||||
| 19/21 | R-b | A-b | ||||||
| 20/21 | R-b | A-b | ||||||
| 21/21 | A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.
Cover letter [PATCH v9 00/21] KVM: s390: enable zPCI for interpretive execution
Enable interpretive execution of zPCI instructions + adapter interruption forwarding for s390x KVM vfio-pci. This is done by triggering a routine when the VFIO group is associated with the KVM guest, transmitting to firmware a special token (GISA designation) to enable that specific guest for interpretive execution on that zPCI device. Load/store interpreation enablement is then controlled by userspace (based upon whether or not a SHM bit is placed in the virtual function handle). Adapter Event Notification interpretation is controlled from userspace via a new KVM ioctl.
By allowing intepretation of zPCI instructions and firmware delivery of interrupts to guests, we can reduce the frequency of guest SIE exits for zPCI.
From the perspective of guest configuration, you passthrough zPCI devices in the same manner as before, with intepretation support being used by default if available in kernel+qemu.
Will follow up with a link the most recent QEMU series.
Changelog v8->v9:
- Rebase on top of 5.19-rc1, adjust ioctl and capability defines
- s/kzdev = 0/kzdev = NULL/ (Alex)
- rename vfio_pci_zdev_open to vfio_pci_zdev_open_device (Jason)
- rename vfio_pci_zdev_release to vfio_pci_zdev_close_device (Jason)
- make vfio_pci_zdev_close_device return void, instead WARN_ON or ignore errors in lower level function (kvm_s390_pci_unregister_kvm) (Jason)
- remove notifier accidentally left in struct zpci_dev + associated include statment (Jason)
- Remove patch 'KVM: s390: introduce CPU feature for zPCI Interpretation' based on discussion in QEMU thread.
Matthew Rosato (21):
s390/sclp: detect the zPCI load/store interpretation facility s390/sclp: detect the AISII facility
s390/sclp: detect the AENI facility
s390/sclp: detect the AISI facility
s390/airq: pass more TPI info to airq handlers
s390/airq: allow for airq structure that uses an input vector s390/pci: externalize the SIC operation controls and routine s390/pci: stash associated GISA designation
s390/pci: stash dtsm and maxstbl
vfio/pci: introduce CONFIG_VFIO_PCI_ZDEV_KVM
KVM: s390: pci: add basic kvm_zdev structure
KVM: s390: pci: do initial setup for AEN interpretation
KVM: s390: pci: enable host forwarding of Adapter Event Notifications
KVM: s390: mechanism to enable guest zPCI Interpretation
KVM: s390: pci: provide routines for enabling/disabling interrupt
forwarding
KVM: s390: pci: add routines to start/stop interpretive execution vfio-pci/zdev: add open/close device hooks
vfio-pci/zdev: add function handle to clp base capability vfio-pci/zdev: different maxstbl for interpreted devices
KVM: s390: add KVM_S390_ZPCI_OP to manage guest zPCI devices
MAINTAINERS: additional files related kvm s390 pci passthrough
Documentation/virt/kvm/api.rst | 47 +++ MAINTAINERS | 1 + arch/s390/include/asm/airq.h | 7 +- arch/s390/include/asm/kvm_host.h | 23 ++ arch/s390/include/asm/pci.h | 11 + arch/s390/include/asm/pci_clp.h | 9 +- arch/s390/include/asm/pci_insn.h | 29 +- arch/s390/include/asm/sclp.h | 4 + arch/s390/include/asm/tpi.h | 13 + arch/s390/kvm/Makefile | 1 + arch/s390/kvm/interrupt.c | 96 ++++- arch/s390/kvm/kvm-s390.c | 83 +++- arch/s390/kvm/kvm-s390.h | 10 + arch/s390/kvm/pci.c | 690 +++++++++++++++++++++++++++++++ arch/s390/kvm/pci.h | 88 ++++ arch/s390/pci/pci.c | 16 + arch/s390/pci/pci_clp.c | 7 + arch/s390/pci/pci_insn.c | 4 +- arch/s390/pci/pci_irq.c | 48 ++- drivers/s390/char/sclp_early.c | 4 + drivers/s390/cio/airq.c | 12 +- drivers/s390/cio/qdio_thinint.c | 6 +- drivers/s390/crypto/ap_bus.c | 9 +- drivers/s390/virtio/virtio_ccw.c | 6 +- drivers/vfio/pci/Kconfig | 11 + drivers/vfio/pci/Makefile | 2 +- drivers/vfio/pci/vfio_pci_core.c | 10 +- drivers/vfio/pci/vfio_pci_zdev.c | 35 +- include/linux/sched/user.h | 3 +- include/linux/vfio_pci_core.h | 12 +- include/uapi/linux/kvm.h | 31 ++ include/uapi/linux/vfio_zdev.h | 7 + 32 files changed, 1279 insertions(+), 56 deletions(-) create mode 100644 arch/s390/kvm/pci.c create mode 100644 arch/s390/kvm/pci.h
Signature · 1 line
2.27.0