All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] add check for PCIe root ports and downstream ports
@ 2014-08-21  9:47 arei.gonglei
  2014-08-21  9:47 ` [Qemu-devel] [PATCH v2 1/2] qdev: Introduce a function to get qbus's parent arei.gonglei
  2014-08-21  9:47 ` [Qemu-devel] [PATCH v2 2/2] pci: add check for pcie root ports and downstream ports arei.gonglei
  0 siblings, 2 replies; 16+ messages in thread
From: arei.gonglei @ 2014-08-21  9:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.crosthwaite, weidong.huang, mst, marcel.a, luonengjun,
	peter.huangpeng, armbru, Gonglei, imammedo, pbonzini, afaerber

From: Gonglei <arei.gonglei@huawei.com>

Root ports and downstream ports of switches are the hot
pluggable ports in a PCI Express hierarchy. 
PCI Express supports chip-to-chip interconnect, a PCIe link can 
only connect one pci device/Switch/EndPoint or PCI-bridge.

7.3. Configuration Transaction Rules (PCI Express specification 3.0)
7.3.1. Device Number

Downstream Ports that do not have ARI Forwarding enabled must 
associate only Device 0 with the device attached to the Logical Bus
representing the Link from the Port.

If ARI Forwarding is disabled, according to PCIe spec
section 7.3.1, only slot 0 with the device attached to
logic bus representing the link from downstream
ports and root ports.

So, adding check for PCIe downstream ports and root ports,
which avoid useless operation, both hotplug and coldplug.

Changes since v1:
 - using object_dynamic_cast() instead of simple string comparing (Paolo)
 - add ARI Forwarding enable bit check
 - using pcie_cap_get_type() instead of simple string comparing (Marcel)
 - fix some other comments.

Gonglei (2):
  qdev: Introduce a function to get qbus's parent
  pci: add check for pcie root ports and downstream ports

 hw/core/qdev.c         |  7 +++++++
 hw/pci/pci.c           | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++
 include/hw/qdev-core.h |  1 +
 3 files changed, 59 insertions(+)

-- 
1.7.12.4

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

end of thread, other threads:[~2014-08-26 14:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21  9:47 [Qemu-devel] [PATCH v2 0/2] add check for PCIe root ports and downstream ports arei.gonglei
2014-08-21  9:47 ` [Qemu-devel] [PATCH v2 1/2] qdev: Introduce a function to get qbus's parent arei.gonglei
2014-08-22  1:17   ` Hu Tao
2014-08-22  2:01     ` Gonglei (Arei)
2014-08-21  9:47 ` [Qemu-devel] [PATCH v2 2/2] pci: add check for pcie root ports and downstream ports arei.gonglei
2014-08-22  6:33   ` Marcel Apfelbaum
2014-08-22  6:40     ` Gonglei (Arei)
2014-08-25  8:59   ` Knut Omang
2014-08-25  9:23     ` Gonglei (Arei)
2014-08-25  9:51       ` Knut Omang
2014-08-25 10:51         ` Gonglei (Arei)
2014-08-25 11:01           ` Knut Omang
2014-08-25 11:23             ` Gonglei (Arei)
2014-08-26 14:34               ` Knut Omang
2014-08-25 20:02   ` Michael S. Tsirkin
2014-08-26 10:07     ` Gonglei (Arei)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.