From: Peter Maydell <peter.maydell@linaro.org>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>,
qemu-arm@nongnu.org, "Fan Ni" <fan.ni@samsung.com>,
linuxarm@huawei.com, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [RFC] hw/arm/virt: Provide DT binding generation for PCI eXpander Bridges
Date: Tue, 25 Apr 2023 09:28:44 +0100 [thread overview]
Message-ID: <CAFEAcA8QXcpkxdXMWP8X9tLem6K8qC3CwZ2-t-fqEpGR-nJBTg@mail.gmail.com> (raw)
In-Reply-To: <20230424225626.00001219@huawei.com>
On Mon, 24 Apr 2023 at 22:56, Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> On Mon, 24 Apr 2023 16:45:48 +0100
> Peter Maydell <peter.maydell@linaro.org> wrote:
> > On the other hand, having QEMU enumerate PCI devices is *also* a
> > very different model from today, where we assume that the guest
> > code is the one that is going to deal with enumerating PCI devices.
> > To my mind one of the major advantages of PCI is exactly that it
> > is entirely probeable and discoverable, so that there is no need
> > for the dtb to include a lot of information that the kernel can
> > find out for itself by directly asking the hardware...
>
> I absolutely agree that QEMU enumerating PCI seem silly level of complexity
> to introduce. So easy route is to just use the bus numbers to partition
> resources. We have those available without any complexity. It's not the
> same as how it's done with ACPI, but then the alternatives are either
> (though maybe they are closer). Note current proposed algorithm may be
> too simplistic (perhaps some alignment forcing should adjust the division
> of the resources to start on round number addresses)
I think we definitely need to talk about this later this week,
but my initial view is that if:
(1) the guest kernel can get the information it needs to do this
by probing the hardware
(2) doing it in QEMU gives you "this isn't a great allocation"
"we don't really have the info we need to do it optimally"
"this is more of a policy decision" effects
(which is what it's sounding like to me)
this is a really strong argument for "guest software should be
doing this". DTB-booting kernels has always meant the kernel
doing a lot of work that under ACPI/UEFI/x86-PC is typically
done by firmware, and this seems similar to me.
thanks
-- PMM
next prev parent reply other threads:[~2023-04-25 8:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 16:50 [RFC] hw/arm/virt: Provide DT binding generation for PCI eXpander Bridges Jonathan Cameron via
2023-04-24 9:28 ` Peter Maydell
2023-04-24 15:40 ` Jonathan Cameron via
2023-04-24 15:45 ` Peter Maydell
2023-04-24 21:56 ` Jonathan Cameron via
2023-04-25 8:28 ` Peter Maydell [this message]
2023-04-25 17:37 ` Jonathan Cameron via
2023-04-25 20:15 ` Peter Maydell
2023-04-26 16:57 ` Jonathan Cameron via
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=CAFEAcA8QXcpkxdXMWP8X9tLem6K8qC3CwZ2-t-fqEpGR-nJBTg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=fan.ni@samsung.com \
--cc=linuxarm@huawei.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).