[Bug 1903612] Re: Can't Load vfio-pci Module on Ubuntu 18.04 HWE Kernel

Jun Shiozawa 1903612 at bugs.launchpad.net
Fri Aug 20 23:35:39 UTC 2021


Hello,Po-Hsu Lin

$ uname -r
5.11.0-27-generic

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal


$ sudo vi /etc/modules

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
kvm
kvm_intel

:wq

$ lsmod | grep vfio

empty...

$ lsmod | grep kvm

kvm_intel             294912  0
kvm                   819200  1 kvm_intel

$ modinfo vfio
name:           vfio
filename:       (builtin)
softdep:        post: vfio_iommu_type1 vfio_iommu_spapr_tce
alias:          devname:vfio/vfio
alias:          char-major-10-196
description:    VFIO - User Level meta-driver
author:         Alex Williamson <alex.williamson at redhat.com>
license:        GPL v2
file:           drivers/vfio/vfio
version:        0.3
parm:           enable_unsafe_noiommu_mode:Enable UNSAFE, no-IOMMU mode.  This mode provides no device isolation, no DMA translation, no host kernel protection, cannot be used for device assignment to virtual machines, requires RAWIO permissions, and will taint the kernel.  If you do not know what this is for, step away. (default: false) (bool)

$ modinfo vfio_iommu_type1
name:           vfio_iommu_type1
filename:       (builtin)
description:    Type1 IOMMU driver for VFIO
author:         Alex Williamson <alex.williamson at redhat.com>
license:        GPL v2
file:           drivers/vfio/vfio_iommu_type1
version:        0.2
parm:           allow_unsafe_interrupts:Enable VFIO IOMMU support for on platforms without interrupt remapping support. (bool)
parm:           disable_hugepages:Disable VFIO IOMMU support for IOMMU hugepages. (bool)
parm:           dma_entry_limit:Maximum number of user DMA mappings per container (65535). (uint)

$ modinfo vfio_pci
name:           vfio_pci
filename:       (builtin)
description:    VFIO PCI - User Level meta-driver
author:         Alex Williamson <alex.williamson at redhat.com>
license:        GPL v2
file:           drivers/vfio/pci/vfio-pci
version:        0.2
parm:           ids:Initial PCI IDs to add to the vfio driver, format is "vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]" and multiple comma separated entries can be specified (string)
parm:           nointxmask:Disable support for PCI 2.3 style INTx masking.  If this resolves problems for specific devices, report lspci -vvvxxx to linux-pci at vger.kernel.org so the device can be fixed automatically via the broken_intx_masking flag. (bool)
parm:           disable_vga:Disable VGA resource access through vfio-pci (bool)
parm:           disable_idle_d3:Disable using the PCI D3 low power state for idle, unused devices (bool)
parm:           enable_sriov:Enable support for SR-IOV configuration.  Enabling SR-IOV on a PF typically requires support of the userspace PF driver, enabling VFs without such support may result in non-functional VFs or PF. (bool)
parm:           disable_denylist:Disable use of device denylist. Disabling the denylist allows binding to devices with known errata that may lead to exploitable stability or security issues when accessed by untrusted users. (bool)

$ modinfo vfio_virqfd
name:           vfio_virqfd
filename:       (builtin)
description:    IRQFD support for VFIO bus drivers
author:         Alex Williamson <alex.williamson at redhat.com>
license:        GPL v2
file:           drivers/vfio/vfio_virqfd
version:        0.1

Po-Hsu Lin
Would you please fix this bug as well?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to kmod in Ubuntu.
https://bugs.launchpad.net/bugs/1903612

Title:
  Can't Load vfio-pci Module on Ubuntu 18.04 HWE Kernel

Status in kmod package in Ubuntu:
  Fix Released
Status in linux-hwe package in Ubuntu:
  Confirmed
Status in kmod source package in Bionic:
  Confirmed
Status in linux-hwe source package in Bionic:
  Confirmed

Bug description:
  Can't Load vfio-pci Module on Ubuntu 18.04 HWE Kernel

  ```
  ubuntu at ubuntu-2:~$ modinfo vfio-pci
  modinfo: ERROR: Module vfio-pci not found.

  ubuntu at ubuntu-2:~$ uname -a
  Linux DL360G9-2 5.4.0-52-generic #57~18.04.1-Ubuntu SMP Thu Oct 15 14:04:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  ```

  
  But Generic kernel is Working.

  ```
  ubuntu at ubuntu-4:~$ modinfo vfio-pci
  filename:       /lib/modules/4.15.0-122-generic/kernel/drivers/vfio/pci/vfio-pci.ko
  description:    VFIO PCI - User Level meta-driver
  author:         Alex Williamson <alex.williamson at redhat.com>
  license:        GPL v2
  version:        0.2
  srcversion:     1E92A800B94EAE7B392AD50
  depends:        vfio,irqbypass,vfio_virqfd
  retpoline:      Y
  intree:         Y
  name:           vfio_pci
  vermagic:       4.15.0-122-generic SMP mod_unload 
  signat:         PKCS#7
  signer:         
  sig_key:        
  sig_hashalgo:   md4
  parm:           ids:Initial PCI IDs to add to the vfio driver, format is "vendor:device[:subvendor[:subdevice[:class[:class_mask]]]]" and multiple comma separated entries can be specified (string)
  parm:           nointxmask:Disable support for PCI 2.3 style INTx masking.  If this resolves problems for specific devices, report lspci -vvvxxx to linux-pci at vger.kernel.org so the device can be fixed automatically via the broken_intx_masking flag. (bool)
  parm:           disable_vga:Disable VGA resource access through vfio-pci (bool)
  parm:           disable_idle_d3:Disable using the PCI D3 low power state for idle, unused devices (bool)
  ```

  How to use vfio-pci module in HWE kernel?
  --- 
  ProblemType: Bug
  AlsaVersion: Advanced Linux Sound Architecture Driver Version k5.4.0-52-generic.
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
  ApportVersion: 2.20.9-0ubuntu7.16
  Architecture: amd64
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/midiC0D0', '/dev/snd/pcmC0D1p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
  Card0.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer': 'amixer'
  Card0.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer': 'amixer'
  DistroRelease: Ubuntu 18.04
  InstallationDate: Installed on 2020-11-09 (0 days ago)
  InstallationMedia: Ubuntu-Server 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1)
  IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
  MachineType: VMware, Inc. VMware Virtual Platform
  Package: linux (not installed)
  ProcEnviron:
   TERM=xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcFB: 0 svgadrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.4.0-52-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro maybe-ubiquity
  ProcVersionSignature: Ubuntu 5.4.0-52.57~18.04.1-generic 5.4.65
  RelatedPackageVersions:
   linux-restricted-modules-5.4.0-52-generic N/A
   linux-backports-modules-5.4.0-52-generic  N/A
   linux-firmware                            1.173.19
  RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
  Tags:  bionic uec-images
  Uname: Linux 5.4.0-52-generic x86_64
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lxd plugdev sudo
  _MarkForUpload: True
  dmi.bios.date: 07/22/2020
  dmi.bios.vendor: Phoenix Technologies LTD
  dmi.bios.version: 6.00
  dmi.board.name: 440BX Desktop Reference Platform
  dmi.board.vendor: Intel Corporation
  dmi.board.version: None
  dmi.chassis.asset.tag: No Asset Tag
  dmi.chassis.type: 1
  dmi.chassis.vendor: No Enclosure
  dmi.chassis.version: N/A
  dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr6.00:bd07/22/2020:svnVMware,Inc.:pnVMwareVirtualPlatform:pvrNone:rvnIntelCorporation:rn440BXDesktopReferencePlatform:rvrNone:cvnNoEnclosure:ct1:cvrN/A:
  dmi.product.name: VMware Virtual Platform
  dmi.product.version: None
  dmi.sys.vendor: VMware, Inc.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kmod/+bug/1903612/+subscriptions




More information about the foundations-bugs mailing list