Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot modprobe KVM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
c0ntrarian
n00b
n00b


Joined: 05 May 2020
Posts: 9

PostPosted: Fri May 29, 2020 4:31 am    Post subject: Cannot modprobe KVM Reply with quote

I cannot get KVM working on my machine. I am currently running Linux 5.4.31-ck kernel. I have rebuilt the kernel several times now -- with KVM as modules and built-in. The kernel just refuses to load the kvm and kvm_intel modules every time. I don't know where else to look for help.

Code:
~ % sudo modprobe kvm -vv
modprobe: INFO: custom logging function 0x55cbaffb9f20 registered
insmod /lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko
modprobe: INFO: Failed to insert module '/lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko': No such file or directory
modprobe: ERROR: could not insert 'kvm': Unknown symbol in module, or unknown parameter (see dmesg)
modprobe: INFO: context 0x55cbb0c6c440 released


Code:
[   32.796808] kvm: Unknown symbol user_return_notifier_unregister (err -2)
[   32.796811] kvm: Unknown symbol preempt_notifier_inc (err -2)
[   32.796822] kvm: Unknown symbol preempt_notifier_register (err -2)
[   32.796836] kvm: Unknown symbol irq_bypass_unregister_consumer (err -2)
[   32.796871] kvm: Unknown symbol user_return_notifier_register (err -2)
[   32.796873] kvm: Unknown symbol preempt_notifier_dec (err -2)
[   32.796878] kvm: Unknown symbol irq_bypass_register_consumer (err -2)
[   32.796881] kvm: Unknown symbol preempt_notifier_unregister (err -2)


Here is my .kernel config: http://dpaste.com/0S936AZ

I have ensured that VT-d is enabled in my BIOs as well. I even updated the BIOS firmware to the latest.

Any suggestions?
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181

PostPosted: Fri May 29, 2020 9:10 am    Post subject: Re: Cannot modprobe KVM Reply with quote

Welcome to the Gentoo forums!

c0ntrarian wrote:
Code:
modprobe: INFO: Failed to insert module '/lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko': No such file or directory

Does the /lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko file exist on your system?

Also, what does the following command return?
Code:
uname -r
Back to top
View user's profile Send private message
c0ntrarian
n00b
n00b


Joined: 05 May 2020
Posts: 9

PostPosted: Fri May 29, 2020 5:01 pm    Post subject: Re: Cannot modprobe KVM Reply with quote

fturco wrote:
Welcome to the Gentoo forums!

c0ntrarian wrote:
Code:
modprobe: INFO: Failed to insert module '/lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko': No such file or directory

Does the /lib/modules/5.4.31-ck/kernel/arch/x86/kvm/kvm.ko file exist on your system?

Also, what does the following command return?
Code:
uname -r


Yes, both kvm.ko and kvm-intel.ko exist in that folder.

uname shows this:
Code:
/lib/modules/5.4.31-ck/kernel/arch/x86/kvm % uname -r
5.4.31-ck
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6205
Location: Dallas area

PostPosted: Fri May 29, 2020 5:11 pm    Post subject: Reply with quote

Typically you load with modprobe kvm-amd/intel and let it load kvm under it.

Edit to add: what does modinfo kvm and kvm-intel return?
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54782
Location: 56N 3W

PostPosted: Fri May 29, 2020 5:38 pm    Post subject: Reply with quote

c0ntrarian,

Code:
[   32.796808] kvm: Unknown symbol user_return_notifier_unregister (err -2)

Unknown symbol like this usually means that your kernel and modules are not from the same kernel build.

This is easy to get when you forget to mount boot for the kernel install.
It all looks right but you get your old kernel and new modules.

Its easy to detect.
What is the date/time in
Code:
uname -a
That's the build date and time of the running kernel. Is it what you expected?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
c0ntrarian
n00b
n00b


Joined: 05 May 2020
Posts: 9

PostPosted: Fri May 29, 2020 5:59 pm    Post subject: Reply with quote

NeddySeagoon wrote:
c0ntrarian,

Code:
[   32.796808] kvm: Unknown symbol user_return_notifier_unregister (err -2)

Unknown symbol like this usually means that your kernel and modules are not from the same kernel build.

This is easy to get when you forget to mount boot for the kernel install.
It all looks right but you get your old kernel and new modules.

Its easy to detect.
What is the date/time in
Code:
uname -a
That's the build date and time of the running kernel. Is it what you expected?
\

May 5th which is a few weeks ago. This doesn't seem right since I make cleaned, and make'd my kernel yesterday and installed to boot. Although, I mount boot through fstab and is always mounted while I use the machine. (lsblk shows /boot mounted to partition 3) My kernel in /boot shows up as being modified on May 28th Should I manually cp my kernel to my boot partition?
Back to top
View user's profile Send private message
c0ntrarian
n00b
n00b


Joined: 05 May 2020
Posts: 9

PostPosted: Fri May 29, 2020 6:20 pm    Post subject: Reply with quote

NeddySeagoon wrote:
c0ntrarian,

Code:
[   32.796808] kvm: Unknown symbol user_return_notifier_unregister (err -2)

Unknown symbol like this usually means that your kernel and modules are not from the same kernel build.

This is easy to get when you forget to mount boot for the kernel install.
It all looks right but you get your old kernel and new modules.

Its easy to detect.
What is the date/time in
Code:
uname -a
That's the build date and time of the running kernel. Is it what you expected?


Solved thank you so much. My PC was mounting boot to the wrong drive after I DD'd it. Silly me. I KNEW it was something silly and obvious.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23055

PostPosted: Fri May 29, 2020 11:37 pm    Post subject: Reply with quote

It may be obvious now, but it is a sufficiently common mistake that long time helpers have learned to prompt requesters to check it early in the troubleshooting process.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum