From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJqs9-0001dJ-Ed for qemu-devel@nongnu.org; Tue, 19 Aug 2014 17:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJqs4-0006p5-Ei for qemu-devel@nongnu.org; Tue, 19 Aug 2014 17:23:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJqs4-0006on-5s for qemu-devel@nongnu.org; Tue, 19 Aug 2014 17:23:12 -0400 Date: Tue, 19 Aug 2014 23:23:41 +0200 From: "Michael S. Tsirkin" Message-ID: <20140819212341.GB10354@redhat.com> References: <1408453707-9972-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1408453707-9972-1-git-send-email-arei.gonglei@huawei.com> Subject: Re: [Qemu-devel] [PATCH 0/2] add check for PCIe root ports and downstream ports List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: peter.crosthwaite@xilinx.com, weidong.huang@huawei.com, marcel.a@redhat.com, armbru@redhat.com, luonengjun@huawei.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com, imammedo@redhat.com, pbonzini@redhat.com, afaerber@suse.de On Tue, Aug 19, 2014 at 09:08:25PM +0800, arei.gonglei@huawei.com wrote: > From: Gonglei > > 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. > > Right now, ARI Forwarding dose not support. So, only slot 0 is > supported, regardless of hotplug or coldplug. I'd rather we added ARI support in bridges (if that's what you mean) than APIs for the sole purpose of disabling functionality we'll want to re-enable later. We have the beginning of an implementation for ARI (pcie_ari_init). > So, adding check about slot 0 for PCIe downstream ports and > root ports, which avoid useless operation, both hotplug and > coldplug. > > 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 | 41 +++++++++++++++++++++++++++++++++++++++++ > include/hw/qdev-core.h | 1 + > 3 files changed, 49 insertions(+) > > -- > 1.7.12.4 >