[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended
From: |
Vincent Bernat |
Subject: |
Re: [PATCH v4] hw/smbios: support for type 41 (onboard devices extended information) |
Date: |
Mon, 03 May 2021 21:34:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
❦ 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)