[PATCH 0/2] Fix support for monolithic kernels (no module support)

Baptiste Daroussin posted 2 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20260420130258.21376-1-baptiste.daroussin@ovhcloud.com
[PATCH 0/2] Fix support for monolithic kernels (no module support)
Posted by Baptiste Daroussin 3 weeks, 2 days ago
Hi all,

This series fixes libvirt compilation and runtime on systems using a
monolithic kernel compiled without module support (CONFIG_MODULES=n).

Currently, libvirt assumes kernel module support is always available,
which causes build failures or runtime errors on such systems.

Changes:
- virpci: don't fail VFIO passthrough when modules.alias is missing
- virpci: don"t fail VFIO passthrough when /sys/module/*/drivers is
  inaccessible.

Tested on kernel 6.18 with grsecurity and a custom monolithic kernel.

Note this issue has previously been reported there: 
https://gitlab.com/libvirt/libvirt/-/work_items/591

Thanks,
Baptiste Daroussin
Re: [PATCH 0/2] Fix support for monolithic kernels (no module support)
Posted by Peter Krempa via Devel 2 weeks, 5 days ago
On Mon, Apr 20, 2026 at 15:02:56 +0200, Baptiste Daroussin wrote:
> Hi all,
> 
> This series fixes libvirt compilation and runtime on systems using a
> monolithic kernel compiled without module support (CONFIG_MODULES=n).
> 
> Currently, libvirt assumes kernel module support is always available,
> which causes build failures or runtime errors on such systems.
> 
> Changes:
> - virpci: don't fail VFIO passthrough when modules.alias is missing
> - virpci: don"t fail VFIO passthrough when /sys/module/*/drivers is
>   inaccessible.

s/don"t/don't/ in the summary of the second commit.

> Tested on kernel 6.18 with grsecurity and a custom monolithic kernel.
> 
> Note this issue has previously been reported there: 
> https://gitlab.com/libvirt/libvirt/-/work_items/591

My comments from v1 (on the MR on gitlab) were addressed so:

Reviewed-by: Peter Krempa <pkrempa@redhat.com>

But I'd like to leave some time for folks dealing more with VFIO -
e.g. Laine - to comment on this if there are any issues I don't see.