2

I have been trying to get KVM working on my Fedora Linux installed on a desktop computer with AMD processor with no success.

[kp@localhost ~]$ lscpu | grep svm
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca

SVM is available as we can observe in the flags shown above. I also verified in the BIOS settings that the "Secure Virtual Machine" is enabled.

[kp@localhost ~]$ lsmod | grep kvm
kvm                   724992  0
irqbypass              16384  1 kvm

When I try loading kvm_amd module, the command gets stuck for ever:

[kp@localhost ~]$ sudo modprobe kvm_amd
[sudo] password for kp:

When I try creating a new Virtual machine using Virual Machine Manager, it gives me the following warning:

Warning: KVM is not available. This may mean KVM package is not installed, or the KVM kernel modules are not loaded. Your virtual machines may perform poorly.

Any ideas of what may be the problem here? I did not find any glaring errors printed in journalctl output.

  • 1
    which AMD processor? Is your MB bios up to date? After enabling SVM, et. al, did you perform a power cycle, not just a soft reboot? – essjae Sep 13 '18 at 16:47
  • @essjae AMD Ryzen 7 1700x. Yes, I have updated the MB bios to the latest available. Yes, I did power cycle the machine. In fact I could not find a way to disable SVM in my bios settings, it is enabled by default. – Keshav Prasad Sep 16 '18 at 6:24
  • Just added my findings as a post. – Keshav Prasad Sep 16 '18 at 6:29
2

After much searching on the internet, I found that the problem is that kvm_amd is not active on this Fedora Linux kernel. Apparently one needs to compile the kernel using a custom parameter called CONFIG_CRYPTO_DEV_SP_PSP=n to fix this problem.

Found this information from here:

https://forum.level1techs.com/t/antergos-kvm-amd-not-active-threadripper/130245/9

Check out the post by user IceWind:

"Compiling the kernel with CONFIG_CRYPTO_DEV_SP_PSP=n seems to fix the kvm issue with the latest bios updates on threadripper."

  • Can you please either file a bug for this or post to the kernel mailing list so we can make sure this gets addressed? – mattdm Sep 16 '18 at 16:24
  • Yep, I will try to file a report on this. – Keshav Prasad Sep 18 '18 at 9:25
  • 1
    This also worked for me on Arch Linux. I couldn't get KVM to run on newer kernels, but with this change, it worked. Thanks a lot @KeshavPrasad! – Fredefl Sep 22 '18 at 14:22
  • @mattdm If I try sign-in via stackoverflow or any other oauth to kernel mailing list site, it shows errors. If I try to sign up it gives the message that there no new signups allowed. Is there any email address where I can report this problem to? – Keshav Prasad Oct 5 '18 at 6:13

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.