Hi Erin, thanks for your question. On Fri, Aug 23, 2024 at 08:51:58PM +0200, Martin Mareš wrote: > Hi! > > > This is Erin from Taiwan. I have a question about physical slot > > number. Currently we are working on the PCIE slot number > > assigning by PCIE switch. In the PCIe slot assignment process, the > > slot numbers are assigned to bridges first, and then the end > > devices fetch the slot ID from the bridge in the upper layer. > > > > I have observed that under our PCIE switch, GPUs will create a > > bridge before reaching the end device. If GPUs also fetch the slot > > ID from the upper bridge layer, they may retrieve incorrect > > values. > > > > Our GPU will get the physical slot number with number “0”, and > > show the slot number “0”、”0-1” , etc. > > May I ask > > > > 1. Why GPU will fetch the slot number “0”? Is the slot number > > assigned to GPU related to any register? Or can we set any bit > > to fetch the right number? > > > > 2. Is there any possible for us not to show the physical slot > > number of GPU? Can you supply logs showing what you see and what's incorrect? For example, if lspci is showing the wrong thing, can you provide the complete output of "sudo lspci -vv" and indicate which things are wrong? If the kernel dmesg log is wrong, can you supply that output and point out what's wrong? Also, I think slots are exposed in /sys, so please include the output of "grep . /sys/bus/pci/slots/*/address". Slot numbering is messy because there are several sources of information, e.g., the Physical Slot Number in the Slot Capabilities register, SMBIOS table, ACPI _DSM methods, etc., and they are not all coordinated. So the kernel goes to some trouble to come up with a unique "slot number" for each slot. Bjorn