For QEMU, the majority of the work in enabling instruction interpretation is handled via new VFIO ioctls to SET the appropriate interpretation and interrupt forwarding modes, and to GET the function handle to use for interpretive execution.
This series implements these new ioctls, as well as adding a new, optional 'interpret' parameter to zpci which can be used to disable interpretation support (interpret=off) as well as an 'forwarding_assist' parameter to determine whether or not the firmware assist will be used for interrupt delivery (default when interpretation is in use) or whether the host will be responsible for delivering all interrupts (forwarding_assist=off). The ZPCI_INTERP CPU feature is added beginning with the z14 model to enable this support. As a consequence of implementing zPCI interpretation, ISM devices now become eligible for passthrough (but only when zPCI interpretation is available). >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. Associated kernel series: https://lore.kernel.org/kvm/20220204211536.321475-1-mjros...@linux.ibm.com/ Changelog v2->v3: - Update kernel headers sync - Add some R-bs (Thanks!) - squash the fixup patch erroneously included in v2 - Re-word plug error message (Thomas) - Change zpci option from interp to interpret (Thomas) - Fix missing static inline (Pierre) - Change zpci option from intassist to forwarding_assist (Pierre) - Re-word s390_pci_get_aif comments and variables to better-explain what we are doing (Pierre) - Note: no docs/system/s390x/zpci.rst with this series but this is not forgotten -- creating as a follow-on (Thomas) Matthew Rosato (8): Update linux headers target/s390x: add zpci-interp to cpu models s390x/pci: enable for load/store intepretation s390x/pci: don't fence interpreted devices without MSI-X s390x/pci: enable adapter event notification for interpreted devices s390x/pci: use I/O Address Translation assist when interpreting s390x/pci: use dtsm provided from vfio capabilities for interpreted devices s390x/pci: let intercept devices have separate PCI groups hw/s390x/s390-pci-bus.c | 124 ++++++++++- hw/s390x/s390-pci-inst.c | 168 +++++++++++++- hw/s390x/s390-pci-vfio.c | 206 +++++++++++++++++- hw/s390x/s390-virtio-ccw.c | 1 + include/hw/s390x/s390-pci-bus.h | 8 +- include/hw/s390x/s390-pci-inst.h | 2 +- include/hw/s390x/s390-pci-vfio.h | 46 ++++ include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 + include/standard-headers/linux/ethtool.h | 1 + include/standard-headers/linux/fuse.h | 60 ++++- include/standard-headers/linux/pci_regs.h | 142 ++++++------ include/standard-headers/linux/virtio_iommu.h | 8 +- linux-headers/asm-generic/unistd.h | 5 +- linux-headers/asm-mips/unistd_n32.h | 2 + linux-headers/asm-mips/unistd_n64.h | 2 + linux-headers/asm-mips/unistd_o32.h | 2 + linux-headers/asm-powerpc/unistd_32.h | 2 + linux-headers/asm-powerpc/unistd_64.h | 2 + linux-headers/asm-s390/kvm.h | 1 + linux-headers/asm-s390/unistd_32.h | 2 + linux-headers/asm-s390/unistd_64.h | 2 + linux-headers/asm-x86/kvm.h | 19 +- linux-headers/asm-x86/unistd_32.h | 1 + linux-headers/asm-x86/unistd_64.h | 1 + linux-headers/asm-x86/unistd_x32.h | 1 + linux-headers/linux/kvm.h | 18 ++ linux-headers/linux/vfio.h | 22 ++ linux-headers/linux/vfio_zdev.h | 51 +++++ target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 2 + target/s390x/kvm/kvm.c | 1 + 32 files changed, 817 insertions(+), 98 deletions(-) -- 2.27.0