qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/1] s390 pci infrastucture modeling
@ 2015-04-15  6:48 Hong Bo Li
  2015-04-15  6:48 ` [Qemu-devel] [PATCH v1 1/1] s390 pci infrastructure modeling Hong Bo Li
  0 siblings, 1 reply; 10+ messages in thread
From: Hong Bo Li @ 2015-04-15  6:48 UTC (permalink / raw)
  To: qemu-devel, cornelia.huck, borntraeger, agraf, mst

This patch extends the current s390 pci implementation to
provide more flexibility in configuration of s390 specific
device handling. For this we had to introduce a new facility
(and bus) to hold devices representing information actually
provided by s390 firmware and I/O configuration.

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. 

Compare to the old implementation, I moved the actual hotplug/unplug 
codes to s390 pci device hot plug function. Then in the pcihost 
hotplug function, we don't need to do anything special. In the pcihost
unplug function, we need to unplug the corresponding zpci device.

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.

Hong Bo Li (1):
  s390 pci infrastructure modeling

 hw/s390x/s390-pci-bus.c    | 317 +++++++++++++++++++++++++++++++++------------
 hw/s390x/s390-pci-bus.h    |  48 ++++++-
 hw/s390x/s390-pci-inst.c   |   4 +-
 hw/s390x/s390-virtio-ccw.c |   4 +-
 4 files changed, 285 insertions(+), 88 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH v1 0/1] s390 pci infrastucture modeling
@ 2015-04-15  8:04 Hong Bo Li
  2015-04-15  8:04 ` [Qemu-devel] [PATCH v1 1/1] S390 pci infrastructure modeling Hong Bo Li
  2015-04-15  8:19 ` Hong Bo Li
  0 siblings, 2 replies; 10+ messages in thread
From: Hong Bo Li @ 2015-04-15  8:04 UTC (permalink / raw)
  To: qemu-devel, cornelia.huck, borntraeger, agraf, mst

This patch extends the current s390 pci implementation to
provide more flexibility in configuration of s390 specific
device handling. For this we had to introduce a new facility
(and bus) to hold devices representing information actually
provided by s390 firmware and I/O configuration.

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. 

Compare to the old implementation, I moved the actual hotplug/unplug 
codes to s390 pci device hot plug function. Then in the pcihost 
hotplug function, we don't need to do anything special. In the pcihost
unplug function, we need to unplug the corresponding zpci device.

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.

Hong Bo Li (1):
  S390 pci infrastructure modeling

 hw/s390x/s390-pci-bus.c    | 317 +++++++++++++++++++++++++++++++++------------
 hw/s390x/s390-pci-bus.h    |  48 ++++++-
 hw/s390x/s390-pci-inst.c   |   4 +-
 hw/s390x/s390-virtio-ccw.c |   4 +-
 4 files changed, 285 insertions(+), 88 deletions(-)

-- 
1.9.3

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

end of thread, other threads:[~2015-05-21 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15  6:48 [Qemu-devel] [PATCH v1 0/1] s390 pci infrastucture modeling Hong Bo Li
2015-04-15  6:48 ` [Qemu-devel] [PATCH v1 1/1] s390 pci infrastructure modeling Hong Bo Li
  -- strict thread matches above, loose matches on Subject: below --
2015-04-15  8:04 [Qemu-devel] [PATCH v1 0/1] s390 pci infrastucture modeling Hong Bo Li
2015-04-15  8:04 ` [Qemu-devel] [PATCH v1 1/1] S390 pci infrastructure modeling Hong Bo Li
2015-04-21  5:29   ` Hong Bo Li
2015-05-12  9:07     ` Cornelia Huck
2015-05-20  6:54       ` Hong Bo Li
2015-05-20  7:47       ` Paolo Bonzini
2015-05-21 11:11         ` Hong Bo Li
2015-05-20  7:43   ` Paolo Bonzini
2015-04-15  8:19 ` Hong Bo Li

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).