public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check
Date: Tue, 05 Jul 2011 12:56:42 +0300	[thread overview]
Message-ID: <1309859802.4117.44.camel@sasha> (raw)
In-Reply-To: <4E12DB73.9040601@redhat.com>

On Tue, 2011-07-05 at 12:37 +0300, Avi Kivity wrote:
> On 07/05/2011 12:32 PM, Sasha Levin wrote:
> > On Tue, 2011-07-05 at 11:11 +0200, Joerg Roedel wrote:
> > >  On Tue, Jul 05, 2011 at 11:14:43AM +0300, Sasha Levin wrote:
> > >  >  I have no information about the machine.  It was the result of trying
> > >  >  to debug an issue reported on IRC where we found that the SVM flag is
> > >  >  being set after boot even before the kvm module is loaded.
> > >
> > >  Have you ruled out that any other third-party hypervisor module was
> > >  loaded before KVM? The virtual-box module for example?
> >
> > No other hypervisor was installed and lsmod output was clean.
> 
> This needs to be understood further.
> 

Please note that I don't have access to the hardware in question, this
was done over IRC.

Here are the steps taken in debugging this issue:

1. Looking at the dmesg ( http://pastebin.com/eM7bDY8r ) we saw that
when trying to load the kvm module, the following error shows up: 'kvm:
enabling virtualization on CPU0 failed'.

2. We went through the lsmod output (unfortunately I don't have the link
as it's gone from my IRC buffer) and didn't see any modules belonging to
other hypervisors.

3. At that point, looking at the code - we figured that a set SVM flag
is the possible culprit since it's the only code path which fails
loading the module with that error message without printing anything
else.

4. Installed msr-tools and injected the msr module so that we could read
msr values from userspace.

5. Ran 'rdmsr 0xc0000080' to read the extended feature register. The
output had bit 12 set - which means that SVM bit was enabled.

6. Ran 'wrmsr 0xc0000080 0xd01' which disabled the SVM bit.

7. kvm module loaded ok.

-- 

Sasha.


  reply	other threads:[~2011-07-05  9:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-04 23:09 [PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check Sasha Levin
2011-07-04 23:09 ` [PATCH 2/2] vmx,svm: Print errors if SVM or VMX were already set Sasha Levin
2011-07-05  0:42   ` Alexander Graf
2011-07-05  6:16     ` Tian, Kevin
2011-07-05  6:14   ` Tian, Kevin
2011-07-05  8:09 ` [PATCH 1/2] vmx,svm: Add module parameter to ignore the 'in use' check Avi Kivity
2011-07-05  8:14   ` Sasha Levin
2011-07-05  9:11     ` Joerg Roedel
2011-07-05  9:32       ` Sasha Levin
2011-07-05  9:37         ` Avi Kivity
2011-07-05  9:56           ` Sasha Levin [this message]
2011-07-05 10:37             ` Avi Kivity
2011-07-05 11:07               ` Sasha Levin
2011-07-05 11:14                 ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1309859802.4117.44.camel@sasha \
    --to=levinsasha928@gmail.com \
    --cc=avi@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox