[PATCH linux-next] vfio: make vfio build and run on s390

2014-10-21 Thread Frank Blaschka
Introduce platform functions to let vfio announce if INTx is available and if PCI BARs are mapable. Also take care vfio_pci_vga_rw is building on platforms which do not support I/O ports. Signed-off-by: Frank Blaschka blasc...@linux.vnet.ibm.com --- arch/s390/include/asm/pci.h | 3

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-10-02 Thread Frank Blaschka
On Wed, Oct 01, 2014 at 11:26:51AM -0600, Alex Williamson wrote: On Wed, 2014-10-01 at 11:11 +0200, Frank Blaschka wrote: On Fri, Sep 26, 2014 at 01:59:40PM -0600, Alex Williamson wrote: On Fri, 2014-09-26 at 08:45 +0200, Frank Blaschka wrote: On Wed, Sep 24, 2014 at 10:05:57AM -0600

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-10-01 Thread Frank Blaschka
On Fri, Sep 26, 2014 at 01:59:40PM -0600, Alex Williamson wrote: On Fri, 2014-09-26 at 08:45 +0200, Frank Blaschka wrote: On Wed, Sep 24, 2014 at 10:05:57AM -0600, Alex Williamson wrote: On Wed, 2014-09-24 at 10:47 +0200, Frank Blaschka wrote: On Mon, Sep 22, 2014 at 02:47:31PM -0600

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-26 Thread Frank Blaschka
On Wed, Sep 24, 2014 at 10:05:57AM -0600, Alex Williamson wrote: On Wed, 2014-09-24 at 10:47 +0200, Frank Blaschka wrote: On Mon, Sep 22, 2014 at 02:47:31PM -0600, Alex Williamson wrote: On Fri, 2014-09-19 at 13:54 +0200, frank.blasc...@de.ibm.com wrote: This set of patches implements

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-24 Thread Frank Blaschka
On Mon, Sep 22, 2014 at 02:47:31PM -0600, Alex Williamson wrote: On Fri, 2014-09-19 at 13:54 +0200, frank.blasc...@de.ibm.com wrote: This set of patches implements a vfio based solution for pci pass-through on the s390 platform. The kernel stuff is pretty much straight forward, but qemu

Re: [Qemu-devel] [RFC patch 5/6] s390: implement pci instruction

2014-09-22 Thread Frank Blaschka
On Fri, Sep 19, 2014 at 05:12:15PM +0200, Thomas Huth wrote: Hi Frank, On Fri, 19 Sep 2014 13:54:34 +0200 frank.blasc...@de.ibm.com wrote: From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements the s390 pci instructions in qemu. This allows to attach qemu pci

[RFC patch 6/6] vfio: make vfio run on s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com Following changes are made because of platform differences: 1) s390 does not support mmap'ing of PCI BARs so we have to go via slow path 2) no intx support 3) no classic MSIX interrupts. The pci hw understands the concept of requesting MSIX irqs

[RFC patch 3/6] vfio: make vfio build on s390

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds some small changes to make vfio build on s390. Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- drivers/vfio/Kconfig |2 +- drivers/vfio/pci/vfio_pci_rdwr.c |8 2 files changed, 9 insertions

[RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-19 Thread frank . blaschka
This set of patches implements a vfio based solution for pci pass-through on the s390 platform. The kernel stuff is pretty much straight forward, but qemu needs more work. Most interesting patch is: vfio: make vfio run on s390 platform I hope Alex Alex can give me some guidance how to do the

[RFC patch 4/6] s390: Add PCI bus support

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements a pci bus for s390x together with some infrastructure to generate and handle hotplug events. It also provides device configuration/unconfiguration via sclp instruction interception. Signed-off-by: Frank Blaschka

[RFC patch 2/6] iommu: add iommu for s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. For this a domain could hold only one pci device. Also there is no relation

[RFC patch 1/6] KVM: s390: Enable PCI instructions

2014-09-19 Thread frank . blaschka
Enable PCI instructions for s390 KVM. Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1787,7 +1787,7 @@ static int __init kvm_s390_init

Re: [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-05 Thread Frank Blaschka
On Thu, Sep 04, 2014 at 07:16:24AM -0600, Alex Williamson wrote: On Thu, 2014-09-04 at 12:52 +0200, frank.blasc...@de.ibm.com wrote: This set of patches implements pci pass-through support for qemu/KVM on s390. PCI support on s390 is very different from other platforms. Major differences

Re: [RFC][patch 3/6] KVM: s390: Add GISA support

2014-09-05 Thread Frank Blaschka
On Fri, Sep 05, 2014 at 10:29:26AM +0200, Alexander Graf wrote: On 04.09.14 12:52, frank.blasc...@de.ibm.com wrote: From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds GISA (Guest Interrupt State Area) support to s390 kvm. GISA can be used for exitless interrupts

Re: [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-05 Thread Frank Blaschka
On Fri, Sep 05, 2014 at 10:21:27AM +0200, Alexander Graf wrote: On 04.09.14 12:52, frank.blasc...@de.ibm.com wrote: This set of patches implements pci pass-through support for qemu/KVM on s390. PCI support on s390 is very different from other platforms. Major differences are: 1)

Re: [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-05 Thread Frank Blaschka
On Fri, Sep 05, 2014 at 10:35:59AM +0200, Alexander Graf wrote: On 05.09.14 09:46, Frank Blaschka wrote: On Thu, Sep 04, 2014 at 07:16:24AM -0600, Alex Williamson wrote: On Thu, 2014-09-04 at 12:52 +0200, frank.blasc...@de.ibm.com wrote: This set of patches implements pci pass-through

[RFC][patch 3/6] KVM: s390: Add GISA support

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds GISA (Guest Interrupt State Area) support to s390 kvm. GISA can be used for exitless interrupts. The patch provides a set of functions for GISA related operations like accessing GISA fields or registering ISCs for alert. Exploiters

[RFC][patch 5/6] s390: Add PCI bus support

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implements a pci bus for s390x together with some infrastructure to generate and handle hotplug events. It also provides device configuration/unconfiguration via sclp instruction interception. Signed-off-by: Frank Blaschka

[RFC][patch 4/6] KVM: s390: Add PCI pass-through support

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch implemets PCI pass-through kernel support for s390. Design approach is very similar to the x86 device assignment. User space executes the KVM_ASSIGN_PCI_DEVICE ioctl to create a proxy instance in the kernel KVM and connect this instance

[RFC][patch 2/6] s390: pci: export pci functions for pass-through usage

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch exports a couple of zPCI functions. The new pci pass-through driver for KVM will use this functions to enable the device with virtualization information and update the device dma translation table on the host. We add a new interface

[RFC][patch 6/6] s390: Add PCI pass-through device support

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch adds a new device class handling s390 pci pass-through device assignment. The approach is very similar to the x86 device assignment. The device executes the KVM_ASSIGN_PCI_DEVICE ioctl to create a proxy instance in the kernel KVM

[RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-04 Thread frank . blaschka
This set of patches implements pci pass-through support for qemu/KVM on s390. PCI support on s390 is very different from other platforms. Major differences are: 1) all PCI operations are driven by special s390 instructions 2) all s390 PCI instructions are privileged 3) PCI config and memory

[RFC][patch 1/6] s390: cio: chsc function to register GIB

2014-09-04 Thread frank . blaschka
From: Frank Blaschka frank.blasc...@de.ibm.com This patch provides a new chsc function to register/unregister a GIB (Guest Information Block). Signed-off-by: Frank Blaschka frank.blasc...@de.ibm.com --- arch/s390/include/asm/cio.h |1 drivers/s390/cio/chsc.c | 50