Received: from eggs.gnu.org ([2001:4830:134:3::10]:57567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brRuq-0005XB-Gg for qemu-devel@nongnu.org; Tue, 04 Oct 2016 11:46:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brRuk-0003V1-Jw for qemu-devel@nongnu.org; Tue, 04 Oct 2016 11:45:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brRuk-0003Tj-AK for qemu-devel@nongnu.org; Tue, 04 Oct 2016 11:45:54 -0400 Date: Tue, 4 Oct 2016 09:45:51 -0600 From: Alex Williamson Message-ID: <20161004094551.49627b65@t450s.home> In-Reply-To: <20161004145911.GA2155@redhat.com> References: <1472736127-18137-1-git-send-email-marcel@redhat.com> <6c9103e7-70ad-55c6-5533-d6d9bbaa39b4@redhat.com> <20161004145911.GA2155@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC] docs: add PCIe devices placement guidelines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Laszlo Ersek , Marcel Apfelbaum , qemu-devel@nongnu.org, Peter Maydell , Drew Jones , mst@redhat.com, Andrea Bolognani , Gerd Hoffmann , Laine Stump On Tue, 4 Oct 2016 15:59:11 +0100 "Daniel P. Berrange" wrote: > On Mon, Sep 05, 2016 at 06:24:48PM +0200, Laszlo Ersek wrote: > > On 09/01/16 15:22, Marcel Apfelbaum wrote: > > > +2.3 PCI only hierarchy > > > +====================== > > > +Legacy PCI devices can be plugged into pcie.0 as Integrated Devices or > > > +into DMI-PCI bridge. PCI-PCI bridges can be plugged into DMI-PCI bridges > > > +and can be nested until a depth of 6-7. DMI-BRIDGES should be plugged > > > +only into pcie.0 bus. > > > + > > > + pcie.0 bus > > > + ---------------------------------------------- > > > + | | > > > + ----------- ------------------ > > > + | PCI Dev | | DMI-PCI BRIDGE | > > > + ---------- ------------------ > > > + | | > > > + ----------- ------------------ > > > + | PCI Dev | | PCI-PCI Bridge | > > > + ----------- ------------------ > > > + | | > > > + ----------- ----------- > > > + | PCI Dev | | PCI Dev | > > > + ----------- ----------- > > > > Works for me, but I would again elaborate a little bit on keeping the > > hierarchy flat. > > > > First, in order to preserve compatibility with libvirt's current > > behavior, let's not plug a PCI device directly in to the DMI-PCI bridge, > > even if that's possible otherwise. Let's just say > > > > - there should be at most one DMI-PCI bridge (if a legacy PCI hierarchy > > is required), > > Why do you suggest this ? If the guest has multiple NUMA nodes > and you're creating a PXB for each NUMA node, then it looks valid > to want to have a DMI-PCI bridge attached to each PXB, so you can > have legacy PCI devices on each NUMA node, instead of putting them > all on the PCI bridge without NUMA affinity. Seems like this is one of those "generic" vs "specific" device issues. We use the DMI-to-PCI bridge as if it were a PCIe-to-PCI bridge, but DMI is actually an Intel proprietary interface, the bridge just has the same software interface as a PCI bridge. So while you can use it as a generic PCIe-to-PCI bridge, it's at least going to make me cringe every time. > > - only PCI-PCI bridges should be plugged into the DMI-PCI bridge, > > What's the rational for that, as opposed to plugging devices directly > into the DMI-PCI bridge which seems to work ? IIRC, something about hotplug, but from a PCI perspective it doesn't make any sense to me either. Same with the restriction from using slot 0 on PCI bridges, there's no basis for that except on the root bus. Thanks, Alex