Skip to main content
Topic: [SOLVED]Unable to modprobe kvm module (Read 964 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED]Unable to modprobe kvm module

I have two kernels installed:  linux-6.2.2-artix1-1 and linux-zen-6.2.2-zen1-1-zen along with headers. Same problem with both.

The error message I'm getting is :
Code: [Select]
$ sudo modprobe kvm
modprobe: ERROR: could not insert 'kvm': Unknown symbol in module, or unknown parameter (see dmesg)

Code: [Select]
$ dmesg | grep kvm
[    3.074471] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[    3.074539] kvm: Unknown symbol irq_bypass_register_consumer (err -2)
[    3.090590] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[    3.090654] kvm: Unknown symbol irq_bypass_register_consumer (err -2)
[   61.445858] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[   61.445915] kvm: Unknown symbol irq_bypass_register_consumer (err -2)
[  108.491023] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[  108.491082] kvm: Unknown symbol irq_bypass_register_consumer (err -2)
[ 1039.584121] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[ 1039.584179] kvm: Unknown symbol irq_bypass_register_consumer (err -2)

No problems loading any other need module:
Code: [Select]
$ lsmod 
Module                  Size  Used by
qrtr                   57344  4
nct6775                28672  0
nct6775_core           86016  1 nct6775
hwmon_vid              16384  1 nct6775
vboxnetflt             40960  0
vboxnetadp             28672  0
vboxdrv               692224  2 vboxnetadp,vboxnetflt
snd_seq_dummy          16384  0
snd_seq_oss            73728  0
snd_seq_midi_event     16384  1 snd_seq_oss
snd_seq               114688  5 snd_seq_oss,snd_seq_midi_event,snd_seq_dummy
snd_seq_device         16384  2 snd_seq,snd_seq_oss
cuse                   16384  0
fuse                  217088  3 cuse
nvidia_drm             86016  9
nvidia_uvm           3100672  0
nvidia_modeset       1548288  15 nvidia_drm
pktcdvd                65536  0
nvidia              62230528  711 nvidia_uvm,nvidia_modeset
snd_hda_codec_realtek   212992  1
intel_rapl_msr         20480  0
intel_rapl_common      40960  1 intel_rapl_msr
edac_mce_amd           57344  0
snd_hda_codec_generic   122880  2 snd_hda_codec_realtek
snd_hda_intel          65536  6
eeepc_wmi              16384  0
crct10dif_pclmul       16384  1
snd_intel_dspcfg       36864  1 snd_hda_intel
asus_wmi               94208  1 eeepc_wmi
crc32_pclmul           16384  0
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
polyval_clmulni        16384  0
ledtrig_audio          16384  2 snd_hda_codec_generic,asus_wmi
polyval_generic        16384  1 polyval_clmulni
snd_hda_codec         225280  3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek
gf128mul               20480  1 polyval_generic
sparse_keymap          16384  1 asus_wmi
ghash_clmulni_intel    16384  0
platform_profile       16384  1 asus_wmi
snd_hda_core          143360  4 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
sha512_ssse3           57344  0
rfkill                 40960  1 asus_wmi
wmi_bmof               16384  0
mousedev               24576  0
r8169                 135168  0
snd_hwdep              20480  1 snd_hda_codec
aesni_intel           405504  0
sg                     53248  0
realtek                40960  1
snd_pcm               212992  4 snd_hda_intel,snd_hda_codec,snd_hda_core
crypto_simd            16384  1 aesni_intel
crypto_user            20480  0
cryptd                 28672  2 crypto_simd,ghash_clmulni_intel
snd_timer              57344  3 snd_seq,snd_pcm
mdio_devres            16384  1 r8169
rapl                   20480  0
sp5100_tco             20480  0
snd                   159744  20 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hwdep,snd_seq_oss,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
libphy                204800  3 r8169,mdio_devres,realtek
i2c_piix4              36864  0
zenpower               16384  0
video                  73728  2 asus_wmi,nvidia_modeset
soundcore              16384  1 snd
mac_hid                16384  0
wmi                    45056  4 video,nct6775,asus_wmi,wmi_bmof
acpi_cpufreq           32768  0
ext4                 1200128  1
crc32c_generic         16384  0
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  221184  1 ext4
hid_logitech_hidpp     73728  0
hid_logitech_dj        40960  0
usbhid                 90112  2 hid_logitech_dj,hid_logitech_hidpp
nvme                   73728  1
nvme_core             245760  2 nvme
crc32c_intel           24576  2
sr_mod                 28672  0
xhci_pci               24576  0
cdrom                  86016  2 pktcdvd,sr_mod
nvme_common            24576  1 nvme_core
xhci_pci_renesas       24576  1 xhci_pci


Exact same result when trying to modprobe kvm_amd.

I also have VirtualBox installed and it works just fine but the all of the modules for it are built via DKMS. (Including Nvidia)

Just can't figure this one out. If anyone has a clue on how to fix this I'd be very thankful. If you need any more info please let me know.

My system is a Ryzen 3800x, Asus tuf gaming x570, 64gigs of ram, Nvidia 1070 with 8megs of ram.

***ANSWER***

Finally figured it out. Some time in the past I had added an entry to "/etc/modprobe.d" blocking "irqbypass" which is needed by kvm. After removing it the module loaded just fine.

Thanks to all that help.


Re: Unable to modprobe kvm module

Reply #1
Post uname -a and pacman -Q | grep linux. Have you updated the kernel and not rebooted?

Re: Unable to modprobe kvm module

Reply #2
Thanks for the reply.

Actually I updated yesterday and yes I always reboot to clean out old libs and whatnot that may be residing in memory.

Code: [Select]
$ uname -a
Linux artix-pc1 6.2.2-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 07 Mar 2023 13:11:31 +0000 x86_64 GNU/Linux

Code: [Select]
$ pacman -Q | grep linux
archlinux-appstream-data 20230220-1
archlinux-keyring 20230225-1
archlinux-mirrorlist 20230226-2
archlinux-xdg-menu 0.7.6.3-2
artix-archlinux-support 2-1
lib32-artix-archlinux-support 1-1
lib32-util-linux 2.38.1-1
linux 6.2.2.artix1-1
linux-api-headers 6.1.9-1
linux-firmware 20230210.bf4115c-1
linux-firmware-whence 20230210.bf4115c-1
linux-headers 6.2.2.artix1-1
linux-zen 6.2.2.zen1-1
linux-zen-headers 6.2.2.zen1-1
syslinux 6.04.pre2.r11.gbf6db5b4-3.1
util-linux 2.38.1-3
util-linux-libs 2.38.1-3

One thing I forgot to mention is this is somewhat of an old install dating back to 2019. No telling what may have since been corrupted.

Re: Unable to modprobe kvm module

Reply #3
The installation age isn't very relevant, mine runs back to 2006. Also, kvm loads in my 5.12.19-ck kernel, so my next guess would be to try the non-zen 6.2.2 kernel and see if it makes any difference.

Re: Unable to modprobe kvm module

Reply #4
Sorry for the late reply. Got caught up in work,.


I should've mentioned that I had already tried using the linux-6.2.2-artix1-1 with the same results. Even though there is nothing in /etc/modprobe.d that pertains to the kvm modules, it's as if there is something on my system that seems to be blocking them from loading.

I can load every module from /usr/lib/modules/6.2.2-zen1-1-zen/kernel
Except for the modules in /usr/lib/modules/6.2.2-zen1-1-zen/kernel/arch/x86/kvm

Hopefully I'll have more time to mess with this weekend.

Thanks again for your help nous.

BTW, if anyone is using one of the kernels mention at the top of the OP would you be kind enough to take the time and try to modprobe kvm. Would like to find out if the modules or my system.

Re: Unable to modprobe kvm module

Reply #5
Works here
Code: [Select]
❯ uname -a
Linux Artix 6.2.2-artix1-1 #1 SMP PREEMPT_DYNAMIC Fri, 03 Mar 2023 18:24:33 +0000 x86_64 GNU/Linux
❯ lsmod | grep kvm
kvm_amd               204800  0
kvm                  1327104  1 kvm_amd
irqbypass              16384  1 kvm
ccp                   147456  1 kvm_amd

Are you sure virtualization is enabled in the UEFI/BIOS settings ?
On my ASUS motherboard it's under CPU options.
Quote
SVM Mode
This item allows you enable or disable CPU Virtualization.
The default is 'disabled' so if I ever update my UEFI I have to remember to enable it again.

Edit:
We have similar hardware. Ryzen 3700x, Asus tuf gaming x570, 32gigs of ram, Nvidia 2070 Super.

 

Re: Unable to modprobe kvm module

Reply #6
I appreciate your help gripped.

Yeah, it's enabled

Code: [Select]
$ sudo LC_ALL=C lscpu | grep Virtualization
Virtualization:                  AMD-V

Hopefully this weekend I'll have time to mess with darn thing.