Virt_use_sysfs selinux boolean missing in Fedora 41

I’m trying to get PCI Passthrough working on Fedora 41 without disabling SELinux, but it looks like the virt_use_sysfs boolean has been removed, and most guides say I need to set this to on.

The error messages I’m getting suggest I need libvirt/kvm to have access to sysfs to pass through my usb controller and gpu too. Passthrough works fine with SELinux turned off, but I don’t want to leave it off.

Does anyone know why this boolean is missing on Fedora 41, if there’s a package or something I could install to get it back, or if there’s a better way to make this work?

Enable SELinux in permissive mode and restore filesystem labels.
Collect the denials if any to generate a custom module policy:

journalctl -b _AUDIT_TYPE_NAME=AVC | audit2allow -m local

audit2allow | policycoreutils-python-utils Commands | Man Pages | ManKier

thanks, that command lead me to audit2allow -a, which told me I should enable domain_can_mmap_files. Seems to work with that set to on

1 Like