qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/1] s390 pci infrastruture modelling
@ 2015-07-08  5:44 Yi Min Zhao
  2015-07-08  5:44 ` [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling Yi Min Zhao
  0 siblings, 1 reply; 6+ messages in thread
From: Yi Min Zhao @ 2015-07-08  5:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: cornelia.huck, borntraeger, Yi Min Zhao, agraf, mst

From: Yi Min Zhao <zyimin@linux.vnet.ibm.com>

This patch extends the current s390 pci implementation to
provide more flexibility in configuration of s390 specific
device handling.

For each vfio pci device, I create a zpci device to store s390
specific informations. And attach all of these special zpci devices
to the s390 facility bus. A zpci device references the corresponding
PCI device via device id. 

The new design allows to define multiple host bridges, each host bridge
could hold 32 zpci devices at most.

The topology for this implementation could be:

  dev: s390-pcihost, id ""
    bus: pci.0
      type PCI
      dev: vfio-pci, id "vpci1"
        host = "0000:00:00.0"
	......
      dev: vfio-pci, id "vpci2"
        host = "0001:00:00.0"
	......
  dev: s390-pci-facility, id ""
    bus: s390-pci-fac-bus.0
      type s390-pci-fac-bus
      dev: zpci, id "zpci1"
        fid = 1 (0x1)
        uid = 2 (0x2)
        pci_id = "vpci1"
      dev: zpci, id "zpci2"
        fid = 6 (0x6)
        uid = 7 (0x7)
        pci_id = "vpci2"

To make the review easier, I keep all of the old names, such as 
S390PCIBusDevice to name a zpci device. I will make a cleanup 
patch later to change these names to a more suitable name.

Comparing to v3, this patch does the following change:
1.Exchange vfio-pci and zpci definitions. Define zpci device firstly
  then define vfio-pci device.
2.Unplug either vfio-pci device or zpci device can remove both of them.

Yi Min Zhao (1):
  s390 pci infrastructure modelling

 hw/s390x/s390-pci-bus.c    |  323 ++++++++++++++++++++++++++++++++++----------
 hw/s390x/s390-pci-bus.h    |   41 +++++-
 hw/s390x/s390-pci-inst.c   |   12 ++-
 hw/s390x/s390-virtio-ccw.c |    5 +-
 4 files changed, 302 insertions(+), 79 deletions(-)

-- 
1.7.9

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-07-13  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08  5:44 [Qemu-devel] [PATCH v4 0/1] s390 pci infrastruture modelling Yi Min Zhao
2015-07-08  5:44 ` [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling Yi Min Zhao
2015-07-09  7:48   ` Michael S. Tsirkin
2015-07-09  9:30     ` zyimin
2015-07-09  9:57       ` Michael S. Tsirkin
2015-07-13  2:49         ` zyimin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).