PCIe lanes and pass-through peripherals?

I understand that if you have say a 28 lane max cpu, and three peripherals they will all run 8x8x8 as long as the motherboard supports 28/40 lane. With a 40 lane cpu, you can run 16x8x8.
However, if you were to pass-through a pcie slot to a virtual machine, would that still be count towards the total PCIe lane bandwidth, even when not using the VM?

Edit: I considered posting this in Linux-Helpdesk, but figured it was more hardware related, what with all the talk of pcie lanes.

the pass-through card will still take up lanes as long is it is physically in the slot. some bios's might have option to disable a specific slot, though that would require a reboot to change every time.

afaik there's no way to control things like this from software. when not using the vm the card is usually just put into a powersaving state, though theoretically you could attach and reattach from the vm to host. graphics drivers dont usually allow for this. (works great with audio hardware/nics/usb controllers and such)

1 Like

Your peripherals should be seperate of your hardware occupying the PCI-e lanes,
unless you count a PCI-e device as a peripherals, and the answer is yes then, deffinetly yes.
A VM is basically an extension of your current OS(Imagine a program running, theres no difference from you sys resource pool usage then running Google chrome), regardless of what resources it uses.
Your cpu/mobo doesn't care wether it is a VM, or a real machine using the hardware, the system as a whole will see the usage as a whole, not as a pr. "machine".
So if you have a VM reserving n number of lanes through a piece of kvm passed through hardware. Then n number of lanes are reserved by the system as a whole.

1 Like

@Deathright82
@Lauritzen
Thank you! This exactly what I wanted to know