[TRACKING] How to route right side thunderbolt 4 ports to a virtual machine?

In the body of your post, please include those following details.

  • Which OS (Operating System)?
  • Which release of your OS (Operating System)? Fedora Workstation 37 kde spin
  • Framework laptop 12th generation i7 1280p

Hello all, I am attempting to create a windows virtual machine and route the right side bank of thunderbolt 4 ports directly into the virtual machine. it will house my egpu so I’m hoping for like native performance but still keep linux as my primary OS. Unfortunately I am not that familiar with Virtual Machine Manager and how to do this.

I suppose the first question I need to confirm is what is the pci device id that controls the right side thunderbolt 4 ports? I think it must be one of these three:

00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 02) (prog-if 00 [Normal decode])
	Subsystem: Device f111:0002
	Flags: bus master, fast devsel, latency 0, IRQ 122, IOMMU group 3
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: [disabled] [16-bit]
	Memory behind bridge: 7a300000-7a3fffff [size=1M] [32-bit]
	Prefetchable memory behind bridge: [disabled] [64-bit]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 02) (prog-if 00 [Normal decode])
	Subsystem: Device f111:0002
	Flags: bus master, fast devsel, latency 0, IRQ 123, IOMMU group 4
	Bus: primary=00, secondary=02, subordinate=2c, sec-latency=0
	I/O behind bridge: 3000-3fff [size=4K] [16-bit]
	Memory behind bridge: 52000000-5e2fffff [size=195M] [32-bit]
	Prefetchable memory behind bridge: 6000000000-602fffffff [size=768M] [32-bit]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:07.1 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 (rev 02) (prog-if 00 [Normal decode])
	Subsystem: Device f111:0002
	Flags: bus master, fast devsel, latency 0, IRQ 124, IOMMU group 5
	Bus: primary=00, secondary=2d, subordinate=55, sec-latency=0
	I/O behind bridge: 5000-5fff [size=4K] [16-bit]
	Memory behind bridge: 7c000000-881fffff [size=194M] [32-bit]
	Prefetchable memory behind bridge: 6030000000-604bffffff [size=448M] [32-bit]
	Capabilities: <access denied>
	Kernel driver in use: pcieport

I’ve done quite a bit of trial and error following this guide:

specifically for these two commands:
virsh nodedev-list --tree

virsh nodedev-dettach pci_

but without success… so i’d like to take a step back and see if you all can help me positively identify the pcie device id to start with. I know the general steps I need to follow are the following:
add the pci device to a blacklist so it doesn’t get loaded on boot
assign to a virtual machine
boot up

Your help is much appreciated =) I’m very excited to play diablo 4 but am having trouble with crashes during lutris.

I think I have made some progress. By running the following three commands:
virsh nodedev-detach pci_0000_00_0d_0
virsh nodedev-detach pci_0000_00_0d_2
virsh nodedev-detach pci_0000_00_0d_3

I was able to remove the right side ports. I also added them to my VM and it took them once I added all three of them.

My next challenge seems to be getting the windows 11 VM to recognize them. It shows two Usb controllers with device errors that might be the two thunderbolt 4 ports but windows doesn’t seem to find the drivers for them =/ I wonder if the framework drivers would help in this case… well the driver bundle won’t install. hmm. I think I am stuck at this point.

Not something I have time to explore in-depth right now, so I am tracking this in case the community has some thoughts. Passthru to a VM for TB has not been explored by me yet.

I haven’t made any progress getting this working. So for now I can only play on the steamdeck.