System on laptop hangs *without* the docking station

Environment:
Up to date R4.2, kernel 6.6.63, fedora-40 for most templates.
Hardware is Dell Latitude 7490, docking station is a Thunderbolt 4 Lenovo 40B0 series.
sys-usb is disposable, has only laptop’s USB controller passed.
I cloned sys-usb to sys-usb-dock, set it to not be started on boot, and removed laptop’s USB controller, and added dock’s USB controller.

Issue:
I start the laptop with docking station plugged in. I need to start the sys-usb-dock manually (without it the keyboard and mouse seem to be available in dom0 directly), and need to attach the ethernet from dock to sys-net since it’s presented as a USB device. All of that works, and so do the USB devices connected to the dock, and the two monitors.
Problems start without the dock. Even with ethernet unshared from sys-net, and with sys-dock-usb shut down, disconnecting the dock results in system completely freezing after seemingly random amount of time. What’s more confusing, when booting up without the dock connected, system also freezes after a random amount of time - sometimes before the login screen comes up, sometimes a while after logging in and starting some VMs.

For the first part I would start asking about recompiling the kernel with enabled hotplug, but the second part completely baffles me. Any ideas, suggestions, ways to debug this?

This doesn’t sound like a kernel issue directly. It sounds more like Xen not passing things through correctly…

This sort of system freeze occurs when Xen tries to do something with PCI devices, and they don’t “play nice” (don’t get reset properly, don’t like being reset, get only partially passed through, etc.)

What is the output of lspci in dom0 when you have the dock connected, and when it’s not connected?

Do the outputs of dmesg say anything interesting when your system freezes?