From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Tushar Dave <tdave@nvidia.com>,
qemu-devel@nongnu.org, qemu-arm@nongnu.org,
peter.maydell@linaro.org, marcel@redhat.com,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
alwilliamson@nvidia.com, Jason Gunthorpe <jgg@nvidia.com>,
Shameer Kolothum Thodi <skolothumtho@nvidia.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH v2 3/5] hw/pci: add fixed BAR fw_cfg blob export
Date: Wed, 4 Nov 2026 07:11:59 -0500 [thread overview]
Message-ID: <20261104071037-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <f46e21c2-a0f3-460a-a7a3-eabf19b7d9cb@app.fastmail.com>
On Wed, Nov 04, 2026 at 10:59:47AM +0100, Ard Biesheuvel wrote:
>
>
> On Mon, 2 Nov 2026, at 19:12, Tushar Dave wrote:
> > Introduce a fixed BAR fw_cfg blob exporter that serializes PCI
> > device and BAR information into the "etc/fixed-bars" fw_cfg file.
> >
> > The blob contains an entry for every PCI function with memory BARs.
> > Each entry carries the device's vendor and device ID, whether it
> > has a fixed BAR configuration, and its firmware device path. Fixed
> > BAR entries also include the configured BAR address, size, and type
> > information for each BAR.
> >
> > Document the format in docs/specs/pci-fixed-bars.rst.
> >
> > Signed-off-by: Tushar Dave <tdave@nvidia.com>
> > ---
> > docs/specs/index.rst | 1 +
> > docs/specs/pci-fixed-bars.rst | 75 ++++++++
> > hw/pci/meson.build | 1 +
> > hw/pci/pci-fixed-bar-blob.c | 308 +++++++++++++++++++++++++++++++++
> > include/hw/pci/pci-fixed-bar.h | 63 +++++++
> > 5 files changed, 448 insertions(+)
> > create mode 100644 docs/specs/pci-fixed-bars.rst
> > create mode 100644 hw/pci/pci-fixed-bar-blob.c
> > create mode 100644 include/hw/pci/pci-fixed-bar.h
> >
> ...
> > diff --git a/hw/pci/pci-fixed-bar-blob.c b/hw/pci/pci-fixed-bar-blob.c
> > new file mode 100644
> > index 0000000000..dc94debfad
> > --- /dev/null
> > +++ b/hw/pci/pci-fixed-bar-blob.c
> ...
> > +/*
> > + * EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL's CheckDevice interface
> > + * (UEFI PI Spec 1.2 Vol 5) only passes VendorId/DeviceId/RevisionId/
> > + * SubsystemVendorId/SubsystemDeviceId, no BDF — so in EDK2 we can't
> > + * match a blob entry to a specific device directly using BDF. To work
> > + * around that, we prepare the blob entries in the same order PciBusDxe
> > + * discovers devices, so matching by VID:DID inherently works.
>
> This sounds rather fragile.
>
> Could you elaborate on what order this is, and why it is reasonable to
> rely on that approach being stable?
>
>
Also, bus numbers can be changed by guest, and I don't get why
would you want to report devices without a fixed bar.
next prev parent reply other threads:[~2026-11-04 12:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 18:12 [PATCH v2 0/5] hw/pci, hw/arm/virt: fixed PCI BAR placement Tushar Dave
2026-11-02 18:12 ` [PATCH v2 1/5] hw/pci: introduce PCI fixed BAR properties Tushar Dave
2026-11-02 18:12 ` [PATCH v2 2/5] hw/pci: add validation for fixed BAR configuration Tushar Dave
2026-11-02 18:12 ` [PATCH v2 3/5] hw/pci: add fixed BAR fw_cfg blob export Tushar Dave
2026-11-04 9:59 ` Ard Biesheuvel
2026-11-04 12:11 ` Michael S. Tsirkin [this message]
2026-11-04 23:05 ` Tushar Dave
2026-11-02 18:12 ` [PATCH v2 4/5] hw/arm/virt: export fixed BAR metadata via fw_cfg Tushar Dave
2026-11-02 18:12 ` [PATCH v2 5/5] hw/arm/virt: add highmem-mmio-base property Tushar Dave
2026-11-04 9:46 ` [PATCH v2 0/5] hw/pci, hw/arm/virt: fixed PCI BAR placement Gerd Hoffmann
2026-11-04 13:11 ` Michael S. Tsirkin
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=20261104071037-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alwilliamson@nvidia.com \
--cc=ardb@kernel.org \
--cc=devel@edk2.groups.io \
--cc=jgg@nvidia.com \
--cc=kraxel@redhat.com \
--cc=marcel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=skolothumtho@nvidia.com \
--cc=tdave@nvidia.com \
/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.