> Can you speak more to this?
Sure! Regards working out of the box, you'll probably have no luck with that. VFIO is still somewhat of a niche and VFIO on a laptop is a niche of a niche, so you'll need to expect some command line usage and a bit of config file editing. This being said, getting it to work is not too hard and, if you've done VFIO in the past, you should feel right at home.
For the initial setup, you can mostly follow the guide on the arch wiki [0]. You might need to adapt it a bit on ubuntu(-based) systems, but the major points are the same. The only difference to the usual setup is that you need to include an APCI-table [3] to get the laptop driver to work in the VM. This reddit thread [1] describes it quite well. The author of that thread also has a repo [2] where he published his files and on which I based my scripts on. Note that you need the usual CPUID work-around (see the "Error 43" section on the arch vfio page). Also, you'll need an USB C to HDMI/DisplayPort/... cable and a monitor for the initial setup, after that you can use a dummy plug [5] and looking glass (also described on the arch wiki) to use pass through without external monitor. The setup is also very stable for me, with the exception of the looking glass part - if you absolutely depend on the setup, having a monitor handy will save you a bit of headache, but you can always revert to a VM display in the worst case.
Regarding GPU support: It should support all GPU configurations, but you should check reddit etc to be sure. If you're talking about other laptops, the situation is a bit different. The big advantage of the G14 is (1) that the GPU has its own IOMMU group and is therefore easy to isolate and (2) that the display ports are well split between the two GPUs (the HDMI out and the internal display are connected to the AMD iGPU and the USB C DP-channel is connected to the RTX). This is rather rare, but makes setting this up (comparatively) easy. Note that the USB channel of the USB C out is not routed via the GPU, so if you're connected to a docking station, its display ports will be used by the VM, but the USB ports are on the host, still. This, however, comes with the drawback that you can not pass through an USB controller, as the groups for those do not work out. The ACS override patch (see arch wiki) might fix this, but unless you need to use audio interfaces, the "normal" USB redirector will suffice anyway.
Rebooting is semi-required. In order to change from VM to Linux and back, you'll need to [un-]bind the nvidia driver and switch to vfio-pci. Going from Linux to VM is only possible when nothing uses the nvidia driver, which either needs a restart of your display server or only using the iGPU for all apps (quite easy on sway/wayland, haven't tried on X). The reverse should work as well - the author of the reddit threads above has scripts to do so, but this did not work out for me. Leaving the vfio-pci driver for the GPU is not an option either, as this will prevent it from going into the low power state and therefore heat up the laptop and use up the battery. Because of this, I usually simply reboot. In summary, if you don't mind rebooting, having the GPU bound to vfio-pci via kernel parameter on a secondary boot option is by far the easier way :) But it should be possible without, it'll just be a bit of work.
To work with CUDA, you'll need to have the nvidia driver loaded, but you'll want to have that anyway to enable low-power states, as mentioned above. Using only the iGPU for display is possible in combination with CUDA, you'll simply need to stop your CUDA-apps before unbinding the driver. That's actually the setup I use, too :)
Hope this helps!
[0] https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM...
[1] https://www.reddit.com/r/VFIO/comments/hx5j8q/success_with_l...
[2] https://git.deck.sh/shark/g14gpu
[3] Since the original link is down for me: You need the ACPI table [4] and include it like this in the `<domain>`-part:
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/home/cole/vfio/acpitable.bin'/>
</qemu:commandline>
See:
https://git.deck.sh/shark/g14gpu/src/branch/master/win10.xml...[4] https://git.deck.sh/shark/g14gpu/src/branch/master/acpitable...
[5] https://www.amazon.com/gp/product/B086MKR9WH - no affiliation, anything should work