From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Andrea Bolognani <abologna@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Kashyap Chamarthy <kchamart@redhat.com>
Cc: libvir-list@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] PCI(e): Documentation "io-reserve" and related properties?
Date: Tue, 11 Jun 2019 13:15:16 +0300 [thread overview]
Message-ID: <49ed5a38-14e9-697c-d7a0-57e827e1b3a7@gmail.com> (raw)
In-Reply-To: <c8f1fff2075c64ff6a3e5a2c63d667849acbd23c.camel@redhat.com>
On 6/7/19 2:43 PM, Andrea Bolognani wrote:
> On Thu, 2019-06-06 at 14:20 -0400, Michael S. Tsirkin wrote:
>> On Thu, Jun 06, 2019 at 06:19:43PM +0200, Kashyap Chamarthy wrote:
>>> Hi folks,
>>>
>>> Today I learnt about some obscure PCIe-related properties, in context of
>>> the adding PCIe root ports to a guest, namely:
>>>
>>> io-reserve
>>> mem-reserve
>>> bus-reserve
>>> pref32-reserve
>>> pref64-reserve
>>>
>>> Unfortunately, the commit[*] that added them provided no documentation
>>> whatsover.
>>>
>>> In my scenario, I was specifically wondering about what does
>>> "io-reserve" mean, in what context to use it, etc. (But documentation
>>> about other properties is also welcome.)
>>>
>>> Anyone more well-versed in this area care to shed some light?
>>>
>>>
>>> [*] 6755e618d0 (hw/pci: add PCI resource reserve capability to legacy
>>> PCI bridge, 2018-08-21)
>> So normally bios would reserve just enough io space to satisfy all
>> devices behind a bridge. What if you intend to hotplug more devices?
>> These properties allow you to ask bios to reserve extra space.
> Is it fair to say that setting io-reserve=0 for a pcie-root-port
> would be a way to implement the requirements set forth in
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1408810
>
> ? I tested this on aarch64 and it seems to work as expected, but
> then again without documentation it's hard to tell.
>
> More specifically, I created an aarch64/virt guest with several
> pcie-root-ports and it couldn't boot much further than GRUB when
> the number of ports exceeded 24, but as soon as I added the
> io-reserve=0 option I could get the same guest to boot fine with
> 32 or even 64 pcie-root-ports. I'm attaching the boot log for
> reference: there are a bunch of messages about the topic but they
> would appear to be benign.
>
> Hotplug seemed to work too: I tried with a single virtio-net-pci
> and I could access the network. My understanding is that PCIe
> devices are required to work without IO space, so this behavior
> matches my expectations.
>
> I wonder, though, what would happen if I had something like
>
> -device pcie-root-port,io-reserve=0,id=pci.1
> -device pcie-pci-bridge,bus=pci.1
>
> Would I be able to hotplug conventional PCI devices into the
> pcie-pci-bridge, or would the lack of IO space reservation for
> the pcie-root-port cause issues with that?
>
You would not have any IO space for a PCI device or PCIe device
that for some reason will require IO space (even if they shouldn't)
and the hotplug operation would fail.
On the other hand, if the pcie-pci-bridge device itself will require
some IO space, it will work.. it worth trying.
Thanks,
Marcel
next prev parent reply other threads:[~2019-06-11 10:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 16:19 [Qemu-devel] PCI(e): Documentation "io-reserve" and related properties? Kashyap Chamarthy
2019-06-06 18:20 ` Michael S. Tsirkin
2019-06-07 11:43 ` Andrea Bolognani
2019-06-11 10:15 ` Marcel Apfelbaum [this message]
2019-06-11 7:21 ` Kashyap Chamarthy
2019-06-11 10:19 ` Marcel Apfelbaum
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=49ed5a38-14e9-697c-d7a0-57e827e1b3a7@gmail.com \
--to=marcel.apfelbaum@gmail.com \
--cc=abologna@redhat.com \
--cc=kchamart@redhat.com \
--cc=libvir-list@redhat.com \
--cc=mst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).