qemu-devel
[Top][All Lists]
Advanced

[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: Sat, 08 May 2021 06:20:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

 ❦  3 mai 2021 15:42 -04, Michael S. Tsirkin:

>> >> +            /*
>> >> +             * 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.
>
> and not just that. the code comments explains the motivation even
> with a single segment.

Yes, now I remember you told me that in complex cases, the bus is
configured by guest and therefore, we cannot get the right address at
boot. I could update the comment to say "enumerated by guest" or
"configured by guest" if it makes the reason clearer.
-- 
Suspicion always haunts the guilty mind.
                -- Wm. Shakespeare



reply via email to

[Prev in Thread] Current Thread [Next in Thread]