From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vincent Bernat <vincent@bernat.ch>
Cc: "Igor Mammedov" <imammedo@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information)
Date: Mon, 3 May 2021 15:42:16 -0400 [thread overview]
Message-ID: <20210503154024-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <m3sg338vcd.fsf@bernat.ch>
On Mon, May 03, 2021 at 09:34:42PM +0200, Vincent Bernat wrote:
> ❦ 3 mai 2021 17:05 +02, Igor Mammedov:
>
> >> + /*
> >> + * We only handle the case were the device is attached to
> >> + * the PCI root bus. The general case is more complex as
> >> + * bridges are enumerated later and the table would need
> >> + * to be updated at this moment.
> >> + */
> >> + if (!pci_bus_is_root(pci_get_bus(pdev))) {
> >> + error_setg(errp,
> >> + "Cannot create type 41 entry for PCI device %s: "
> >> + "not attached to the root bus",
> >> + t41->pcidev);
> >> + return;
> >> + }
> > Is this limitation really necessary?
> >
> > As far as I see caller of this smbios_get_tables(), is called at machine_done time
> > when all devices (including bridges) present on CLI are created.
>
> I wasn't sure how to get the segment group number in this case. It seems
> this is not exposed directly. There is a root_bus_path method returning
> a string that would need to be parsed to extract the segment group
> number. Looking a bit, it seems to be always 0.
> --
> Don't stop with your first draft.
> - The Elements of Programming Style (Kernighan & Plauger)
and not just that. the code comments explains the motivation even
with a single segment.
--
MST
next prev parent reply other threads:[~2021-05-03 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 17:11 [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information) Vincent Bernat
2021-04-30 9:51 ` Vincent Bernat
2021-05-03 15:05 ` Igor Mammedov
2021-05-03 19:34 ` Vincent Bernat
2021-05-03 19:42 ` Michael S. Tsirkin [this message]
2021-05-08 4:20 ` Vincent Bernat
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=20210503154024-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=berrange@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vincent@bernat.ch \
/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.