Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-17 Thread Frank Blaschka
On Tue, Mar 17, 2015 at 08:11:14AM +0100, Alexander Graf wrote: > > > On 12.03.15 16:22, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 09:59:59AM -0500, Alexander Graf wrote: > >> > >> > >> On 12.03.15 08:16, Frank Blaschka wrote: > >&g

Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-12 Thread Frank Blaschka
On Thu, Mar 12, 2015 at 11:50:02AM +0100, Frank Blaschka wrote: > On Thu, Mar 12, 2015 at 11:03:50AM +0100, Michael S. Tsirkin wrote: > > On Thu, Mar 12, 2015 at 10:54:24AM +0100, Frank Blaschka wrote: > > > On Wed, Mar 11, 2015 at 06:42:34PM +0100, Michael S. Tsirkin wrote: >

Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-12 Thread Frank Blaschka
On Thu, Mar 12, 2015 at 11:03:50AM +0100, Michael S. Tsirkin wrote: > On Thu, Mar 12, 2015 at 10:54:24AM +0100, Frank Blaschka wrote: > > On Wed, Mar 11, 2015 at 06:42:34PM +0100, Michael S. Tsirkin wrote: > > > On Wed, Mar 11, 2015 at 03:38:44PM +0100, Frank Blaschka wrote: >

Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-12 Thread Frank Blaschka
On Wed, Mar 11, 2015 at 06:42:34PM +0100, Michael S. Tsirkin wrote: > On Wed, Mar 11, 2015 at 03:38:44PM +0100, Frank Blaschka wrote: > > On Tue, Mar 10, 2015 at 03:26:23PM +0100, Michael S. Tsirkin wrote: > > > On Tue, Mar 10, 2015 at 02:03:34PM +0100, Frank Blaschka wrote:

Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-12 Thread Frank Blaschka
On Wed, Mar 11, 2015 at 03:57:05PM +0100, Michael S. Tsirkin wrote: > On Wed, Mar 11, 2015 at 03:38:44PM +0100, Frank Blaschka wrote: > > I like Alex's idea because: > > 1) It reflects pretty well the actual nature of the pci system in real s390 > > hw > > why d

Re: [Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-11 Thread Frank Blaschka
On Tue, Mar 10, 2015 at 03:26:23PM +0100, Michael S. Tsirkin wrote: > On Tue, Mar 10, 2015 at 02:03:34PM +0100, Frank Blaschka wrote: > > This patch changes the modeling of the s390 qemu pci infrastructure to > > better match the actual pci architecture defined by the real hardware.

[Qemu-devel] [PATCH 2/2 RFC] s390x/pci: rework pci infrastructure modeling

2015-03-10 Thread Frank Blaschka
unique for the qemu instance. The design allows to define (static and hotplug) multiple host bridges and support a large number of pci devices. Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-bus.c| 174 ++--- hw/s390x/s390-pci-bus.h| 24 ++- hw

[Qemu-devel] [PATCH 1/2 RFC] pci: detangle Sysbus PCI bridge from PCIBus

2015-03-10 Thread Frank Blaschka
This patch detangle Sysbus PCI bridge from PCIBus. The pci host bridge is derived from sysbus device and therefore it is not possible to hotplug a host bridge. This change makes it possible to develop hotplugable devices creating a pci bus on the fly. Signed-off-by: Frank Blaschka --- hw/pci

[Qemu-devel] [PATCH 0/2 RFC] Extend s390 pci representation in qemu V2

2015-03-10 Thread Frank Blaschka
ity provided by firmware layer) to the host bridge. 2) restrict pci bus of the bridge to just one slot 3) make a s390 host bridge hot plugable Frank Blaschka (2): pci: detangle Sysbus PCI bridge from PCIBus s390x/pci: rework pci infrastructure modeling hw/pci/pci.c | 24 ++

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-06 Thread Frank Blaschka
On Wed, Mar 04, 2015 at 04:58:25PM +0100, Frank Blaschka wrote: > On Wed, Mar 04, 2015 at 04:25:07PM +0100, Alexander Graf wrote: > > > > > > On 04.03.15 16:07, Frank Blaschka wrote: > > > On Wed, Mar 04, 2015 at 03:49:15PM +0100, Alexander Graf wrote: > >

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-04 Thread Frank Blaschka
On Wed, Mar 04, 2015 at 04:25:07PM +0100, Alexander Graf wrote: > > > On 04.03.15 16:07, Frank Blaschka wrote: > > On Wed, Mar 04, 2015 at 03:49:15PM +0100, Alexander Graf wrote: > >> > >> > >> On 04.03.15 14:44, Frank Blaschka wrote: > >>&g

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-04 Thread Frank Blaschka
On Wed, Mar 04, 2015 at 03:49:15PM +0100, Alexander Graf wrote: > > > On 04.03.15 14:44, Frank Blaschka wrote: > > On Tue, Mar 03, 2015 at 09:38:37PM +0100, Alexander Graf wrote: > >> > >> > >> On 03.03.15 14:25, Frank Blaschka wrote: > >>&g

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-04 Thread Frank Blaschka
On Tue, Mar 03, 2015 at 09:38:37PM +0100, Alexander Graf wrote: > > > On 03.03.15 14:25, Frank Blaschka wrote: > > On Tue, Mar 03, 2015 at 10:33:05AM +0100, Alexander Graf wrote: > >> > >> > >> > >>> Am 03.03.2015 um 09:06 schrieb Frank Bla

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-03 Thread Frank Blaschka
On Tue, Mar 03, 2015 at 10:33:05AM +0100, Alexander Graf wrote: > > > > > Am 03.03.2015 um 09:06 schrieb Frank Blaschka : > > > >> On Thu, Feb 26, 2015 at 04:34:06PM +0100, Alexander Graf wrote: > >> > >> > >>> On 26.02.15 16:27

Re: [Qemu-devel] [PATCH RFC 1/1] s390x/pci: Extend pci representation by new zpci device

2015-03-03 Thread Frank Blaschka
On Thu, Feb 26, 2015 at 04:34:06PM +0100, Alexander Graf wrote: > > > On 26.02.15 16:27, Frank Blaschka wrote: > > On Thu, Feb 26, 2015 at 03:39:15PM +0100, Alexander Graf wrote: > >> > >> > >> On 26.02.15 12:59, Frank Blaschka wrote: > >>>

[Qemu-devel] [PATCH RFC 0/1] Extend s390 pci representation in qemu

2015-02-26 Thread Frank Blaschka
zPCI device. Frank Blaschka (1): s390x/pci: Extend pci representation by new zpci device hw/s390x/s390-pci-bus.c| 253 - hw/s390x/s390-pci-bus.h| 38 ++- hw/s390x/s390-pci-inst.c | 2 +- hw/s390x/s390-virtio-ccw.c | 8 +- 4 files

[Qemu-devel] [PATCH V2] s390x/pci: avoid sign extension in stpcifc

2015-01-21 Thread Frank Blaschka
this patch avoids sign extension and fixes a data conversion bug in stpcifc. Both issues where found by Coverity. Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-inst.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci

[Qemu-devel] [PATCH] s390x/pci: avoid sign extension in stpcifc

2015-01-21 Thread Frank Blaschka
this patch avoids sign extension and fixes a data conversion bug in stpcifc. Both issues where found by Coverity. Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-inst.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci

Re: [Qemu-devel] [PATCH 2/3 V3] s390: implement pci instructions

2015-01-20 Thread Frank Blaschka
On Tue, Jan 20, 2015 at 01:56:09PM +0100, Markus Armbruster wrote: > Markus Armbruster writes: > > > Cornelia Huck writes: > > > >> On Tue, 20 Jan 2015 10:45:41 +0100 > >> Markus Armbruster wrote: > >> > >>> This patch makes Coverity unhappy: > >>> > >>> *** CID 1264326: Unintended sign exten

[Qemu-devel] [PATCH] s390x/pci: fix 2 bugs found by coverity

2015-01-14 Thread Frank Blaschka
Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-bus.c | 1 + hw/s390x/s390-pci-inst.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 1201b8d..546dcf1 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci

[Qemu-devel] [PATCH 2/3 V3] s390: implement pci instructions

2015-01-09 Thread Frank Blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported. Also a device has to support MSI/MSI-X to run on s390. Signed-off-by

[Qemu-devel] [PATCH 3/3 V3] kvm: extend kvm_irqchip_add_msi_route to work on s390

2015-01-09 Thread Frank Blaschka
From: Frank Blaschka on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture function to fixup the routing

[Qemu-devel] [PATCH 1/3 V3] s390: Add PCI bus support

2015-01-09 Thread Frank Blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing. Signed-off-by: Frank

[Qemu-devel] [PATCH 0/3 V3] add PCI support for the s390 platform

2015-01-09 Thread Frank Blaschka
, Frank Frank Blaschka (3): s390: Add PCI bus support s390: implement pci instructions kvm: extend kvm_irqchip_add_msi_route to work on s390 MAINTAINERS | 2 + default-configs/s390x-softmmu.mak | 1 + hw/s390x/Makefile.objs| 1 + hw/s390x/css.c

Re: [Qemu-devel] [PULL v2 0/7] s390x patches for 2.3

2015-01-07 Thread Frank Blaschka
On Wed, Jan 07, 2015 at 04:08:13PM +0100, Cornelia Huck wrote: > On Sat, 20 Dec 2014 22:03:34 + > Peter Maydell wrote: > > > On 18 December 2014 at 16:34, Cornelia Huck > > wrote: > > > Next try for s390x updates. The previous build failures should be > > > fixed now. > > > > Still not bui

[Qemu-devel] [PATCH 3/3 V2] kvm: extend kvm_irqchip_add_msi_route to work on s390

2014-12-18 Thread Frank Blaschka
From: Frank Blaschka on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture function to fixup the routing

[Qemu-devel] [PATCH 2/3 V2] s390: implement pci instructions

2014-12-18 Thread Frank Blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported. Also a device has to support MSI/MSI-X to run on s390. Signed-off-by

[Qemu-devel] [PATCH 1/3 V2] s390: Add PCI bus support

2014-12-18 Thread Frank Blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing. Signed-off-by: Frank

[Qemu-devel] [PATCH 0/3 V2] add PCI support for the s390 platform

2014-12-18 Thread Frank Blaschka
and code cleanup fixed build on 32-bit and non Linux added pci to maintainer file Please consider for integration into 2.3 Thanks, Frank Frank Blaschka (3): s390: Add PCI bus support s390: implement pci instructions kvm: extend kvm_irqchip_add_msi_route to work on s390 MAINTAINERS

Re: [Qemu-devel] [PATCH] s390/pci: fix build on 32-bit and non linux

2014-12-16 Thread Frank Blaschka
On Tue, Dec 16, 2014 at 12:56:58PM +0100, Alexander Graf wrote: > > > On 16.12.14 12:46, Frank Blaschka wrote: > > On Tue, Dec 16, 2014 at 11:35:19AM +0100, Alexander Graf wrote: > >> > >> > >> > >>> Am 16.12.2014 um 10:28 schrieb Fr

Re: [Qemu-devel] [PATCH] s390/pci: fix build on 32-bit and non linux

2014-12-16 Thread Frank Blaschka
On Tue, Dec 16, 2014 at 11:35:19AM +0100, Alexander Graf wrote: > > > > > Am 16.12.2014 um 10:28 schrieb Frank Blaschka : > > > > From: Frank Blaschka > > > > Remove unnecessary and wrong includes. Fix get_rt_sto and > > get_st_pto to build on 3

[Qemu-devel] [PATCH] s390/pci: fix build on 32-bit and non linux

2014-12-16 Thread Frank Blaschka
From: Frank Blaschka Remove unnecessary and wrong includes. Fix get_rt_sto and get_st_pto to build on 32-bit. Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-bus.c | 25 +++-- hw/s390x/s390-pci-inst.c | 30 +++--- 2 files changed, 14 insertions

[Qemu-devel] [PATCH] s390/pci: remove unnecessary cpu_synchronize_state

2014-12-08 Thread Frank Blaschka
Remove all unnecessary calls to cpu_synchronize_state Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-inst.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index f503665..83ab60f 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw

Re: [Qemu-devel] [PATCH 2/2] s390/pci: implement stpcifc instruction

2014-12-08 Thread Frank Blaschka
On Fri, Dec 05, 2014 at 02:15:07PM +0100, Thomas Huth wrote: > > Hi Frank, > > On Fri, 5 Dec 2014 10:19:59 +0100 > Frank Blaschka wrote: > > > From: Frank Blaschka > > > > This patch implements the last remaining s390 pci instruction > &g

[Qemu-devel] [PATCH 2/2] s390/pci: implement stpcifc instruction

2014-12-05 Thread Frank Blaschka
From: Frank Blaschka This patch implements the last remaining s390 pci instruction to query the function information block. Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-inst.c | 64 hw/s390x/s390-pci

[Qemu-devel] [PATCH 1/2] s390/pci: add error event support

2014-12-05 Thread Frank Blaschka
From: Frank Blaschka This patch adds support to generate s390 pci error events Signed-off-by: Frank Blaschka --- hw/s390x/s390-pci-bus.c | 50 +--- hw/s390x/s390-pci-bus.h | 35 +++- hw/s390x/s390-pci-inst.c | 86

[Qemu-devel] [PATCH 0/2] s390/pci: add 2 more features

2014-12-05 Thread Frank Blaschka
Coni, Alex, Christian, here are 2 more s390/pci features on top of the base pci support. Thx! Frank Frank Blaschka (2): s390/pci: add error event support s390/pci: implement stpcifc instruction hw/s390x/s390-pci-bus.c | 50 ++-- hw/s390x/s390-pci-bus.h | 36

[Qemu-devel] [PATCH 2/3 V1] s390: implement pci instructions

2014-11-26 Thread Frank Blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported. Also a device has to support MSI/MSI-X to run on s390. Signed-off-by

[Qemu-devel] [PATCH 1/3 V1] s390: Add PCI bus support

2014-11-26 Thread Frank Blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing. Signed-off-by: Frank

[Qemu-devel] [PATCH 0/3 V1] add PCI support for the s390 platform

2014-11-26 Thread Frank Blaschka
integration into 2.3 Thanks, Frank Frank Blaschka (3): s390: Add PCI bus support s390: implement pci instructions kvm: extend kvm_irqchip_add_msi_route to work on s390 default-configs/s390x-softmmu.mak | 1 + hw/s390x/Makefile.objs| 1 + hw/s390x/css.c| 5

[Qemu-devel] [PATCH 3/3 V1] kvm: extend kvm_irqchip_add_msi_route to work on s390

2014-11-26 Thread Frank Blaschka
From: Frank Blaschka on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture function to fixup the routing

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-25 Thread Frank Blaschka
On Tue, Nov 25, 2014 at 01:14:01PM +0100, Alexander Graf wrote: > > > On 25.11.14 11:11, Frank Blaschka wrote: > > On Tue, Nov 18, 2014 at 06:00:40PM +0100, Alexander Graf wrote: > >> > >> > >> On 18.11.14 13:50, Frank Blaschka wrote: > >>&g

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-25 Thread Frank Blaschka
On Tue, Nov 18, 2014 at 06:00:40PM +0100, Alexander Graf wrote: > > > On 18.11.14 13:50, Frank Blaschka wrote: > > On Mon, Nov 10, 2014 at 04:14:16PM +0100, Alexander Graf wrote: > >> > >> > >> On 10.11.14 15:20, Frank Blaschka wrote: > >>> F

Re: [Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-18 Thread Frank Blaschka
On Mon, Nov 10, 2014 at 04:14:16PM +0100, Alexander Graf wrote: > > > On 10.11.14 15:20, Frank Blaschka wrote: > > From: Frank Blaschka > > > > This patch implements a pci bus for s390x together with infrastructure > > to generate and handle hotplug eve

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-12 Thread Frank Blaschka
On Wed, Nov 12, 2014 at 10:36:03AM +0100, Paolo Bonzini wrote: > > > On 12/11/2014 10:22, Alexander Graf wrote: > Absolutely lets make an example for qemu running on BE and LE > > byte orderconfig space backing pci_default_read_config pcilg > (with cpu_to_le) > B

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-12 Thread Frank Blaschka
On Wed, Nov 12, 2014 at 10:08:19AM +0100, Alexander Graf wrote: > > > On 12.11.14 09:49, Frank Blaschka wrote: > > On Tue, Nov 11, 2014 at 04:24:24PM +0100, Alexander Graf wrote: > >> > >> > >> On 11.11.14 15:08, Frank Blaschka wrote: > >>&g

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-12 Thread Frank Blaschka
On Tue, Nov 11, 2014 at 04:24:24PM +0100, Alexander Graf wrote: > > > On 11.11.14 15:08, Frank Blaschka wrote: > > On Tue, Nov 11, 2014 at 01:51:25PM +0100, Alexander Graf wrote: > >> > >> > >> > >>> Am 11.11.2014 um 13:39 schrieb Frank Bla

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-11 Thread Frank Blaschka
On Tue, Nov 11, 2014 at 01:51:25PM +0100, Alexander Graf wrote: > > > > > Am 11.11.2014 um 13:39 schrieb Frank Blaschka : > > > >> On Tue, Nov 11, 2014 at 01:16:04PM +0100, Alexander Graf wrote: > >> > >> > >>> On 11.11.14 13:10

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-11 Thread Frank Blaschka
On Tue, Nov 11, 2014 at 12:17:17PM +, Peter Maydell wrote: > On 11 November 2014 12:10, Frank Blaschka wrote: > > On Mon, Nov 10, 2014 at 04:56:21PM +0100, Alexander Graf wrote: > >> > +static uint8_t barsize(uint64_t size) > >> > +{ > >> &

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-11 Thread Frank Blaschka
On Tue, Nov 11, 2014 at 01:16:04PM +0100, Alexander Graf wrote: > > > On 11.11.14 13:10, Frank Blaschka wrote: > > On Mon, Nov 10, 2014 at 04:56:21PM +0100, Alexander Graf wrote: > >> > >> > >> On 10.11.14 15:20, Frank Blaschka wrote: > >>> F

Re: [Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-11 Thread Frank Blaschka
On Mon, Nov 10, 2014 at 04:56:21PM +0100, Alexander Graf wrote: > > > On 10.11.14 15:20, Frank Blaschka wrote: > > From: Frank Blaschka > > > > This patch implements the s390 pci instructions in qemu. It allows > > to access and drive pci devices attached to

[Qemu-devel] [PATCH 2/3] s390: implement pci instructions

2014-11-10 Thread Frank Blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported. Also a device has to support MSI/MSI-X to run on s390. Signed-off-by

[Qemu-devel] [PATCH 1/3] s390: Add PCI bus support

2014-11-10 Thread Frank Blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing. Signed-off-by: Frank

[Qemu-devel] [PATCH 0/3] add PCI support for the s390 platform

2014-11-10 Thread Frank Blaschka
This set of patches implemets PCI support for the s390 platform. Now it is possible to run virtio-net-pci and potentially all virtual pci devices conforming to s390 platform constrains. Please review and consider for integration into 2.3 Thanks, Frank Blaschka (3): s390: Add PCI bus support

[Qemu-devel] [PATCH 3/3] kvm: extend kvm_irqchip_add_msi_route to work on s390

2014-11-10 Thread Frank Blaschka
From: Frank Blaschka on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture function to fixup the routing

Re: [Qemu-devel] [PATCH] vfio: check if host device supports INTx

2014-10-24 Thread Frank Blaschka
On Thu, Oct 23, 2014 at 08:26:51AM -0600, Alex Williamson wrote: > On Thu, 2014-10-23 at 10:21 +0200, Frank Blaschka wrote: > > On Wed, Oct 22, 2014 at 11:17:11AM -0600, Alex Williamson wrote: > > > On Wed, 2014-10-22 at 17:13 +0200, Frank Blaschka wrote: > >

Re: [Qemu-devel] [PATCH] vfio: check if host device supports INTx

2014-10-23 Thread Frank Blaschka
On Wed, Oct 22, 2014 at 11:17:11AM -0600, Alex Williamson wrote: > On Wed, 2014-10-22 at 17:13 +0200, Frank Blaschka wrote: > > From: Frank Blaschka > > > > Let the kernel announce if INTx is available. Yes, there are platforms > > (e.g. s390) which do not support I

[Qemu-devel] [PATCH] vfio: check if host device supports INTx

2014-10-22 Thread Frank Blaschka
From: Frank Blaschka Let the kernel announce if INTx is available. Yes, there are platforms (e.g. s390) which do not support INTx. Signed-off-by: Frank Blaschka --- hw/misc/vfio.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hw/misc/vfio.c b/hw/misc

[Qemu-devel] [PATCH 2/3 RFC] s390: implement pci instructions

2014-10-22 Thread Frank Blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. It allows to access and drive pci devices attached to the s390 pci bus. Because of platform constrains devices using IO BARs are not supported. Also a device has to support MSI/MSI-X to run on s390. Signed-off-by

[Qemu-devel] [PATCH 0/3 RFC] add PCI support for the s390 platform

2014-10-22 Thread Frank Blaschka
for kvm: extend kvm_irqchip_add_msi_route to work on s390 which adds the s390 interpretation of MSI-X to the common kvm add_msi_route functionality. Thx for any help, Frank Frank Blaschka (3): s390: Add PCI bus support s390: implement pci instructions kvm: extend

[Qemu-devel] [PATCH 1/3 RFC] s390: Add PCI bus support

2014-10-22 Thread Frank Blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with infrastructure to generate and handle hotplug events, to configure/unconfigure via sclp instruction, to do iommu translations and provide s390 support for MSI/MSI-X notification processing. Signed-off-by: Frank

[Qemu-devel] [PATCH 3/3 RPC] kvm: extend kvm_irqchip_add_msi_route to work on s390

2014-10-22 Thread Frank Blaschka
From: Frank Blaschka on s390 MSI-X irqs are presented as thin or adapter interrupts for this we have to reorganize the routing entry to contain valid information for the adapter interrupt code on s390. To minimize impact on existing code we introduce an architecture function to fixup the routing

[Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space

2014-10-17 Thread Frank Blaschka
Depending on the device, container->space->as contains the valid AddressSpace. Using address_space_memory breaks devices sitting behind an iommu (and using a separate address space). Signed-off-by: Frank Blaschka --- hw/misc/vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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 W

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 M

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

2014-09-25 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: > >

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 qe

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 > > > > This patch implements the s390 pci instructions in qemu. This a

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

2014-09-19 Thread frank . blaschka
From: Frank Blaschka 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 --- default-configs/s390x

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

2014-09-19 Thread frank . blaschka
From: Frank Blaschka 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 but irqs are deliver

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

2014-09-19 Thread frank . blaschka
From: Frank Blaschka 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 between pci devices so each

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

2014-09-19 Thread frank . blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. This allows to attach qemu pci devices including vfio. This does not mean the devices are functional but at least detection and config/memory space access is working. Signed-off-by: Frank Blaschka --- target

[Qemu-devel] [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

[Qemu-devel] [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 --- 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(void

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

2014-09-19 Thread frank . blaschka
From: Frank Blaschka This patch adds some small changes to make vfio build on s390. Signed-off-by: Frank Blaschka --- drivers/vfio/Kconfig |2 +- drivers/vfio/pci/vfio_pci_rdwr.c |8 2 files changed, 9 insertions(+), 1 deletion(-) --- a/drivers/vfio/Kconfig +++ b

Re: [Qemu-devel] [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: > >>>

Re: [Qemu-devel] [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 ar

Re: [Qemu-devel] [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 > > > > This patch adds GISA (Guest Interrupt State Area) support > > to s390 kvm. GISA can be used for exitless i

Re: [Qemu-devel] [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 dif

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

2014-09-04 Thread frank . blaschka
From: Frank Blaschka 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 --- default-configs/s390x

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

2014-09-04 Thread frank . blaschka
From: Frank Blaschka 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 and connect this instance to the

[Qemu-devel] [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 spaces

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

2014-09-04 Thread frank . blaschka
From: Frank Blaschka 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 to purge the translation table

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

2014-09-04 Thread frank . blaschka
From: Frank Blaschka 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 to the host pci device

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

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

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

2014-09-04 Thread frank . blaschka
From: Frank Blaschka 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 of GISA will follow with