r/VFIO • u/kromerless • 2d ago
Someone found a fix for VFIO NULL pointer dereference on VM shutdowns
r/VFIO • u/MacGyverNL • Mar 21 '21
TL;DR: Put some effort into your support requests. If you already feel like reading this post takes too much time, you probably shouldn't join our little VFIO cult because ho boy are you in for a ride.
A popular youtuber made a video showing everyone they can run Valorant in a VM and lots of people want to jump on the bandwagon without first carefully considering the pros and cons of VM gaming, and without wanting to read all the documentation out there on the Arch wiki and other written resources. You're one of those people. That's okay.
You go ahead and start setting up a VM, replicating the precise steps of some other youtuber and at some point hit an issue that you don't know how to resolve because you don't understand all the moving parts of this system. Even this is okay.
But then you come in here and you write a support request that contains as much information as the following sentence: "I don't understand any of this. Help." This is not okay. Online support communities burn out on this type of thing and we're not a large community. And the odds of anyone actually helping you when you do this are slim to none.
Bite the bullet and start reading. I'm sorry, but even though KVM/Qemu/Libvirt has come a long way since I started using it, it's still far from a turnkey solution that "just works" on everyone's systems. If it doesn't work, and you don't understand the system you're setting up, the odds of getting it to run are slim to none.
Youtube tutorial videos inevitably skip some steps because the person making the video hasn't hit a certain problem, has different hardware, whatever. Written resources are the thing you're going to need. This shouldn't be hard to accept; after all, you're asking for help on a text-based medium. If you cannot accept this, you probably should give up on running Windows with GPU passthrough in a VM.
Think a bit about the following question: If you're not already a bit familiar with how Linux works, do you feel like learning that and setting up a pretty complex VM system on top of it at the same time? This will take time and effort. If you've never actually used Linux before, start by running it in a VM on Windows, or dual-boot for a while, maybe a few months. Get acquainted with it, so that you understand at a basic level e.g. the permission system with different users, the audio system, etc.
You're going to need a basic understanding of this to troubleshoot. And most people won't have the patience to teach you while trying to help you get a VM up and running. Consider this a "You must be this tall to ride"-sign.
When asking for help, answer three questions in your post:
For the first, you can always start with a description of steps you took, from start to finish. Don't point us to a video and expect us to watch it; for one thing, that takes time, for another, we have no way of knowing whether you've actually followed all the steps the way we think you might have. Also provide the command line you're starting qemu with, your libvirt XML, etc. The config, basically.
For the second, don't say something "doesn't work". Describe where in the boot sequence of the VM things go awry. Libvirt and Qemu give exact errors; give us the errors, pasted verbatim. Get them from your system log, or from libvirt's error dialog, whatever. Be extensive in your description and don't expect us to fish for the information.
For the third, this may seem silly ("I expected a working VM!") but you should be a bit more detailed in this. Make clear what goal you have, what particular problem you're trying to address. To understand why, consider this problem description: "I put a banana in my car's exhaust, and now my car won't start." To anyone reading this the answer is obviously "Yeah duh, that's what happens when you put a banana in your exhaust." But why did they put a banana in their exhaust? What did they want to achieve? We can remove the banana from the exhaust but then they're no closer to the actual goal they had.
I'm saying to consider and accept that the technology you want to use isn't "mature for mainstream". You're consciously stepping out of the mainstream, and you'll simply need to put some effort in. The choice you're making commits you to spending time on getting your system to work, and learning how it works. If you can accept that, welcome! If not, however, you probably should stick to dual-booting.
r/VFIO • u/kromerless • 2d ago
Wise Linux Studio v1.1.2 is now available. It is an open-source Bash and Python GUI utility designed to automate VFIO / GPU passthrough configuration across Fedora**,** Ubuntu/Debian (and derivatives), and Arch Linux (and derivatives).
Following earlier feedback from this community, all references to anti-cheat compatibility or VM stealth have been removed from the project scope. Wise Linux Studio does not attempt to bypass kernel-level anti-cheat systems. It is strictly intended for workstation and creative workflows (Adobe Creative Cloud, Microsoft Office, 3D applications) as well as games that do not enforce VM bans.
Recent updates focused on hardening the hardware detection, bootloader, and initramfs stages:
* Read-Only Hardware Gatekeeper (`gpu_detect.sh`):
* Duplicate PCI ID Collision Lock: Scans all PCI devices outside the candidate slot for matching `vendor:device` pairs (including companion audio functions). Because `vfio-pci.ids=` binds globally by PCI ID rather than slot, systems with identical dual GPUs are blocked rather than allowing `boot_vga` to be captured.
* Fail-Closed Classification: Replaced the AMD integrated GPU blacklist with an explicit discrete-family allowlist so unlisted or newer AMD APUs are rejected by default. Missing or unreadable `lspci` output now fails closed instead of falling back to an unclassified state.
* Topology Checks: Enforces IOMMU group isolation across all slot functions (permitting `0x0604` PCI bridges) and handles Optimus `3D controller` nodes lacking a `boot_vga` attribute.
* Testable Sysfs Root: Added `WISE_SYSFS_ROOT` (defaulting to `/sys`) for deterministic unit testing against synthetic PCI/IOMMU trees.
* GRUB & IOMMU Configuration (`grub_setup.sh`, `iommu_enable.sh`):
* Replaced regex-based `sed` manipulation with `IFS`-safe, glob-safe word-based parameter filtering to prevent adjacent kernel arguments from concatenating.
* Added post-write whole-word verification against `/etc/default/grub`; any missing or altered original parameter triggers an automatic rollback from backup.
* Initramfs Management (`initramfs_setup.sh`):
* Saves a pre-rebuild snapshot of the running kernel's initramfs image and replaces silent rollback commands with explicit status checks, image restoration fallback, and critical recovery warnings.
* Resolves Arch Linux kernel images via `/usr/lib/modules/$(uname -r)/pkgbase` (`linux-lts`, `linux-zen`, etc.) instead of wildcard matching.
* Enforces non-silent `vfio-pci` presence verification across `dracut`, `initramfs-tools`, and `mkinitcpio`, with explicit warnings on UKI or non-standard boot layouts.
* Fedora: Tested on bare metal, including read-only detection and `--dry-run` workflows.
* Ubuntu/Debian & Arch Linux: Verified via syntax validation and isolated synthetic test harnesses (`WISE_SYSFS_ROOT`, mock GRUB, and mock initramfs rollback suites). Bare-metal validation across additional distributions and hardware topologies is currently ongoing.
* Non-Destructive Inspection: `./gpu_detect.sh` operates strictly read-only, and `--dry-run` mode allows inspecting planned operations without modifying system files.
https://github.com/t11man/Wise-Linux-studio
Technical code reviews, bug reports, and read-only `./gpu_detect.sh` outputs from multi-GPU, Optimus, or AMD APU configurations on Arch and Debian/Ubuntu are welcome via GitHub Issues or in the comments.
r/VFIO • u/nathannguyennng • 6d ago
Update (Dec 03, 2026): geforce-sriov v0.6.0 now cracked ARI decoding for Ampere and Ada, so they can have up to 32 VFs, as with Blackwell. MIG and Universal MIG are supported for Blackwell.
I just released geforce-sriov 0.5.0, and I'm happy to share that Blackwell is now supported, with both Windows and Linux guests working.
To recap, geforce-sriov is a free and open-source project that enables SR-IOV-based NVIDIA vGPU on consumer GPUs, allowing multiple Windows and Linux VMs to share a single physical GPU while the host can continue using it.
Unlike Ampere and Ada, Blackwell actually decodes extended ARI function numbers, so we're no longer limited to 4 VFs per GPU. The project now supports up to 16 VFs on Blackwell, depending on VRAM and available PCIe resources.
There have also been quite a few improvements since my last post:
Documentation, including installation, troubleshooting, performance benchmarks and technical details, has also been substantially rewritten.
As always, geforce-sriov is completely free and open source. Everything is software-only and reversible. No VBIOS flashing or firmware modifications are required. You'll still need to obtain NVIDIA's vGPU software and licenses separately.
GitHub: https://github.com/noon-at-cgn/geforce-sriov
I'd appreciate compatibility reports as I have limited hardware to test with.
Thanks to everyone who has tested the project and provided feedback!
r/VFIO • u/Expensive_Sun_7646 • 6d ago
r/VFIO • u/Zealousideal_Pen8617 • 9d ago
r/VFIO • u/Public-Net-8864 • 11d ago
r/VFIO • u/More-Mess-4324 • 11d ago
r/VFIO • u/TheHighSeas-Argghh • 11d ago
Running an ubuntu VM on my ubuntu machine.
Fired up minecraft Fabric (via prismlauncher) with iris and sodium.
added MakeUp Ultrafast shaders, and this weird thing started happening (see video)
I am passing through a Quadro K4200, I do believe I am using Noavue drivers (however you spell it ig)
If you need the VM's XML settings, I will gladly send it your way.
r/VFIO • u/KstrlWorks • 15d ago
You ever wonder why your AMD GPU boots fine as your main display card, but the moment you move it to a VM you hit black screens, code 43, hangs, lspci telling you your card is revision ff, and only a full host reboot brings it back? Ask about it anywhere and somebody will tell you it's the AMD reset bug. Maybe. But most people do not have a reset bug at all, they have one of several problems that look identical from outside the case.
Reset gap: the card holds state that nothing in the PCIe reset path can see or clear. Every consumer AMD card from Polaris on has this, the RX 9000 included.
Reset bug: the gap, plus AMD's own driver being unable to bring the card back, leaving custom code or a full power cycle as the only ways out.
When the driver binds it loads firmware into two small processors on the card, the PSP and the SMU, and when it unbinds nothing clears them. The only reset Linux gets on an RX 5000 (which I'll use for this example but the same logic applies to the other RDNA cards) is a Secondary Bus Reset, the top diagram. The bridge drops the link, config space gets cleared, the card's PCIe front end comes back up and reports that it worked. It never goes near Region 5, the BAR where the PSP and SMU mailboxes live, so your next guest inherits whatever the last driver left running.
AMD's real reset is mode1, the bottom diagram, a single command left in the PSP's mailbox. Only a driver that has mapped Region 5 can send it, which means amdgpu or vendor-reset. vfio-pci knows nothing about graphics hardware, so it never will.
amdgpu resets the card when it binds, not when it unbinds, so on most cards a dirty GPU gets cleaned up just by binding it back to amdgpu. On the RX 5000 that reset goes through the PSP, and amdgpu waits for the PSP to say it's ready before sending it. If the PSP has gone quiet you get psp is not working correctly before mode1 reset! then asic reset on init failed, and the driver never attaches. No retry, no fallback.
Every generation since moved the reset further from that problem:
| Card | Mode1 goes to | Checked before sending |
|---|---|---|
| RX 5000 | the PSP mailbox | PSP ready |
| RX 6000 | the SMU mailbox | PM firmware 58.26, PSP alive |
| RX 7000 and RX 9000 | the SMU debug mailbox | nothing |
amdgpu refuses. It also blocks the bus reset that knocks these cards off the bus. Its udev rule writes device_specific to the GPU's reset_method so the kernel actually uses it.amdgpu and unbind it again before starting the VM, which gets you the reset for free.AMD is technically fully compliant with everything they're supposed to do. If you've done any compliance work you're quite aware of what I mean, i.e. the spirit of the law vs the word of the law. The spec defines what a reset has to do and AMD's PCIe front end does all of it. What the spec never explicitly writes down is the two processors sat behind that front end still holding the last owner's firmware. Which leaves two ways out. FLR is optional, but AMD left the bit clear. Or the kernel's own quirk table, which is where Intel, Samsung, and Qualcomm put devices that need special handling. There's a working reset on the card, it's just not one other than amdgpu can call.
So I tried to keep this higher level since I wanted people to understand, and kept the full version here. I realized when the post is too long no one reads it, and that kinda negates the entire point of it. Oh the States you'll go to: The AMD Reset Bug and Everything It Isn't
r/VFIO • u/Public-Net-8864 • 14d ago
Hey, check this out…
r/VFIO • u/OfficalFAK • 16d ago
Nvidia has actively tried to keep enterprise features locked behind its premium cards for the longest time. However, a few years ago, they gave us a straightforward way to pass through their GPUs to VMs without running into the infamous reset bug.
If Nvidia can do it, why is AMD so stubborn about it? My RX 9070 XT has been an absolute pain to get working reliably in a VM. I've pretty much given up on GPU passthrough, whereas my GTX 1070 Ti ran flawlessly for almost two years with virtually no issues.
This is very disappointing as the Rx 9070 XT is a 3 slot card, making it impossible for me to add the secondary GPU to my computer. So my only options are to either look for a single slot Quadro or change my computer case.
UPDATE:
After hearing all you guys saying that it is possible, i did try again and got everything working soo far, i dont know how stable the setup will be but for now, its working, ill share the full config soon after ive tested it a few weeks.
r/VFIO • u/Opening_Nature_2904 • 17d ago
r/VFIO • u/Zestyclose_Dig8916 • 19d ago
vmdb.it is my site, so full disclosure right away. It collects compatibility reports for gaming in virtual machines, VMware, VirtualBox, QEMU/KVM, Hyper-V, Parallels, and it also takes regular Proton reports for the same games. The VM part exists because the question "will this game's anti-cheat ban me if I run it in a VM" comes up constantly and the answers are scattered across dead forum threads.
Reports are anonymous, no account needed, takes a few minutes. There's also a My Setup thing where you store your hardware/VM/Proton config in your own browser storage. Reports matching your setup get sorted first and the report form pre-fills from it, so the second report is mostly clicking submit.
Anyway, the actual reason for the post: coverage is thin and it's not growing on its own. Pulled these from the API a few minutes ago:
\- Crimson Desert Enhanced: 0 reports. It's also one of the most searched games on the site right now.
\- Bodycam: 0
\- Marathon: 0
\- CoD Modern Warfare 4: 1 VM report, 0 Proton
\- Forza Horizon 6: 3 VM reports, 0 Proton
If you run any of these in a VM or through Proton, a report takes like five minutes and the next person who searches the game gets an actual answer instead of an empty page. Same goes for anything else you play of course, those are just the gaps people keep hitting.
And if you ran a game in a VM and got banned by anti-cheat, please write that up too. That's data that basically doesn't exist anywhere else.
The API is public and read-only if you'd rather script against it: API docs
If you think the whole idea is dumb or something on the site is broken, I want to hear that too.
r/VFIO • u/Public-Net-8864 • 18d ago
My earlier post was done using Qwen2.5 and rightly so I was called out for it. So I reran it with Qwen3.8 27B, Qwen3.5 9B and Qwen3.6 35B-A3B with as much proof as I could think of. The VM has no NVIDIA device, driver or nvidia-smi. llama.cpp's CUDA calls go through VMAT to the card on the host. Qwen3.8 27B: 45.4 tokens/s on the host, 44.6 in the VM. All four models land at 98%. Three VMs at once get 45.7 together, against 45.0 for three programs on the host.
Once I get my hands on Qwen4, I’ll post another video based on it…
Full video with every step: https://youtu.be/r6yhOVWxP5Y?is=reuv6gZptnDNzU1D
r/VFIO • u/BubblyZebra616 • 21d ago
Specs: OS: Proxmox CPU: Ryzen 9 5900x MOBO: Gigabyte X570 Aorus Master GPU1: Gigabyte Radeon RX 9070 XT GAMING OC 16G GPU2: RTX 3070 ti GPU3: RX 6400 (used for host) RAM: 64GB DDR4 (F4-3200C16D-64GVK)
I have yet to assemble this system but I have some of these parts on the way to complete a new build. I want to pass through the 9070 XT to a CachyOS VM. I have seem some people have successfully done this with a Windows VM but not Linux. Has anyone does this?
r/VFIO • u/programmed_insanity • 21d ago
A year ago I posted about my dynamic GPU passthrough setup for which I wrote a overengineered program to manage and streamline all that. At the time I didn't release it because I didn't think it was robust enough. After a year of using it I only had to add some extra logging or fix parsing. At one point I just started to forget it even existed because I never had any problems with it. So now I think it is somewhat robust enough to be used but I make no promises after all this was made only for one machine and never tested on anything else. The code is here.
So instead of moving scripts around you just add a bit of xml to your VM config. For example this bit of xml for the pci device 0000:0a:00.0. Which tells the hook to unbind from kwin, kill all the processes, unload the nvidia driver and load the vfio driver.
<dyn:dynamic_unbind xmlns:dyn="0.0.0.0">
<pci_device domain="0x0000" bus="0x0a" slot="0x00" function="0x0" driver_finder_on_shutdown_method="store"/>
</dyn:dynamic_unbind>r/VFIO • u/BrazilianAnimal • 22d ago
With Nvidia in the news this week, I want to tell an old story about how I believe this company treats its customers.
In 2021 I had a laptop with a GeForce GTX 1650 and wanted to pass the discrete GPU through to a Xen guest to run KataGo. Nothing exotic: my hardware, my hypervisor, Nvidia's own official Linux driver in the guest.
It didn't work. The driver failed with an error about PCI BARs. So I did what anyone would do and treated it as a real BAR problem. I spent between one and two weeks on firmware settings, kernel parameters and Xen configuration. None of it helped, because none of it was the problem.
Eventually I asked myself a different question: if Nvidia wanted to stop this from working on purpose, what is the laziest way they could do it? Answer: compare the hypervisor's CPUID signature against a hardcoded string.
So I ran the strings command on the driver binary, and there it was: XenVMMXenVMM, Xen's CPUID signature. I changed it to something random of the same size.
The GPU worked immediately. Same hardware, same BARs, same everything.
I never saw the source code (it was not publicly available), so this is inference, but the experiment is hard to read any other way: the driver detects Xen and refuses to run, and it reports the refusal as a hardware fault. Not "GeForce is not supported in virtual machines", which would at least have been honest and saved me over a week. A fake error that sends you debugging something that isn't broken.
I learned afterwards that this was the Linux/Xen face of a well-known error that people had been fighting when trying to pass Nvidia GPUs to guests. This points to driver code deliberately made to fail, with a misleading message. In my opinion, the reason was to push virtualisation users to Quadro cards with similar silicon at several times the price.
They dropped the check later, and from then on the GPU ran without patching their driver with a hex editor.
The moral, for me: a company that will lie to you in an error message has zero ethics. They didn't then, I see no reason to believe they do now, and nothing they ship should be trusted further than what you can verify yourself. Which, with a closed driver, is not very far.
Note: I was just a hobbyist Go player trying to take a break at the time; I did not keep any logs with the specific Xen, Linux and Nvidia driver versions.
r/VFIO • u/Local_Cobbler_8974 • 21d ago
Has anyone been able to get EveNG to work on Apple Silicon M1 Pro? If so would you mind explaining how you got it to work?
r/VFIO • u/LurkingWithoutEyes • 25d ago
Hey, a while back I posted about getting Hyper-V style GPU-PV working on KVM. The VM runs the real Windows driver and the host keeps the card, so my desktop stays on it the whole time.
Since then I've rewritten it all in Rust, made an app that installs Windows from an ISO by itself in about 9 minutes, and got AMD working. Windows guests run AMD's own driver now, and on my Ryzen's iGPU the desktop, D3D11, D3D12, Vulkan and OpenGL all work. Video decode doesn't yet. Linux guests on AMD work too.
The problem is I've only got my 5090 and that iGPU, and one tester has run it on a 4080. So I'm looking for people with:
You need the open NVIDIA kernel modules or amdgpu on the host. If your card isn't supported, it still installs with plain VMs and tells you why.
Obviously this project is experimental. My point in working on it is to prove that Linux can run GPU VMs. Since no one had ever built a tool like this, I always thought it wasn't really possible, so here we are.
My goal is to support as many GPUs as I can so more people can try it, but I won't be able to manage this project solo.
Repo: https://github.com/xnixy/guesthouse
AMD reports go in #1 and NVIDIA ones in #9, or just reply here.
Edit: Thanks everyone for helping! We made a lot of progress with your help.
r/VFIO • u/protienbudspromax • 25d ago
So my system config is 9900X, 5070ti, 32g ddr5.
I have managed to pass through the igpu of the 9900X and get it binded to a windows VM when I start via qemu/virt-manager. But thing is it seems that once it starts if i shut it down i cannot restart the VM with the gpu still being loaded. I need to reboot my host. (Code 43)
My main job in windows is dev related for windows native stuff. So it works out relatively fine. But i was wondering if I am missing something and this issue is resolved now already.
In case it cant be done was wondering what low powered gpu i should get, cgpt and claude gave mixed answers wrt amd vs nvidia, says rdna 1 cards also have similar issues rdna2 may be better but not sure. I was eyeing the RX 6500 as its cheap enough will solve my problem and can be used without changing my psu (corsair 850w) . So should i bite the bullet and get that 2nd gpu or are there options i can use?