From: Eduardo Habkost <ehabkost@redhat.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: Andrea Bolognani <abologna@redhat.com>,
qemu-devel@nongnu.org, Marcel Apfelbaum <mapfelba@redhat.com>,
laine@laine.org, Lukas Doktor <ldoktor@redhat.com>
Subject: Re: [Qemu-devel] Number of usable slots in PCIe Root Port / PCIe Switch Downstream Port
Date: Wed, 23 Aug 2017 19:19:14 -0300 [thread overview]
Message-ID: <20170823221914.GA15315@localhost.localdomain> (raw)
In-Reply-To: <ddb6f49e-6617-a659-08bf-cf093f658a8c@redhat.com>
On Wed, Aug 23, 2017 at 11:16:27PM +0300, Marcel Apfelbaum wrote:
> On 23/08/2017 19:46, Andrea Bolognani wrote:
> > AFAIK some PCI controllers, particularly:
> >
> > * PCIe Root Port (pcie-root-port, ioh3420)
> > * PCIe Switch Downstream Port (xio3130-downstream)
> >
> > only have a single usable slot. libvirt knows about this
> > fact, and will prevent you from adding more than one
> > device to the respective bus.
> >
> > However, as Lukáš recently noticed, QEMU won't complain
> > if you add more devices:
> >
> > $ qemu-system-x86_64 \
> > -nodefaults -nographic \
> > -M q35 -monitor stdio \
> > -device pcie-root-port,id=pci.1 \
> > -device virtio-scsi-pci,bus=pci.1 \
> > -device virtio-scsi-pci,bus=pci.1
> > QEMU 2.9.0 monitor - type 'help' for more information
> > (qemu) info qtree
> > bus: main-system-bus
> > type System
> > [...]
> > dev: q35-pcihost, id ""
> > [...]
> > bus: pcie.0
> > type PCIE
> > dev: pcie-root-port, id "pci.1"
> > [...]
> > bus: pci.1
> > type PCIE
> > dev: virtio-scsi-pci, id ""
> > [...]
> > addr = 01.0
> > bus: virtio-bus
> > type virtio-pci-bus
> > dev: virtio-scsi-device, id ""
> > [...]
> > bus: scsi.1
> > type SCSI
> > dev: virtio-scsi-pci, id ""
> > [...]
> > addr = 00.0
> > bus: virtio-bus
> > type virtio-pci-bus
> > dev: virtio-scsi-device, id ""
> > [...]
> > bus: scsi.0
> > type SCSI
> > (qemu)
> >
>
> Hi Andrea,
>
> > As you can see, all devices will show up in the qtree;
> > only the one with addr=00.0, however, will actually be
> > visible to the guest OS according to my tests.
> >
> > Is such a configuration considered valid?
>
> Definitely no.
>
> > Should QEMU
> > complain loudly about it and refuse to start?
>
> Yes, but we need a clean way to do it. Eduardo is working
> on a series that would expose to libvirt this info,
> Eduardo can you please confirm?
The work has two parts: 1) actually preventing invalid
configurations; 2) providing a query interface to let libvirt
know which configurations are valid.
My focus is on (2) (adding a query-device-slots interface), but
we surely need to address bugs related to (1) first, so both the
device-plugging code and slot-querying code are correct and agree
with each other.
--
Eduardo
next prev parent reply other threads:[~2017-08-23 22:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 16:46 [Qemu-devel] Number of usable slots in PCIe Root Port / PCIe Switch Downstream Port Andrea Bolognani
2017-08-23 20:16 ` Marcel Apfelbaum
2017-08-23 22:19 ` Eduardo Habkost [this message]
2017-08-24 8:54 ` Andrea Bolognani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170823221914.GA15315@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=abologna@redhat.com \
--cc=laine@laine.org \
--cc=ldoktor@redhat.com \
--cc=mapfelba@redhat.com \
--cc=marcel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.