public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Building from git sources... Strange errors.
@ 2007-06-26  4:01 Russell Harmon
       [not found] ` <9c4865a10706252101g700e7a39vd235c42ef4d3d803-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Russell Harmon @ 2007-06-26  4:01 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

I'm trying to build the external module and userspace utils from git
sources, but i'm getting the following errors:

russ@kiki ~/src/kvm/git $ sudo ./makekvm --prefix=/usr/local/kvm
Password:
Already up-to-date.
Already up-to-date.
Install prefix    /usr/local/kvm
BIOS directory    /usr/local/kvm/share/qemu
binary directory  /usr/local/kvm/bin
Manual directory  /usr/local/kvm/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/russ/src/kvm/git/kvm-userspace/qemu
C compiler        /usr/bin/gcc-3.4.6
Host C compiler   gcc
make              make
install           install
host CPU          i386
host big endian   no
target list       x86_64-softmmu
gprof enabled     no
profiler          no
static build      no
SDL support       yes
SDL static link   yes
mingw32 support   no
Adlib support     no
CoreAudio support no
ALSA support      yes
DSound support    no
FMOD support      no
kqemu support     no
kvm support       yes
Documentation     yes
rsync --exclude='*.mod.c'
"/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/drivers/kvm/*.[ch]
.
rsync "/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/include/linux/kvm.h
\
               "/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/include/linux/kvm_para.h
\
                        include/linux
sed -i 's/f_path\./f_/' kvm_main.c
sed -i 's/f_mnt/f_vfsmnt/' kvm_main.c
mv kvm_main.c kvm_main.c.orig
awk '/^static int kvmfs_get_sb/ \
                 { print "#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)\n"; \
                   hacking_get_sb = 1 \
                 } \
             { print } \
             /\}/ && hacking_get_sb { print "\n#endif"; hacking_get_sb = 0 } \
             ' kvm_main.c.orig > kvm_main.c
rm kvm_main.c.orig
make -C kernel
make[1]: Entering directory `/home/russ/src/kvm/git/kvm-userspace/kernel'
make -C /lib/modules/2.6.21-kamikaze6/build M=`pwd` "$@"
make[2]: Entering directory `/usr/src/linux-2.6.21-kamikaze6'
  LD      /home/russ/src/kvm/git/kvm-userspace/kernel/built-in.o
  CC [M]  /home/russ/src/kvm/git/kvm-userspace/kernel/svm.o
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c: In function 'is_disabled':
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
impossible register constraint in 'asm'
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
impossible register constraint in 'asm'
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
impossible register constraint in 'asm'
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1745: error:
unrecognizable insn:
(insn:HI 9 38 37 0 (parallel [
            (set (reg/v:SI 0 ax [orig:59 l__ ] [59])
                (asm_operands/v:SI ("rdmsr") ("=a") 0 [
                        (reg:DI 3 bx)
                    ]
                     [
                        (asm_input:DI ("c"))
                    ]
("/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c") 1740))
            (set (reg:SI 1 dx)
                (asm_operands/v:SI ("rdmsr") ("=d") 1 [
                        (reg:DI 3 bx)
                    ]
                     [
                        (asm_input:DI ("c"))
                    ]
("/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c") 1740))
            (clobber (reg:QI 19 dirflag))
            (clobber (reg:QI 18 fpsr))
            (clobber (reg:QI 17 flags))
        ]) -1 (insn_list:REG_DEP_TRUE 8 (nil))
    (nil))
/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1745: confused by
earlier errors, bailing out
make[3]: *** [/home/russ/src/kvm/git/kvm-userspace/kernel/svm.o] Error 1
make[2]: *** [_module_/home/russ/src/kvm/git/kvm-userspace/kernel] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.21-kamikaze6'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/russ/src/kvm/git/kvm-userspace/kernel'
make: *** [kernel] Error 2

I can already build release 28 w/o issue, so i'm either doing
something wrong, or this is a bug.

-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building from git sources... Strange errors.
       [not found] ` <9c4865a10706252101g700e7a39vd235c42ef4d3d803-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-26  4:46   ` Russell Harmon
       [not found]     ` <9c4865a10706252146x491181c4na982977f5e8ea0c3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Russell Harmon @ 2007-06-26  4:46 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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.

On 6/26/07, Russell Harmon <eatnumber1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I'm trying to build the external module and userspace utils from git
> sources, but i'm getting the following errors:
>
> russ@kiki ~/src/kvm/git $ sudo ./makekvm --prefix=/usr/local/kvm
> Password:
> Already up-to-date.
> Already up-to-date.
> Install prefix    /usr/local/kvm
> BIOS directory    /usr/local/kvm/share/qemu
> binary directory  /usr/local/kvm/bin
> Manual directory  /usr/local/kvm/share/man
> ELF interp prefix /usr/gnemul/qemu-%M
> Source path       /home/russ/src/kvm/git/kvm-userspace/qemu
> C compiler        /usr/bin/gcc-3.4.6
> Host C compiler   gcc
> make              make
> install           install
> host CPU          i386
> host big endian   no
> target list       x86_64-softmmu
> gprof enabled     no
> profiler          no
> static build      no
> SDL support       yes
> SDL static link   yes
> mingw32 support   no
> Adlib support     no
> CoreAudio support no
> ALSA support      yes
> DSound support    no
> FMOD support      no
> kqemu support     no
> kvm support       yes
> Documentation     yes
> rsync --exclude='*.mod.c'
> "/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/drivers/kvm/*.[ch]
> .
> rsync "/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/include/linux/kvm.h
> \
>                "/home/russ/src/kvm/git/kvm-userspace/kernel/../../kvm"/include/linux/kvm_para.h
> \
>                         include/linux
> sed -i 's/f_path\./f_/' kvm_main.c
> sed -i 's/f_mnt/f_vfsmnt/' kvm_main.c
> mv kvm_main.c kvm_main.c.orig
> awk '/^static int kvmfs_get_sb/ \
>                  { print "#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)\n"; \
>                    hacking_get_sb = 1 \
>                  } \
>              { print } \
>              /\}/ && hacking_get_sb { print "\n#endif"; hacking_get_sb = 0 } \
>              ' kvm_main.c.orig > kvm_main.c
> rm kvm_main.c.orig
> make -C kernel
> make[1]: Entering directory `/home/russ/src/kvm/git/kvm-userspace/kernel'
> make -C /lib/modules/2.6.21-kamikaze6/build M=`pwd` "$@"
> make[2]: Entering directory `/usr/src/linux-2.6.21-kamikaze6'
>   LD      /home/russ/src/kvm/git/kvm-userspace/kernel/built-in.o
>   CC [M]  /home/russ/src/kvm/git/kvm-userspace/kernel/svm.o
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c: In function 'is_disabled':
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
> impossible register constraint in 'asm'
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
> impossible register constraint in 'asm'
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1740: error:
> impossible register constraint in 'asm'
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1745: error:
> unrecognizable insn:
> (insn:HI 9 38 37 0 (parallel [
>             (set (reg/v:SI 0 ax [orig:59 l__ ] [59])
>                 (asm_operands/v:SI ("rdmsr") ("=a") 0 [
>                         (reg:DI 3 bx)
>                     ]
>                      [
>                         (asm_input:DI ("c"))
>                     ]
> ("/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c") 1740))
>             (set (reg:SI 1 dx)
>                 (asm_operands/v:SI ("rdmsr") ("=d") 1 [
>                         (reg:DI 3 bx)
>                     ]
>                      [
>                         (asm_input:DI ("c"))
>                     ]
> ("/home/russ/src/kvm/git/kvm-userspace/kernel/svm.c") 1740))
>             (clobber (reg:QI 19 dirflag))
>             (clobber (reg:QI 18 fpsr))
>             (clobber (reg:QI 17 flags))
>         ]) -1 (insn_list:REG_DEP_TRUE 8 (nil))
>     (nil))
> /home/russ/src/kvm/git/kvm-userspace/kernel/svm.c:1745: confused by
> earlier errors, bailing out
> make[3]: *** [/home/russ/src/kvm/git/kvm-userspace/kernel/svm.o] Error 1
> make[2]: *** [_module_/home/russ/src/kvm/git/kvm-userspace/kernel] Error 2
> make[2]: Leaving directory `/usr/src/linux-2.6.21-kamikaze6'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/russ/src/kvm/git/kvm-userspace/kernel'
> make: *** [kernel] Error 2
>
> I can already build release 28 w/o issue, so i'm either doing
> something wrong, or this is a bug.
>

-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Building from git sources... Strange errors.
       [not found]     ` <9c4865a10706252146x491181c4na982977f5e8ea0c3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-26 14:33       ` Avi Kivity
       [not found]         ` <9c4865a10706261052ja9858e8x46600c9ab337a717@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Avi Kivity @ 2007-06-26 14:33 UTC (permalink / raw)
  To: Russell Harmon; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fwd:  Building from git sources... Strange errors.
       [not found]           ` <9c4865a10706261052ja9858e8x46600c9ab337a717-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-26 18:04             ` Russell Harmon
  0 siblings, 0 replies; 7+ messages in thread
From: Russell Harmon @ 2007-06-26 18:04 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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/

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Fwd:  Building from git sources... Strange errors.
       [not found]             ` <9c4865a10706261102v4ed6fdb2xc7d2d865a7311797-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-26 18:04               ` Russell Harmon
       [not found]                 ` <9c4865a10706261104y25d52752m59fbb0b3105b123d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Russell Harmon @ 2007-06-26 18:04 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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?

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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fwd:  Building from git sources... Strange errors.
       [not found]                 ` <9c4865a10706261104y25d52752m59fbb0b3105b123d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-26 18:14                   ` Anthony Liguori
       [not found]                     ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2007-06-26 18:14 UTC (permalink / raw)
  To: Russell Harmon; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fwd: Fwd: Building from git sources... Strange errors.
       [not found]                       ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-06-27  4:52                         ` Russell Harmon
  0 siblings, 0 replies; 7+ messages in thread
From: Russell Harmon @ 2007-06-27  4:52 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

I don't see how I could have a broken compiler (unless building gcc3
with gcc4 breaks it) I'm using gcc-3.4.6-r2 in portage, and the only
c/cxxflags i'm using is -pipe... So I can say I have a working
compiler.

Also, compiling it with my gcc4 compiler (which is what I built my
entire system on) breaks with the same error, and that is a compiler
that I know 100% works.

On 6/26/07, Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:
> 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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-06-27  4:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [not found]                     ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52@mail.gmail.com>
     [not found]                       ` <9c4865a10706262151u2c536399r56cd8de3f4a8aa52-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-06-27  4:52                         ` Fwd: " Russell Harmon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox