Changelog v3->v4 - Unfortunately I had to remove some Review tags because the userspace API moved from vfio device feature ioctls to KVM ioctls in response to feedback from the kernel series. The vast majority of the QEMU logic remains intact however, with most changes being to the way we issue ioctls. - Additional logic was added to test for availability of the KVM ioctl, this replaces the probe logic done for the vfio ioctls - Add code to issue indicate on VFIO_SET_IOMMU that a KVM-managed IOMMU domain is to be allocated. Matthew Rosato (11): Update linux headers vfio: handle KVM-owned IOMMU requests target/s390x: add zpci-interp to cpu models s390x/pci: add routine to get host function handle from CLP info 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 KVM-managed IOMMU for interpretation 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/meson.build | 1 + hw/s390x/s390-pci-bus.c | 125 ++++++++++++++++++++-- hw/s390x/s390-pci-inst.c | 136 +++++++++++++++++++++-- hw/s390x/s390-pci-kvm.c | 160 ++++++++++++++++++++++++++++ hw/s390x/s390-pci-vfio.c | 151 ++++++++++++++++++++++---- hw/s390x/s390-virtio-ccw.c | 1 + hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/common.c | 26 ++++- hw/vfio/pci.c | 3 +- hw/vfio/pci.h | 1 + hw/vfio/platform.c | 2 +- include/hw/s390x/s390-pci-bus.h | 8 +- include/hw/s390x/s390-pci-inst.h | 2 +- include/hw/s390x/s390-pci-kvm.h | 68 ++++++++++++ include/hw/s390x/s390-pci-vfio.h | 11 ++ include/hw/vfio/vfio-common.h | 4 +- linux-headers/asm-s390/kvm.h | 1 + linux-headers/asm-x86/kvm.h | 3 + linux-headers/linux/kvm.h | 51 ++++++++- linux-headers/linux/vfio.h | 6 ++ linux-headers/linux/vfio_zdev.h | 6 ++ target/s390x/cpu_features_def.h.inc | 1 + target/s390x/gen-features.c | 2 + target/s390x/kvm/kvm.c | 8 ++ target/s390x/kvm/kvm_s390x.h | 1 + 26 files changed, 731 insertions(+), 51 deletions(-) create mode 100644 hw/s390x/s390-pci-kvm.c create mode 100644 include/hw/s390x/s390-pci-kvm.h -- 2.27.0