public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Russell Harmon <eatnumber1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Fwd:  Building from git sources... Strange errors.
Date: Tue, 26 Jun 2007 13:14:33 -0500	[thread overview]
Message-ID: <46815789.2010402@codemonkey.ws> (raw)
In-Reply-To: <9c4865a10706261104y25d52752m59fbb0b3105b123d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Russell Harmon wrote:
> Also, now that I think about it, shouldn't this code be in #ifdef
> statements (or something) so it is not compiled in on an intel target?
>   

No, but you could comment out kvm-amd in Kconfig to work around your 
issue.  You've got a broken compiler, this changeset is fine.

Regards,

Anthony Liguori

> On 6/26/07, Russell Harmon <eatnumber1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>   
>> are you doing it in the kernel tree, or the userspace tree. I forgot
>> to mention that the offending files are in the kernel tree. The output
>> of git show cfc329b216bc3e54fe1107e8f714c7b3bc133224 in the kernel
>> tree is as follows:
>>
>> commit cfc329b216bc3e54fe1107e8f714c7b3bc133224
>> Author: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
>> Date:   Fri Jun 22 12:29:50 2007 +0300
>>
>>     KVM: SVM: Reliably detect if SVM was disabled by BIOS
>>
>>     This patch adds an implementation to the svm is_disabled function to
>>     detect reliably if the BIOS disabled the SVM feature in the CPU. This
>>     fixes the issues with kernel panics when loading the kvm-amd module on
>>     machines where SVM is available but disabled.
>>
>>     Signed-off-by: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>
>>     Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
>>
>> diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
>> index 62ec38c..a0d4428 100644
>> --- a/drivers/kvm/svm.c
>> +++ b/drivers/kvm/svm.c
>> @@ -1735,6 +1735,12 @@ static void svm_inject_page_fault(struct kvm_vcpu *vcpu,
>>
>>  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;
>>  }
>>
>> diff --git a/drivers/kvm/svm.h b/drivers/kvm/svm.h
>> index 5e93814..005a9c5 100644
>> --- a/drivers/kvm/svm.h
>> +++ b/drivers/kvm/svm.h
>> @@ -175,8 +175,11 @@ struct __attribute__ ((__packed__)) vmcb {
>>  #define SVM_CPUID_FUNC 0x8000000a
>>
>>  #define MSR_EFER_SVME_MASK (1ULL << 12)
>> +#define MSR_VM_CR       0xc0010114ULL
>>  #define MSR_VM_HSAVE_PA 0xc0010117ULL
>>
>> +#define SVM_VM_CR_SVM_DISABLE 4
>> +
>>  #define SVM_SELECTOR_S_SHIFT 4
>>  #define SVM_SELECTOR_DPL_SHIFT 5
>>  #define SVM_SELECTOR_P_SHIFT 7
>>
>>
>> On 6/26/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>>     
>>> Russell Harmon wrote:
>>>       
>>>> Ok, I figured out the problem. It seems to compile fine when I remove
>>>> the changes made to svm.c in commit
>>>> cfc329b216bc3e54fe1107e8f714c7b3bc133224. I am using my laptop which
>>>> is an intel centrino duo processor with vmx.
>>>>
>>>>         
>>> I don't have a cfc329b216bc3e54fe1107e8f714c7b3bc133224.  What does 'git
>>> show cfc329b216bc3e54fe1107e8f714c7b3bc133224' say?
>>>
>>>
>>>       
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

  parent reply	other threads:[~2007-06-26 18:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-26  4:01 Building from git sources... Strange errors Russell Harmon
     [not found] ` <9c4865a10706252101g700e7a39vd235c42ef4d3d803-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-26  4:46   ` Russell Harmon
     [not found]     ` <9c4865a10706252146x491181c4na982977f5e8ea0c3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-26 14:33       ` Avi Kivity
     [not found]         ` <9c4865a10706261052ja9858e8x46600c9ab337a717@mail.gmail.com>
     [not found]           ` <9c4865a10706261052ja9858e8x46600c9ab337a717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-26 18:04             ` Fwd: " Russell Harmon
     [not found]           ` <9c4865a10706261102v4ed6fdb2xc7d2d865a7311797@mail.gmail.com>
     [not found]             ` <9c4865a10706261102v4ed6fdb2xc7d2d865a7311797-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-26 18:04               ` Russell Harmon
     [not found]                 ` <9c4865a10706261104y25d52752m59fbb0b3105b123d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-26 18:14                   ` Anthony Liguori [this message]
     [not found]                     ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52@mail.gmail.com>
     [not found]                       ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-27  4:52                         ` Fwd: " Russell Harmon

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=46815789.2010402@codemonkey.ws \
    --to=anthony-rdkfgonbjusknkdkm+me6a@public.gmane.org \
    --cc=eatnumber1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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