Page 1 of 1

AMD-V activated, or not?

Posted: 27. Feb 2011, 19:38
by Sepp Mosch
Hi,
Just installed VB OSE, but i does not work the way it should. In the session information on the basic tab it says VT-x/AMD-V are activated, but on the runtime it says it isn't and i'm sure it's not, it's _horrilbe_ slow. The kernel module is loaded:

Code: Select all

% lsmod|grep box
vboxnetadp              4193  0 
vboxnetflt             12525  1 
vboxdrv              1723671  5 vboxnetadp,vboxnetflt
My mainboard is supporting AMD-V and it workes well with QEMU/KVM, but these don't have have a good graphic performace, the sound is laggy and bridged networking is pain, so i tryed out VB. Do I have to unload any kvm modules? Where can i read error messages?

Sepp Mosh

Re: AMD-V activated, or not?

Posted: 27. Feb 2011, 19:56
by Perryg
QEMU/KVM
If these are still active on the host VirtualBox will not/can not use VT-x/AMD-v as it would corrupt everything. Make sure that KVM is completely stopped and try again.

Re: AMD-V activated, or not?

Posted: 27. Feb 2011, 21:43
by przemoc
Checking hardware assisted virtualization support in CPU

Code: Select all

egrep -q '^flags.*(vmx|svm)' /proc/cpuinfo && echo yes
If you don't get yes in output, then the answer is obviously no. ;)

Checking whether hardware virtualization is enabled/used in AMD CPUs
Checking SVME bit (12th bit, counting from 0 as in AMD docs, SVM Enable) in EFER (MSR 0xC0000080, Extended Feature Enable Register).
You can check it using rdmsr from msr-tools package.

Code: Select all

sudo rdmsr 0xC0000080 #EFER
If you get a number where 4th (counting from 1 and obviously from right) hexadecimal digit has first bit set, or it just equals 1, then SVME is on.

If you've got an error, then you have to load msr module before.

Code: Select all

sudo modprobe msr
KVM problem
KVM module works a bit differently than VB. E.g. in case of AMD KVM sets SVME immediately after loading. So having KVM module loaded, you'll get following, and a bit misleading, message in VB:

Code: Select all

HWACCM: No VT-x or AMD-V CPU extension found. Reason VERR_SVM_IN_USE
Misleading is only a first part, reason is correct.

Solution
To unload KVM modules type:

Code: Select all

sudo modprobe -r kvm_amd kvm_intel
It will be a bit off-topic now, but still may be useful for somebody.

Checking whether hardware virtualization is permanently (in current session) disabled
For AMD CPU to check whether you can use hardware virtualization, i.e. it wasn't blocked by BIOS, etc. you have to look at SVME_DISABLE bit (4th, counting from 0) in VM_CR (MSR 0xC0010114).

Code: Select all

sudo rdmsr 0xC0010114 #VM_CR
If you get a number where 2nd (counting from 1) hexadecimal digit has first bit set, or it just equals 1, then your hardware virtualization is not available in this session.

Re: AMD-V activated, or not?

Posted: 27. Feb 2011, 21:54
by Sepp Mosch
przemoc wrote:
Solution
To unload KVM modules type:

Code: Select all

sudo modprobe -r kvm_amd kvm_intel
That's it!
Thanks for the explanation!

Re: AMD-V activated, or not?

Posted: 18. Nov 2012, 04:40
by przemoc
Just for the reference (for old hardware users/googlers), some possibly useful information (on topic of AMD-V activated, or not?) can be found in my comments on ticket 1933, in particular: