Hi, yes I've recently started to look into this, igpu shared on a VM with host machine, maybe someone has pointers as there are seemingly options. As VFIO and some other virtual machine engine could do such.
The idea to play on low watts simple RTS games / blender learning < rendering on another maxhine > a F4-424max in VM throughout everywhere on a vnc is funny. As having a remote windows10 available where ever you are as long as internet speed/latency allows.
Some stuff on the net showing,
A VFIO virtual machine uses the Linux kernel's Virtual Function I/O (VFIO) framework to securely pass through physical PCIe devices (like GPUs, network cards) directly to a VM, enabling near-native performance for tasks like gaming or demanding applications, effectively letting Windows games run on Linux with dedicated hardware, while keeping the host system secure. This setup, often involving KVM/QEMU and tools like Virt-Manager, requires isolating devices from the host, assigning them to the VM, installing drivers, and configuring hook scripts for seamless switching between the host and guest OS.
How VFIO Works
PCIe Passthrough: VFIO isolates a device (e.g., a GPU) from the host Linux kernel and gives the virtual machine full control over it, bypassing emulation.
IOMMU: Relies on the Input-Output Memory Management Unit (IOMMU) for hardware isolation, preventing the VM from interfering with the host system.
QEMU/KVM: Used as the hypervisor and virtual machine monitor to manage the hardware and guest OS.
Common Use Cases
Gaming: Running Windows games on a Linux host with full GPU power.
High-Performance Apps: Allowing Linux VMs to use Windows-only software that needs direct hardware access.
Multi-Seat Setups: Enabling multiple users to game or work on one PC using separate VMs and GPUs.
Key Steps for Setup (Simplified)
Hardware Check: Ensure CPU/Motherboard support IOMMU.
Enable IOMMU: In BIOS/UEFI and kernel parameters.
Isolate Devices: Bind the target device (e.g., GPU) to the vfio-pci driver, unbinding it from the host.
Configure VM: Use Virt-Manager to add the PCI device (GPU, audio) to the VM.
Install Drivers: Install GPU drivers inside the guest OS.
Automate (Hooks): Use scripts to automatically detach/attach devices when the VM starts/stops.
Benefits
Near-Native Performance: Direct hardware access eliminates emulation overhead.
Security: Adds a layer of security by running potentially risky applications in a sandboxed VM.
Challenges
Complexity: Setup can be intricate, requiring specific hardware and kernel configurations.
GPU Reset: Some GPUs (especially certain Nvidia consumer cards) can have issues resetting cleanly after VM shutdown.
Source Url ;
https://www.google.com/search?q=vfio+vi ... e&ie=UTF-8