Received: from eggs.gnu.org ([2001:4830:134:3::10]:43489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhLar-0002Yc-VO for qemu-devel@nongnu.org; Tue, 06 Sep 2016 14:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhLag-00037U-73 for qemu-devel@nongnu.org; Tue, 06 Sep 2016 14:59:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhLaf-00037G-Ni for qemu-devel@nongnu.org; Tue, 06 Sep 2016 14:59:26 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB5B4128D for ; Tue, 6 Sep 2016 18:59:23 +0000 (UTC) References: <1472736127-18137-1-git-send-email-marcel@redhat.com> <20160906093809.27c93074@t450s.home> <678a7c06-b49c-6e0a-104b-ca339f79246b@redhat.com> <20160906123258.3a8c63be@t450s.home> From: Marcel Apfelbaum Message-ID: <4b64780d-64fd-19a9-724c-e0a52d93d0c0@redhat.com> Date: Tue, 6 Sep 2016 21:59:14 +0300 MIME-Version: 1.0 In-Reply-To: <20160906123258.3a8c63be@t450s.home> Content-Type: text/plain; charset=windows-1252; format=flowed 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: Alex Williamson Cc: qemu-devel@nongnu.org, lersek@redhat.com, mst@redhat.com On 09/06/2016 09:32 PM, Alex Williamson wrote: > On Tue, 6 Sep 2016 21:14:11 +0300 > Marcel Apfelbaum wrote: > >> On 09/06/2016 06:38 PM, Alex Williamson wrote: >>> On Thu, 1 Sep 2016 16:22:07 +0300 >>> Marcel Apfelbaum wrote: >>> >>>> Proposes best practices on how to use PCIe/PCI device >>>> in PCIe based machines and explain the reasoning behind them. >>>> >>>> Signed-off-by: Marcel Apfelbaum >>>> --- >>>> >>>> Hi, >>>> >>>> Please add your comments on what to add/remove/edit to make this doc usable. >>>> >>>> Thanks, >>>> Marcel >>>> [...] >> >>>> +The PCI hotplug is ACPI based and can work side by side with the PCIe >>>> +native hotplug. >>>> + >>>> +PCIe devices can be natively hot-plugged/hot-unplugged into/from >>>> +PCIe Ports (Root Ports/Downstream Ports). Switches are hot-pluggable. >>> >>> Why? This seems like a QEMU bug. Clearly we need the downstream ports >>> in place when the upstream switch is hot-added, but this should be >>> feasible. >>> >> >> I don't get understand the question. I do think switches can be hot-plugged, >> but I am not sure if QEMU allows it. If not, this is something we should solve. > > Sorry, I read to quickly and inserted a in there, I thought the > statement was that switches are not hot-pluggable. I think the issue > will be the ordering of hot-adding the downstream switch ports prior to > the upstream switch port since or we're going to need to invent a > switch with hot-pluggable downstream ports. I expect the guest is only > going to scan for downstream ports once after the upstream port is > discovered. > The problem I see is that I need to specify a bus to plug the Downstream Port, but this is the id of the upstream port I haven't added yet. I need to think a little bit more on how to do it, or I am missing something. [...] >>>> +5. Device assignment >>>> +==================== >>>> +Host devices are mostly PCIe and should be plugged only into PCIe ports. >>>> +PCI-PCI bridge slots can be used for legacy PCI host devices. >>> >>> I don't think we have any evidence to suggest this as a best practice. >>> We have a lot of experience placing PCIe host devices into a >>> conventional PCI topology on 440FX. We don't have nearly as much >>> experience placing them into downstream PCIe ports. This seems like >>> how we would like for things to behave to look like real hardware >>> platforms, but it's just navel gazing whether it's actually the right >>> thing to do. Thanks, >>> >> >> I had to look up the "navel gazing"... >> Why I do agree with your statements I prefer a cleaner PCI Express machine >> with as little legacy PCI as possible. I use this document as an opportunity >> to start gaining experience with device assignment into PCI Express Root Ports >> and Downstream Ports and solve the issues long the way. > > That's exactly what I mean, there's an ulterior, personal motivation in > this suggestion that's not really backed by facts. Ulterior yes, personal no. Several developers of both ARM and x86 PCI Express machines see the new machines as an opportunity to get rid of legacy and keep them as modern as possible. Funny thing, I *personally* prefer to see Q35 as a replacement for PC machines, no need to keep and support them both. You'd like to make > the recommendation to place PCIe assigned devices into PCIe slots, but > that's not necessarily the configuration with the best track record > right now. Since we haven't use Q35 at all until now (a speculation, but probably true) the track record is kind of clean... In fact there's really no advantage to a user to do this > unless they have a device that needs PCIe (radeon and tg3 > potentially come to mind here). The advantage is to avoid making the PCI Express "purists" (where are you now??) to start a legacy PCI hierarchy to plug a modern device into a modern PCI Express machine. Another advantage is to avoid tainting the ACPI tables with ACPI hotplug support for the PCI-bridge devices and stuff like that. I agree is safer to plug assigned devices into PCI slots from an "enterprise" point of view, but this is upstream, right ? :) We look at the future... (and we don't have known issues yet anyway) So while I agree with you from an > ideological standpoint, I don't think that's sufficient to make the > recommendation you're proposing here. Thanks, > I'll find a way to rephrase it, maybe: Host devices are mostly PCIe and they can be plugged into PCI Express Root Ports/Downstream Ports, however we have no experience doing that. As a fall-back the PCI hierarchy can be used to plug an assigned device into a PCI slot. Thanks, Marcel >>>> +PCI-PCI bridge slots can be used for legacy PCI host devices. > Alex >