Is the "Fedora 33: Ultimiate VFIO Guide" still relevant in late 2025?

Hi everyone,

First post. Long time fan of the YT channel.

Basically title. Does this guide still mostly work on newer versions of Fedora?

Fedora 33: Ultimiate VFIO Guide

I’m running Fedora 43 with two identical radeon 6700XT’s and I want to pass one through to a Windows 11 VM on virt-manager.

I’ve tried other guides and have been unsuccessful so when I found this guide I was very excited, I just want to make sure it’s viable first.

I appreciate any info or advice you guys can give.

Thanks!

if its not and you let me know where you’re stumbling maybe I would have time to work on it/update it this weekend

2 Likes

Awesome! I’ll give it a shot. Thank you!

So I followed the guide and didn’t seem to get hung up anywhere.

However, after rebooting, the VFIO drivers aren’t bound to the target GPU.

I noticed the “sanity check” command doesn’t return exactly the same output that you showed and I’m wondering if that might be the issue.

sudo lsinitrd | grep vfio

returns the following output…

-rwxr-xr-x 1 root root 171 Oct 13 20:00 usr/bin/vfio-pci-override.sh
drwxr-xr-x 2 root root 0 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio
drwxr-xr-x 2 root root 0 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio/pci
-rw-r–r-- 1 root root 54860 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio/pci/vfio-pci-core.ko.xz
-rw-r–r-- 1 root root 18824 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio/pci/vfio-pci.ko.xz
-rw-r–r-- 1 root root 32736 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio/vfio_iommu_type1.ko.xz
-rw-r–r-- 1 root root 44716 Oct 13 20:00 usr/lib/modules/6.17.10-300.fc43.x86_64/kernel/drivers/vfio/vfio.ko.xz
rd.driver.pre=vfio
rd.driver.pre=vfio_pci
rd.driver.pre=vfio_iommu_type1

I’m missing etc/modprobe.d/vfio.conf but I don’t know what belongs in that .conf file to make it myself and I don’t see it listed as a step in the guide. I’ll go through the steps I followed and my results for each one below.


Made and ran the IOMMU bash script. Appeared successful but no specific output after completion.

sudo mesg | grep -i -e IOMMU | grep enabled Seemed to work but no specific output.

sudo dnf reinstall kernel kernal reinstalled but I got an error on the “grub2-editenv list”. I didn’t know if it was specifically important so I moved on.

Sudo dnf install @virtualization installed successfully.

Added amd_iommu=on rd.driver.pre=vfio-pci to GRUB_CMDLINE_LINUX. Successful

lspci -vnn and found my card pci info.

26:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:2331]
Flags: bus master, fast devsel, latency 0, IRQ 97, IOMMU group 26
Memory at 7800000000 (64-bit, prefetchable) [size=16G]
Memory at 7c00000000 (64-bit, prefetchable) [size=256M]
I/O ports at e000 [size=256]
Memory at fc000000 (32-bit, non-prefetchable) [size=1M]
Expansion ROM at fc100000 [disabled] [size=128K]
Capabilities:
Kernel driver in use: amdgpu
Kernel modules: amdgpu

26:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller [1002:ab28] (prog-if 00 [HDA compatible])
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21/23 HDMI/DP Audio Controller [1002:ab28]
Flags: bus master, fast devsel, latency 0, IRQ 119, IOMMU group 27
Memory at fc120000 (32-bit, non-prefetchable) [size=16K]
Capabilities:
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

Made /usr/sbin/vfio-pci-override.sh with the following contents…

#!/bin/sh
PREREQS=“”
DEVS=“0000:26:00.0 0000:26:00.1”

for DEV in $DEVS; do
echo “vfio-pci” > /sys/bus/pci/devices/$DEV/driver_override
done

modprobe -i vfio-pci

mkdir /usr/lib/dracut/modules.d/20vfio Successful

Made /usr/lib/dracut/modules.d/module-setup.sh with the following contents… DIDN’T RUN IT, BUT ASSUMED I NEEDED TO MAKE IT EXECUTABLE AS WELL ALTHOUGH THE GUIDE DIDN’T REQUEST IT.

#!/usr/bin/bash
check() {
return 0
}
depends() {
return 0
}
install() {
declare moddir=${moddir}
inst_hook pre-udev 00 “$moddir/vfio-pci-override.sh”
}

ln -s /usr/sbin/vfio-pci-override.sh /usr/lib/dracut/modules.d/30vfio/vfio-pci-override.sh Successful

/etc/dracut.conf.d/vfio.conf with the following contents…

dd_dracutmodules+=" vfio "
force_drivers+=" vfio vfio-pci vfio_iommu_type1 "
install_items=“/usr/sbin/vfio-pci-override.sh /usr/bin/find /usr/bin/dirname”

dracut -fv Successful

sudo lsinitrd | grep vfio etc/modprobe.d/vfio.conf is missing from the output for some reason. Not sure if it needs to be manually created or just already exist from the VFIO install.


I tried to give as clear of a pictures as possible. Sorry if this is confusing. I can change it if so.

if you do ls
/sys/bus/pci/devices/$DEV/

does it look reasonable?

where $dev is the device if you put in the file?

returns the following…

user@fedora:~$ ls /sys/bus/pci/devices/$DEV/

0000:00:00.0 0000:00:04.0 0000:00:18.0 0000:01:00.0 0000:21:0a.0 0000:2a:00.0 0000:2f:00.1
0000:00:00.2 0000:00:05.0 0000:00:18.1 0000:20:00.0 0000:23:00.0 0000:2a:00.1 0000:30:00.0
0000:00:01.0 0000:00:07.0 0000:00:18.2 0000:21:01.0 0000:24:00.0 0000:2a:00.3 0000:31:00.0
0000:00:01.1 0000:00:07.1 0000:00:18.3 0000:21:02.0 0000:25:00.0 0000:2b:00.0 0000:31:00.3
0000:00:01.2 0000:00:08.0 0000:00:18.4 0000:21:05.0 0000:26:00.0 0000:2c:00.0 0000:31:00.4
0000:00:02.0 0000:00:08.1 0000:00:18.5 0000:21:06.0 0000:26:00.1 0000:2d:00.0
0000:00:03.0 0000:00:14.0 0000:00:18.6 0000:21:08.0 0000:27:00.0 0000:2e:00.0
0000:00:03.1 0000:00:14.3 0000:00:18.7 0000:21:09.0 0000:28:00.0 0000:2f:00.0

I mean it looks reasonable to me. But this is also the first time I’m even looking at a readout of all the PCI devices on my computer lol.

The video card I’m trying to passthrough is on 0000:26:00.0 and 0000:26:00.1

Here’s how my vfio-pci-override.sh looks…

#!/bin/sh
PREREQS=“”
DEVS=“0000:26:00.0 0000:26:00.1”

for DEV in $DEVS; do
echo “vfio-pci” > /sys/bus/pci/devices/$DEV/driver_override
done

modprobe -i vfio-pci

All of that appears correct to me.

look in those dots and cat driver and manually run the script to see if it changes the driver. wonder if we need to blacklist the driver binding to those cards

I don’t honestly know what that means. :sweat_smile:

I’m probably just going to admit defeat on this for now. This seems just a bit over my head. I’ve been at this for more then a week with no luck with other guides and LLM prompting. “vibe passthrough” :joy:

I’ve gotten the passthrough to “work” once or twice meaning the VFIO driver would bind to the GPU, but it never quite wants to actually work with the VM’s. There always seem to be some “hiccup”.

I was just hoping to get a VM I could play BF6 on.

Been daily driving Fedora linux for two years now and I despise having to boot into my windows drive just to play BF6. Otherwise, I don’t boot into windows for anything anymore and I love it.

Now I don’t know what to do with this other card I got my hands on :melting_face:

ls /sys/bus/pci/devices/0000;26.01 (or whatever)

and

cat ls /sys/bus/pci/devices/0000:26.0/driver

then you could use echo and echo into driver_override like the script does?

I feel like you’re pretty close so preserve this until I could setup and follow along

What is the reason to deal with this whole override stuff? Do both GPUs have the same ID pr why all the hassle?

I usually do a simple grubby command to define which devices the vfio-pci driver should load for.

grubby --update-kernel=ALL --args="iommu=pt vfio-pci.ids=10de:2bb1,10de:22e8"

Like so for example.

Then add the following to /etc/dracut/conf.d/10-vfio.conf:

force_drivers+=" vfio_pci vfio vfio_iommu_type1 "

and then regenrate the initramfs:

dracut -f -v --regenerate-all

use case is two same gpus but only wanna bind one. can’t use pcie id in thast case. helping someone with that exact thing …two 6700s

2 Likes

Ah I understand, then that makes sense.