On Mon, Dec 01, 2025 at 06:54:11PM +0000, David Matlack wrote:
> To handle pci=assign-busses, perhaps something like this? Are there any
> other places where the kernel could change busses?

In theory the algorithm to assign bus numbers could change from
one kernel version to the next.  Ilpo (+cc) is currently reworking
the resource allocation algorithm.  That work primarily covers
MMIO window sizing, but bus numbers are resources as well and
could be affected by changes.  Resource allocation code is
already quite convoluted and sprinkling liveupdate special cases
all over it may not be received with enthusiasm. ;)

Of course in practice, changes to the algorithm do not happen often
and the kernel will preserve bus numbers as set by BIOS.  Only if it
detects incorrect bus assignments or if forced via the command line
will the kernel re-assign bus numbers.

But you do gain a bit of reliability if you don't assume bus numbers
to stay the same and instead use the "path from root" approach to
identify devices.

Thanks,

Lukas

Reply via email to