From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx6r-0001Mc-5O for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:00:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQx6m-0000jJ-WE for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:00:05 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:38297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQx6m-0000iz-Mx for qemu-devel@nongnu.org; Thu, 26 Feb 2015 07:00:00 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Feb 2015 11:59:58 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id B3E411B0804B for ; Thu, 26 Feb 2015 12:00:10 +0000 (GMT) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1QBxsP17405878 for ; Thu, 26 Feb 2015 11:59:55 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1QBxqNm027870 for ; Thu, 26 Feb 2015 04:59:54 -0700 From: Frank Blaschka Date: Thu, 26 Feb 2015 12:59:47 +0100 Message-Id: <1424951988-40477-1-git-send-email-blaschka@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH RFC 0/1] Extend s390 pci representation in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, borntraeger@de.ibm.com, agraf@suse.de Cc: Frank Blaschka For a better understanding of the following patch here is some general information about how PCI is implemented on the s390 platform. The physical structure of the pci system (bridge, bus, slot) is not shown to the OS. Instead a firmware and I/O configuration layer abstracts each PCI card to a bare PCI function. In essence, the fw layer provides a simple enumeration of the individual devices, which the s390 pci implementation in the Linux kernel translates into individual pci domains. HW layer | FW layer | Linux kernel | | (opaque) | function 1 | 0001:00:00.0 | function 2 | 0002:00:00.0 | function 3 | 0003:00:00.0 In qemu we have following problems: (1) We have to represent this s390 specific topology information, respectively the lack thereof (2) We have/want to use common qemu PCI infrastructure The initial implementation did not honor (1) much and tried to derive s390 specific configuration attributes from attributes of qemu pci devices. It turns out that this is not flexible enough and is not sufficient to support s390 specific configurations. The following patch introduces a new zPCI device that kind of represents the fw layer on real hardware and provides the s390 specific information needed by guest operating systems. We keep the pci devices the same as in the general case and just hook them up with the corresponding 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 changed, 227 insertions(+), 74 deletions(-) -- 2.1.4