@gregkh @sima Some more questions:
- Which entry in sysfs correspond to physical (as opposed to logical) topology? Is it the path under /sys/devices?
- How can I go from this path to a PCI bus/slot/function?
- Will this path change when other cards are added or removed or if the system firmware is updated?
- Is there a way for driver probing to be deferred until after userspace can check the device against the actual topology of the machine? That would allow checking if the device that claims to be a serial port in slot X is actually supposed to be a serial port, or if it is a GPU passed through to a VM that the VM compromised and is now pretending to be a serial console. In the latter case the device would never be allowed to be used except for passthrough.