Cannot load kvm_amd module - (says disabled by bios)

Bug #1201092 reported by maxadamo on 2013-07-14
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Fedora)
Expired
Undecided
linux (Ubuntu)
High
Unassigned

Bug Description

- Firt of all I would like to mention that this bug as been also raised for Fedora 18.
Here is the link: https://bugzilla.redhat.com/show_bug.cgi?id=978608

- I am running Ubuntu Raring (with the kernel 3.8.0-27-generic), but NOTE that I've also tried the new kernel 3.10 from Ubuntu Saucy.

- It happens with the following CPU: AMD E-350D

- The kvm-ok executable says that the system is capable of running KVM, but it also says the it's disabled in the BIOS.

- This is the out put of kvm-ok:
# kvm-ok
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
INFO: KVM (svm) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

- This is what modprobe kvm-amd says:
# modprobe kvm-amd
ERROR: could not insert 'kvm_amd': Operation not supported
root@yasna:~# dmesg |tail -n1
[ 2542.263745] kvm: disabled by bios

---
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: lightdm 2472 F.... pulseaudio
 /dev/snd/controlC0: lightdm 2472 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
DistroRelease: Ubuntu 13.04
HibernationDevice: RESUME=UUID=3addb1e2-6fd3-4581-b4e3-287fc638926d
InstallationDate: Installed on 2013-07-02 (12 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
MarkForUpload: True
NonfreeKernelModules: fglrx
Package: linux 3.8.0.27.45
PackageArchitecture: amd64
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.8.0-27-generic root=UUID=a820e9a0-4b2c-4ab6-adfd-f638f44d867f ro rootflags=subvol=@ quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.8.0-27.40-generic 3.8.13.4
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-27-generic N/A
 linux-backports-modules-3.8.0-27-generic N/A
 linux-firmware 1.106
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: raring package-from-proposed third-party-packages
Uname: Linux 3.8.0-27-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

WifiSyslog:

dmi.bios.date: 01/18/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F3
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: E350N WIN8
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF3:bd01/18/2013:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnE350NWIN8:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Description of problem:
Despite exposed flags and SVM enabled in the BIOS - module won't load. Works flawlessly in Virtualbox.

vendor_id : AuthenticAMD
cpu family : 20
model : 2
model name : AMD E-350D APU with Radeon(tm) HD Graphics
stepping : 0
microcode : 0x500010d

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 mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni monitor ssse3 cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch ibs skinit wdt arat hw_pstate npt lbrv svm_lock nrip_save pausefilter

Hardware: AMD APU E350, M/B Gigabyte E350N Win8, F3 BIOS

Version-Release number of selected component (if applicable):
Kernels 3.6.10-4.fc18.x86_64 (release), 3.9.6-200.fc18.x86_64 (latest)

How reproducible:
For my HW - always

Steps to Reproduce:
1. Enable SVM in BIOS
2. Install Fedora 18
3. modprobe kvm_amd

Actual results:
[root@localhost ~]# modprobe kvm_amd
modprobe: ERROR: could not insert 'kvm_amd': Operation not supported
[root@localhost ~]# dmesg|tail -n1
[ 1611.001914] kvm: disabled by bios

Additional info:
AMD-V available in Virtualbox

I confirm that this issue arises even with kernels 3.8.0-27 and 3.10 (tryied on Ubuntu): dmesg shows the message "kvm: disabled by bios"
I don't know if Red Hat has the 'kvm-ok' executable, BTW in Ubuntu it says that the machine is capable of running KVM, but KVM is disable. This is the output:

# kvm-ok
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
INFO: KVM (svm) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

maxadamo (massimilianoadamo) wrote :
William Grant (wgrant) on 2013-07-15
affects: launchpad → linux (Ubuntu)

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1201092

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: raring

apport information

tags: added: apport-collected package-from-proposed third-party-packages
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

maxadamo (massimilianoadamo) wrote :

PLEASE NOTE: AMD-V extension on Virtualbox works correctly.
Therefore the extension works properly but it's not recognized by KVM.

On Fedora based systems, you can run

$ virt-host-validate
  QEMU: Checking for hardware virtualization : PASS
  QEMU: Checking for device /dev/kvm : PASS
  QEMU: Checking for device /dev/vhost-net : PASS
  QEMU: Checking for device /dev/net/tun : PASS
   LXC: Checking for Linux >= 2.6.26 : PASS

(NOTE: 'libvirt-client' package provide the above tool.)

Joseph Salisbury (jsalisbury) wrote :

Do you happen to know the last kernel version that did not exhibit this bug?

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
maxadamo (massimilianoadamo) wrote :

Sorry no. I understand that it would be easier to revert a regression bug, but I bought this motherboard right now.
I can tell is that on Fedora 18 (in the bug mentioned above) they guy tried the kernels 3.6.10-4.fc18.x86_64 and 3.9.6-200.fc18.x86_64

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
description: updated
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.11 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.11-rc1-saucy/

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
maxadamo (massimilianoadamo) wrote :

Tested with latest upstream kernel: the problem is still there.

# uname -a
Linux yasna 3.11.0-031100rc1-generic #201307141935 SMP Sun Jul 14 23:36:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
#
# kvm-ok
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
INFO: KVM (svm) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report[0]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

Please follow the instructions on the wiki page[0]. The first step is to email the appropriate mailing list. If no response is received, then a bug may be opened on bugzilla.kernel.org.

Once this bug is reported upstream, please add the tag: 'kernel-bug-reported-upstream'.

Joseph Salisbury (jsalisbury) wrote :

Also, can you test these previous kernel versions:

v3.2 final: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.2-precise/
v3.3 final: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-precise/
v3.4 final: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-quantal/
v3.5 final: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5-quantal/

You don't have to test every kernel, just up until the kernel that first has this bug. We can perform a kernel bisect if we can identify the last kernel that did not have this bug and the first that did.

tags: added: performing-bisect
maxadamo (massimilianoadamo) wrote :

Bad luck. Tested against all those version, and the bug is present.

Added Tag: kernel-bug-reported-upstream

tags: added: kernel-bug-reported-upstream

FYI: we've got pretty heavy email traffic regarding this issue, will update as soon as will confirm the problem.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Joseph Salisbury (jsalisbury) wrote :

After confirming that KVM is enabled in your BIOS, can you run the following commands and post the output:

sudo modprobe msr

sudo rdmsr --bitfield 4:4 0xc0010114

Changed in linux (Ubuntu):
status: Triaged → Confirmed
Serge Hallyn (serge-hallyn) wrote :

Hi,

this seems like a stupid question given the # of comments and relevant fedora bug, but i haven't seen this asked anywhere.

Have you in fact enabled virtualization extensions in the bios?

tags: removed: performing-bisect
Tim Gardner (timg-tpi) wrote :

I tried this on my Lenovo X120e with an AMD E-350 with no problem on a 3.11 kernel.

Scott Moser (smoser) wrote :

random bit of "works for me" info to add to Tim's.
Also an x120e:
$ lsmod | grep kvm
kvm_amd 59717 0
kvm 443165 1 kvm_amd
$ uname -r
3.8.0-27-generic
$ grep 350 /proc/cpuinfo
model name : AMD E-350 Processor
model name : AMD E-350 Processor

maxadamo (massimilianoadamo) wrote :

All,

first of all I have AMD E-350D, you have AMD E-350.
I don't know what the "D" stands for, but we don't have the same identical CPU.

I give you the feedback from the kernel developers and from the MainBoard vendor.
I had already tried the above command (rdmsr....). It says "1" ... DISABLED.
Another thing - important - VirtualBox behavior is misleading: it lets you check the flag to enable the AMD-V extension, but looking at logs, it seems that the extension is not being loaded.

Therefore, there are two possiblities.
Kernel developers say: it may be a bug in the BIOS.
The vendor (GygaByte) says: it's a problem with Linux kernel.

BTW, I can understand that everybody says that it's someone else fault, but I can't understand that GigaByte asks me to install windows and test it over windows.
Right now I am stuck as I have a spare partition starting after 1.7GB and windows doesn't want to install on such partition.

Serge Hallyn (serge-hallyn) wrote :

@maxadamo,

I wasn't actually saying "bug in the bios" - I was suggesting the feature was turned off in the bios. Could you please boot into the bios (or EFI) and check the 'virtualization' settings? Or if you've already done that, and it was enabled, please let us know - Thanks!

maxadamo (massimilianoadamo) wrote :

@Serge ... I am an experienced sysadmin, I work with Cloudstack ... therefore I work with a lot of KVM machines.

I don't want to prove anything about myself, but now can you be better ensured that I am able to access a Computer BIOS and switch a feature from ON to OFF and viceversa? :)

I've also tried few weird suggestions from one developers and I paste you the content of the e-mail:
"You might try setting it to disabled in the BIOS to make sure it's not wired
backwards. There also used to be some FUD about fully powering off the
system around making changes to these settings. You might try
unplugging the system for a few seconds and testing from there. "

I would also say that WakOnLan sometime works, sometime it doesn't.
There is something weird with this motherboard, but until I run a test with Windows I am not able to say if the problem is Linux or the MainBoard.

Quoting maxadamo (<email address hidden>):
> @Serge ... I am an experienced sysadmin, I work with Cloudstack ...
> therefore I work with a lot of KVM machines.
>
> I don't want to prove anything about myself, but now can you be better
> ensured that I am able to access a Computer BIOS and switch a feature
> from ON to OFF and viceversa? :)

Yup, thanks. Just wanted to make sure that had been checked.

Did this *used* to work for you in an older kernel? Would it be
possible for you try 3.2 or 3.5?

no longer affects: kvm (Ubuntu)
Joseph Salisbury (jsalisbury) wrote :

It does appear this could be a BIOS issue. The kernel is basically performing a rdmsr, like you did from the command line and getting a return value that KVM is disabled. Here's a snippet of that code:

static int is_disabled(void)
{
        u64 vm_cr;

        rdmsrl(MSR_VM_CR, vm_cr);
        if (vm_cr & (1 << SVM_VM_CR_SVM_DISABLE))
                return 1;

        return 0;
}

The return of 1 in the above code causes the message you see when trying to load the module:

if (ops->disabled_by_bios()) {
                printk(KERN_ERR "kvm: disabled by bios\n");
                r = -EOPNOTSUPP;
                goto out;
        }

One way to confirm this is a BIOS issue would be to try Windows, and see if it also has this same issue. Is that a possibility for you?

Changed in linux (Ubuntu):
status: Confirmed → Triaged

*********** MASS BUG UPDATE **************

We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 18 kernel bugs.

Fedora 18 has now been rebased to 3.11.4-101.fc18. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 19, and are still experiencing this issue, please change the version to Fedora 19.

If you experience different issues, please open a new bug report for those.

*********** MASS BUG UPDATE **************

We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale.

It has been over a month since we asked you to test the 3.11 kernel updates and let us know if your issue has been resolved or is still a problem. When this happened, the bug was set to needinfo. Because the needinfo is still set, we assume either this is no longer a problem, or you cannot provide additional information to help us resolve the issue. As a result we are closing with insufficient data. If this is still a problem, we apologize, feel free to reopen the bug and provide more information so that we can work towards a resolution

If you experience different issues, please open a new bug report for those.

No HW available for testing - cannot reproduce

Changed in linux (Fedora):
importance: Unknown → Undecided
status: Unknown → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.