On 09/06/2016 09:32 PM, Alex Williamson wrote:
On Tue, 6 Sep 2016 21:14:11 +0300
Marcel Apfelbaum <mar...@redhat.com> wrote:

On 09/06/2016 06:38 PM, Alex Williamson wrote:
On Thu,  1 Sep 2016 16:22:07 +0300
Marcel Apfelbaum <mar...@redhat.com> 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 <mar...@redhat.com>
---

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 <not> 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



Reply via email to