Skip to content

Crash in kvm:has_svm #9

Closed
willmurnane opened this Issue Mar 7, 2012 · 9 comments

3 participants

@willmurnane

I tried compiling and adding the driver as described on the main page, in a machine which is itself running under ESXi virtualization. It didn't go so well; when I add_drv'ed kvm the machine hung. When I rebooted it panicked:

            panicstr = BAD TRAP: type=e (#pf Page fault) rp=ffffff001fdf73a0 addr=1000 occurred in module "unix" due to an illegal access to a user address
            panicstack = unix:die+f4 () | unix:trap+1218 () | unix:cmntrap+1ca () | unix:vsnprintf+4b5 () | genunix:cprintf+22b () | genunix:cmn_err+10d () | kvm:has_svm+2f () | kvm:kvm_arch_init+15 () | kvm:kvm_init+11 () | kvm:kvm_svm_init+1af () | kvm:kvm_attach+f3 () | genunix:devi_attach+a5 () | genunix:attach_node+12a () | genunix:i_ndi_config_node+11d () | genunix:i_ddi_attachchild+84 () | genunix:devi_attach_node+bc () | genunix:config_immediate_children+de () | genunix:devi_config_common+6f () | genunix:mt_config_thread+181 () | unix:thread_start+8 () |
            crashtime = 1331090517
            panic-time = March  6, 2012 10:21:57 PM EST EST
    (end fault-list[0])

I can upload cores if desired. This machine is based on an Opteron 4170, which has AMD-V capabilities, but isainfo doesn't report them.

@jclulow
Owner
jclulow commented Mar 7, 2012

So isainfo -v doesn't list amd_svm as a capability? Also, please confirm which branch/commit you built to get this error.

@richlowe
richlowe commented Mar 8, 2012

Why do we even do that dance with msg, it's only ever going to have the one value?

Also, this whole dance with cpu_has_svm, has_svm, kvm_svm_supported and ops->cpu_has_kvm_support seems awfully silly. I think we end up doing that check 3 times, now. (presumably the same for VMX, with your rework?)

@jclulow
Owner
jclulow commented Mar 8, 2012

Yeah, I'm cleaning that stuff up at the moment. I was initially leaving things as similar as possible to upstream (Linux KVM), but it seems unlikely we'll be trying to resync in the future so we may as well clean up.

@richlowe
richlowe commented Mar 8, 2012

Well, even if it's not "unlikely" I doubt this makes it worse in comparison to, say, the application of cstyle(1).

@willmurnane

Yep, amd_svm is not listed as a capability on this machine, although I know the hardware has the capability:
$ isainfo -v | grep svm
$
I'm trying to get access to some other hardware so I can take this box out of production and play around with KVM a little more.

I will try with the new version. Obviously, if the CPU is reporting there's no SVM support, it won't work, but it should at least not panic the machine.

@willmurnane

Still no good, it panics when added:

panicstr = BAD TRAP: type=e (#pf Page fault) rp=ffffff0020a433a0 addr=1000 occurred in module "unix" due to an illegal access to a user address
panicstack = unix:die+f4 () | unix:trap+1218 () | unix:cmntrap+1ca () | unix:vsnprintf+4b5 () | genunix:cprintf+22b () | genunix:cmn_err+10d () | kvm:has_svm+2f () | kvm:kvm_arch_init+15 () | kvm:kvm_init+11 () | kvm:kvm_svm_init+1af () | kvm:kvm_attach+f3 () | genunix:devi_attach+a5 () | genunix:attach_node+12a () | genunix:i_ndi_config_node+11d () | genunix:i_ddi_attachchild+84 () | genunix:devi_attach_node+bc () | genunix:config_immediate_children+de () | genunix:devi_config_common+6f () | genunix:mt_config_thread+181 () | unix:thread_start+8 () |
This was built from:

$ /usr/gnu/bin/git rev-parse HEAD
27e27be

@richlowe
richlowe commented Mar 8, 2012

You're running the code from master, use the pre-ept branch.

@richlowe
richlowe commented Mar 8, 2012

Actually, @jclulow, why not just merge that to master at this point?

@willmurnane

After using the fix posted here:
http://communities.vmware.com/docs/DOC-8970
I am able to expose the amd_svm flag to the VM and the (pre-ept branch of the) driver loads properly.

When I turn off the amd_svm flag (by removing "vhv.allow = TRUE" from /etc/vmware/config) then loading the driver now prints an innocuous "WARNING: no virtualisation hardware support detected" message (a few times). So, issue closed :)

@willmurnane willmurnane closed this Mar 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.