Bug 1898664

Summary: dracut does not install vfio soft dependencies
Product: Red Hat Enterprise Linux 8 Reporter: David Marchand <dmarchan>
Component: dracutAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.2CC: dracut-maint-list, dtardon, fbaudin, jraju, pstodulk, skramaja
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-19 14:31:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Marchand 2020-11-17 18:33:39 UTC
This is something that has been observed when upgrading from a RHEL 7 (dracut-033-572.el7.x86_64) to a RHEL 8 (dracut-049-70.git20200228.el8.x86_64) in a RHOSP upgrade using LEAPP.


So far, some RHOSP installations were creating a /etc/modules-load.d/vfio-pci.conf file.
Its content:
"""
# This file is managed by the puppet kmod module.
vfio-pci
"""


On RHEL 7, the vfio-pci dependencies are as follows:
# modprobe --ignore-install --show-depends vfio-pci |sort -u
insmod /lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/pci/vfio-pci.ko.xz 
insmod /lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/vfio_iommu_type1.ko.xz 
insmod /lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/vfio.ko.xz 
insmod /lib/modules/3.10.0-1160.el7.x86_64/kernel/virt/lib/irqbypass.ko.xz 

And the initramfs contains them all:
# dracut -f /boot/initramfs-$(uname -r).img
# lsinitrd /boot/initramfs-$(uname -r).img |grep -E '(vfio|irqby).*ko'
-rw-r--r--   1 root     root        24504 Aug 18 15:15 usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/pci/vfio-pci.ko.xz
-rw-r--r--   1 root     root        10104 Aug 18 15:15 usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/vfio_iommu_type1.ko.xz
-rw-r--r--   1 root     root        13956 Aug 18 15:15 usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/vfio/vfio.ko.xz
-rw-r--r--   1 root     root         2640 Aug 18 15:15 usr/lib/modules/3.10.0-1160.el7.x86_64/kernel/virt/lib/irqbypass.ko.xz


On RHEL8,
# modprobe --ignore-install --show-depends vfio-pci |sort -u
insmod /lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/pci/vfio-pci.ko.xz 
insmod /lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/vfio_iommu_type1.ko.xz 
insmod /lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/vfio.ko.xz 
insmod /lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/vfio_virqfd.ko.xz 
insmod /lib/modules/4.18.0-193.el8.x86_64/kernel/virt/lib/irqbypass.ko.xz 


But the initramfs lacks the vfio_iommu_type1.
# lsinitrd /boot/initramfs-$(uname -r).img |grep -E '(vfio|irqby).*ko'
-rw-r--r--   1 root     root        24796 Feb 28  2020 usr/lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/pci/vfio-pci.ko.xz
-rw-r--r--   1 root     root        14144 Feb 28  2020 usr/lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/vfio.ko.xz
-rw-r--r--   1 root     root         3444 Feb 28  2020 usr/lib/modules/4.18.0-193.el8.x86_64/kernel/drivers/vfio/vfio_virqfd.ko.xz
-rw-r--r--   1 root     root         3040 Feb 28  2020 usr/lib/modules/4.18.0-193.el8.x86_64/kernel/virt/lib/irqbypass.ko.xz

This is a problem as the vfio-pci / vfio modules get loaded, but the iommu_type1 does not.
Later tools and ovs/dpdk won't reload vfio kmods.


To be fair, my current recommendation to the RHOSP guys is to remove the vfio-pci.conf file.
We don't need vfio in the initramfs and we can rely on driverctl (a tool that binds devices for dpdk) for vfio-pci loading.

But I still opened this bz as I think this is a regression from RHEL 7 to RHEL 8.

Comment 1 Sergii Golovatiuk 2020-11-18 20:40:17 UTC
*** Bug 1889675 has been marked as a duplicate of this bug. ***

Comment 2 David Tardon 2020-11-19 14:30:50 UTC
Already fixed in 8.3.

Comment 3 David Tardon 2020-11-19 14:31:14 UTC

*** This bug has been marked as a duplicate of bug 1846343 ***

Comment 4 David Marchand 2020-11-19 15:03:52 UTC
Ah, I had seen the changes upstream, but did not notice the downstream backports.
Thanks, now for RHOSP to decide on the next steps.

Comment 5 Saravanan KR 2020-11-23 11:55:21 UTC
(In reply to David Tardon from comment #2)
> Already fixed in 8.3.

Can this be backported to 8.2?