* compilation on ubuntu 32 bit host?
@ 2006-11-10 12:18 Gildas
[not found] ` <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Gildas @ 2006-11-10 12:18 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi,
Has anyone managed to compile kvm on an ubuntu 32 bit host? (using the
tarball kvm-2 available on sourceforge)
I have the following:
gn1@mbp18006i:~/install/kvm-2$ ./configure --qemu-cc=/usr/bin/gcc-3.4
ls: /usr/bin/gcc3*: No such file or directory
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/gn1/install/kvm-2/qemu
C compiler /usr/bin/gcc-3.4
Host C compiler gcc
make make
install install
host CPU i386
host big endian no
target list unknown-softmmu
gprof enabled no
profiler no
static build no
SDL support yes
SDL static link no
mingw32 support no
Adlib support no
CoreAudio support no
ALSA support no
DSound support no
FMOD support no
kqemu support no
kvm support yes
Documentation no
Unsupported target CPU
gn1@mbp18006i:~/install/kvm-2$ make
make -C kernel
make[1]: Entering directory `/home/gn1/install/kvm-2/kernel'
make -C /lib/modules/`uname -r`/build M=`pwd` "$@"
make[2]: Entering directory `/usr/src/linux-headers-2.6.15-27-686'
CC [M] /home/gn1/install/kvm-2/kernel/kvm_main.o
In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18:
/home/gn1/install/kvm-2/kernel/kvm.h:11:25: error: linux/mutex.h: No
such file or directory
In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18:
/home/gn1/install/kvm-2/kernel/kvm.h:163: error: field 'mutex' has
incomplete type
/home/gn1/install/kvm-2/kernel/kvm.h: In function 'page_header':
/home/gn1/install/kvm-2/kernel/kvm.h:377: error: 'struct page' has no
member named 'private'
/home/gn1/install/kvm-2/kernel/kvm_main.c: In function 'vcpu_load':
/home/gn1/install/kvm-2/kernel/kvm_main.c:449: warning: implicit
declaration of function 'mutex_lock'
/home/gn1/install/kvm-2/kernel/kvm_main.c:451: warning: implicit
declaration of function 'mutex_unlock'
/home/gn1/install/kvm-2/kernel/kvm_main.c: In function 'kvm_dev_open':
/home/gn1/install/kvm-2/kernel/kvm_main.c:561: warning: implicit
declaration of function 'mutex_init'
make[3]: *** [/home/gn1/install/kvm-2/kernel/kvm_main.o] Error 1
make[2]: *** [_module_/home/gn1/install/kvm-2/kernel] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.15-27-686'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/gn1/install/kvm-2/kernel'
make: *** [kernel] Error 2
My system is a ubuntu 6.06 installed on a macbookpro, using ubuntu
kernel 2.6.15-27-686
I have the following packages installed:
- zlib1g-dev 1.2.3-6ubuntu4
- uuid-dev 1.2-1.38-2ubuntu2
- linux-kernel-headers 2.6.11.2-0ubuntu18
- e2fslibs-dev 1.38-2ubuntu2
- libsdl-gfx1.2-dev 2.0.13-1
- libsdl1.2-dev 1.2.9-0.0ubuntu2
- linux-source-2.6.15 2.6.15-27.48
(this system runs a locally compiled qemu 0.8.2 + kqemu)
Cheers
Gildas
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
^ permalink raw reply [flat|nested] 15+ messages in thread[parent not found: <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2006-11-10 15:04 ` Anthony Liguori 2006-11-10 16:02 ` Avi Kivity 2006-11-14 13:42 ` Gildas 2 siblings, 0 replies; 15+ messages in thread From: Anthony Liguori @ 2006-11-10 15:04 UTC (permalink / raw) To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gildas wrote: > Hi, > > Has anyone managed to compile kvm on an ubuntu 32 bit host? (using the > tarball kvm-2 available on sourceforge) > My system is a ubuntu 6.06 installed on a macbookpro, using ubuntu > kernel 2.6.15-27-686 > > I have the following packages installed: > - zlib1g-dev 1.2.3-6ubuntu4 > - uuid-dev 1.2-1.38-2ubuntu2 > - linux-kernel-headers 2.6.11.2-0ubuntu18 You need to have the appropriate headers package installed for your kernel version. Regards, Anthony Liguori > - e2fslibs-dev 1.38-2ubuntu2 > - libsdl-gfx1.2-dev 2.0.13-1 > - libsdl1.2-dev 1.2.9-0.0ubuntu2 > - linux-source-2.6.15 2.6.15-27.48 > > (this system runs a locally compiled qemu 0.8.2 + kqemu) > > Cheers > Gildas > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2006-11-10 15:04 ` Anthony Liguori @ 2006-11-10 16:02 ` Avi Kivity [not found] ` <4554A2A6.8020509-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2006-11-14 13:42 ` Gildas 2 siblings, 1 reply; 15+ messages in thread From: Avi Kivity @ 2006-11-10 16:02 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gildas wrote: > Hi, > > Has anyone managed to compile kvm on an ubuntu 32 bit host? (using the > tarball kvm-2 available on sourceforge) > > [...] > gn1@mbp18006i:~/install/kvm-2$ make > make -C kernel > make[1]: Entering directory `/home/gn1/install/kvm-2/kernel' > make -C /lib/modules/`uname -r`/build M=`pwd` "$@" > make[2]: Entering directory `/usr/src/linux-headers-2.6.15-27-686' > CC [M] /home/gn1/install/kvm-2/kernel/kvm_main.o > In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18: > /home/gn1/install/kvm-2/kernel/kvm.h:11:25: error: linux/mutex.h: No > such file or directory > Linux 2.6.15 is pre 'struct mutex'. That turned up in Linux 2.6.16. If Ubuntu has a kernel update for 2.6.16 or later, you should try that. If not, you can convert the mutex to a semaphore: #include <linux/mutex.h> -> #include <asm/semaphore.h> 'struct mutex' -> 'struct semaphore' 'mutex_init()' -> 'init_MUTEX()' 'mutex_lock()' -> 'down()' 'mutex_unlock()' -> 'up()' Looks like 'struct page::private' has also been renamed. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <4554A2A6.8020509-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <4554A2A6.8020509-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2006-11-10 16:14 ` Gildas [not found] ` <b2ace7f20611100814o8438c3dybdf9a00b5ee512d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Gildas @ 2006-11-10 16:14 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 2102 bytes --] 2006/11/10, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>: > Gildas wrote: > > Hi, > > > > Has anyone managed to compile kvm on an ubuntu 32 bit host? (using the > > tarball kvm-2 available on sourceforge) > > > > > > > [...] > > > gn1@mbp18006i:~/install/kvm-2$ make > > make -C kernel > > make[1]: Entering directory `/home/gn1/install/kvm-2/kernel' > > make -C /lib/modules/`uname -r`/build M=`pwd` "$@" > > make[2]: Entering directory `/usr/src/linux-headers-2.6.15-27-686' > > CC [M] /home/gn1/install/kvm-2/kernel/kvm_main.o > > In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18: > > /home/gn1/install/kvm-2/kernel/kvm.h:11:25: error: linux/mutex.h: No > > such file or directory > > > Linux 2.6.15 is pre 'struct mutex'. That turned up in Linux 2.6.16. > > If Ubuntu has a kernel update for 2.6.16 or later, you should try that. > If not, you can convert the mutex to a semaphore: > > #include <linux/mutex.h> -> #include <asm/semaphore.h> > 'struct mutex' -> 'struct semaphore' > 'mutex_init()' -> 'init_MUTEX()' > 'mutex_lock()' -> 'down()' > 'mutex_unlock()' -> 'up()' Done, I include a patch with the modifications for those ubuntu users out there :) > Looks like 'struct page::private' has also been renamed. Yes... gn1@mbp18006i:~/install/kvm-2$ make make -C kernel make[1]: Entering directory `/home/gn1/install/kvm-2/kernel' make -C /lib/modules/`uname -r`/build M=`pwd` "$@" make[2]: Entering directory `/usr/src/linux-headers-2.6.15-27-686' CC [M] /home/gn1/install/kvm-2/kernel/kvm_main.o In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18: /home/gn1/install/kvm-2/kernel/kvm.h: In function 'page_header': /home/gn1/install/kvm-2/kernel/kvm.h:377: error: 'struct page' has no member named 'private' make[3]: *** [/home/gn1/install/kvm-2/kernel/kvm_main.o] Error 1 make[2]: *** [_module_/home/gn1/install/kvm-2/kernel] Error 2 make[2]: Leaving directory `/usr/src/linux-headers-2.6.15-27-686' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/gn1/install/kvm-2/kernel' make: *** [kernel] Error 2 What should I change? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: mutex_ubuntu.patch --] [-- Type: text/x-patch; name="mutex_ubuntu.patch", Size: 1655 bytes --] --- kernel/kvm.h.orig 2006-11-09 11:04:41.000000000 +0000 +++ kernel/kvm.h 2006-11-10 16:07:46.000000000 +0000 @@ -8,7 +8,7 @@ #include <linux/types.h> #include <linux/list.h> -#include <linux/mutex.h> +#include <asm/semaphore.h> #include <linux/spinlock.h> #include <linux/mm.h> @@ -160,7 +160,7 @@ struct kvm_vcpu { struct kvm *kvm; struct vmcs *vmcs; - struct mutex mutex; + struct semaphore mutex; int cpu; int launched; unsigned long irq_summary; /* bit vector: 1 per word in irq_pending */ --- kernel/kvm_main.c.orig 2006-11-09 11:16:43.000000000 +0000 +++ kernel/kvm_main.c 2006-11-10 16:09:46.000000000 +0000 @@ -446,9 +446,9 @@ { struct kvm_vcpu *vcpu = &kvm->vcpus[vcpu_slot]; - mutex_lock(&vcpu->mutex); + down(&vcpu->mutex); if (unlikely(!vcpu->vmcs)) { - mutex_unlock(&vcpu->mutex); + up(&vcpu->mutex); return 0; } return __vcpu_load(vcpu); @@ -457,7 +457,7 @@ static void vcpu_put(struct kvm_vcpu *vcpu) { put_cpu(); - mutex_unlock(&vcpu->mutex); + up(&vcpu->mutex); } @@ -558,7 +558,7 @@ for (i = 0; i < KVM_MAX_VCPUS; ++i) { struct kvm_vcpu *vcpu = &kvm->vcpus[i]; - mutex_init(&vcpu->mutex); + init_MUTEX(&vcpu->mutex); vcpu->mmu.root_hpa = INVALID_PAGE; INIT_LIST_HEAD(&vcpu->free_pages); } @@ -1352,10 +1352,10 @@ vcpu = &kvm->vcpus[n]; - mutex_lock(&vcpu->mutex); + down(&vcpu->mutex); if (vcpu->vmcs) { - mutex_unlock(&vcpu->mutex); + up(&vcpu->mutex); return -EEXIST; } @@ -1367,7 +1367,7 @@ vcpu->kvm = kvm; vmcs = alloc_vmcs(); if (!vmcs) { - mutex_unlock(&vcpu->mutex); + up(&vcpu->mutex); goto out_free_vcpus; } vmcs_clear(vmcs); [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <b2ace7f20611100814o8438c3dybdf9a00b5ee512d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611100814o8438c3dybdf9a00b5ee512d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2006-11-10 16:29 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2006-11-10 16:29 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gildas wrote: > 2006/11/10, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>: >> Gildas wrote: >> > Hi, >> > >> > Has anyone managed to compile kvm on an ubuntu 32 bit host? (using the >> > tarball kvm-2 available on sourceforge) >> > >> > >> >> >> [...] >> >> > gn1@mbp18006i:~/install/kvm-2$ make >> > make -C kernel >> > make[1]: Entering directory `/home/gn1/install/kvm-2/kernel' >> > make -C /lib/modules/`uname -r`/build M=`pwd` "$@" >> > make[2]: Entering directory `/usr/src/linux-headers-2.6.15-27-686' >> > CC [M] /home/gn1/install/kvm-2/kernel/kvm_main.o >> > In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18: >> > /home/gn1/install/kvm-2/kernel/kvm.h:11:25: error: linux/mutex.h: No >> > such file or directory >> > >> Linux 2.6.15 is pre 'struct mutex'. That turned up in Linux 2.6.16. >> >> If Ubuntu has a kernel update for 2.6.16 or later, you should try that. >> If not, you can convert the mutex to a semaphore: >> >> #include <linux/mutex.h> -> #include <asm/semaphore.h> >> 'struct mutex' -> 'struct semaphore' >> 'mutex_init()' -> 'init_MUTEX()' >> 'mutex_lock()' -> 'down()' >> 'mutex_unlock()' -> 'up()' > > Done, I include a patch with the modifications for those ubuntu users > out there :) > Cool. Once it works I'll post it and link to it from the HOWTO. >> Looks like 'struct page::private' has also been renamed. > > Yes... > In file included from /home/gn1/install/kvm-2/kernel/kvm_main.c:18: > /home/gn1/install/kvm-2/kernel/kvm.h: In function 'page_header': > /home/gn1/install/kvm-2/kernel/kvm.h:377: error: 'struct page' has no > member named 'private' > > What should I change? > Look in your include/linux/mm.h, where 'struct page' lived until recently. It's probably named 'private' but inside some union or sub-structure. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2006-11-10 15:04 ` Anthony Liguori 2006-11-10 16:02 ` Avi Kivity @ 2006-11-14 13:42 ` Gildas [not found] ` <b2ace7f20611140542of22cf8alc7efdfd0af6be6c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2 siblings, 1 reply; 15+ messages in thread From: Gildas @ 2006-11-14 13:42 UTC (permalink / raw) To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hi all, My macbookpro has been reinstalled in ubuntu/edgy and I was able to compile kvm against kernel 2.6.17-10-generic. When booting with "noapic nosmp", I can finally insmod kvm.ko. When I don't boot with "noapic nosmp", insmod leads to a kernel panic (smp_call_function.interrupt) But then, if I run "sudo /usr/local/bin/qemu -hda vm.img -cdrom ubuntu-6.10-desktop-i386.iso -boot d -m 384", qemu crash with the following errors: set_vram_mapping: memory: e0000000 - e0800000 set_vram_mapping: return 0x9e17f000 vga_update_vram: base 0x9e17f000 ptr 0x9e97f008 vga_update_vram: done exception 13 (0) Aborted (core dumped) In /var/log/syslog I have the following: msrs: 1 vmwrite error: reg 2012 value 0 (err 12) vmwrite error: reg 401c value 0 (err 12) Cheers Gildas ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <b2ace7f20611140542of22cf8alc7efdfd0af6be6c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611140542of22cf8alc7efdfd0af6be6c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2006-11-14 13:51 ` Avi Kivity [not found] ` <4559C9D7.2050107-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Avi Kivity @ 2006-11-14 13:51 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gildas wrote: > Hi all, > > My macbookpro has been reinstalled in ubuntu/edgy and I was able to > compile kvm against kernel 2.6.17-10-generic. > > When booting with "noapic nosmp", I can finally insmod kvm.ko. When I > don't boot with "noapic nosmp", insmod leads to a kernel panic > (smp_call_function.interrupt) > Looks like the BIOS sets up only one core. I'll cook up a patch to test all cores for VT. > But then, if I run "sudo /usr/local/bin/qemu -hda vm.img -cdrom > ubuntu-6.10-desktop-i386.iso -boot d -m 384", qemu crash with the > following errors: > > set_vram_mapping: memory: e0000000 - e0800000 > set_vram_mapping: return 0x9e17f000 > vga_update_vram: base 0x9e17f000 ptr 0x9e97f008 > vga_update_vram: done > exception 13 (0) > Aborted (core dumped) > > In /var/log/syslog I have the following: > > msrs: 1 > vmwrite error: reg 2012 value 0 (err 12) > vmwrite error: reg 401c value 0 (err 12) > > These are benign. Please post the tail of dmesg and an strace. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <4559C9D7.2050107-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <4559C9D7.2050107-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2006-11-14 13:59 ` Gildas [not found] ` <b2ace7f20611140559s303a26bcr425506a2f2711390-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Gildas @ 2006-11-14 13:59 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 1221 bytes --] 2006/11/14, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>: > Gildas wrote: > > Hi all, > > > > My macbookpro has been reinstalled in ubuntu/edgy and I was able to > > compile kvm against kernel 2.6.17-10-generic. > > > > When booting with "noapic nosmp", I can finally insmod kvm.ko. When I > > don't boot with "noapic nosmp", insmod leads to a kernel panic > > (smp_call_function.interrupt) > > > > Looks like the BIOS sets up only one core. I'll cook up a patch to test > all cores for VT. I'll test it happily > > But then, if I run "sudo /usr/local/bin/qemu -hda vm.img -cdrom > > ubuntu-6.10-desktop-i386.iso -boot d -m 384", qemu crash with the > > following errors: > > > > set_vram_mapping: memory: e0000000 - e0800000 > > set_vram_mapping: return 0x9e17f000 > > vga_update_vram: base 0x9e17f000 ptr 0x9e97f008 > > vga_update_vram: done > > exception 13 (0) > > Aborted (core dumped) > > > > In /var/log/syslog I have the following: > > > > msrs: 1 > > vmwrite error: reg 2012 value 0 (err 12) > > vmwrite error: reg 401c value 0 (err 12) > > > > > > These are benign. > > Please post the tail of dmesg and an strace. Here they are The core dump may be provided out of list as well if of any use. [-- Attachment #2: tail --] [-- Type: application/octet-stream, Size: 535 bytes --] [17182675.628000] msrs: 1 [17182675.628000] vmwrite error: reg 2012 value 0 (err 12) [17182675.628000] vmwrite error: reg 401c value 0 (err 12) [17182930.920000] ADDRCONF(NETDEV_CHANGE): ath0: link becomes ready [17182932.924000] ADDRCONF(NETDEV_UP): ath0: link is not ready [17182933.952000] ADDRCONF(NETDEV_CHANGE): ath0: link becomes ready [17182947.912000] ath0: no IPv6 routers present [17183098.916000] msrs: 1 [17183098.916000] vmwrite error: reg 2012 value 0 (err 12) [17183098.916000] vmwrite error: reg 401c value 0 (err 12) [-- Attachment #3: strace_kvm.gz --] [-- Type: application/x-gzip, Size: 34150 bytes --] [-- Attachment #4: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #5: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <b2ace7f20611140559s303a26bcr425506a2f2711390-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611140559s303a26bcr425506a2f2711390-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2006-11-14 14:16 ` Avi Kivity [not found] ` <4559CFBE.1020903-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2006-11-14 14:32 ` compilation on ubuntu 32 bit host? Avi Kivity 1 sibling, 1 reply; 15+ messages in thread From: Avi Kivity @ 2006-11-14 14:16 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gildas wrote: > > Here they are > > The core dump may be provided out of list as well if of any use. Looks like the guest is using some instruction which we don't emulate well. This is a live cd, right? Can you post a link? I'll try to reproduce it here. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <4559CFBE.1020903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Ubunto live cd (was: Re: compilation on ubuntu 32 bit host?) [not found] ` <4559CFBE.1020903-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2006-11-15 9:52 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2006-11-15 9:52 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Avi Kivity wrote: > Gildas wrote: >> >> Here they are >> >> The core dump may be provided out of list as well if of any use. > > Looks like the guest is using some instruction which we don't emulate > well. > > This is a live cd, right? Can you post a link? I'll try to reproduce > it here. > Confirmed, the guest is using 32-bit addresses in real mode which VT does not support. The fix is nontrivial, we need to flesh out x86_emulate.c to support all missing real-mode instructions and switch to using that instead of VT for real mode. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: compilation on ubuntu 32 bit host? [not found] ` <b2ace7f20611140559s303a26bcr425506a2f2711390-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2006-11-14 14:16 ` Avi Kivity @ 2006-11-14 14:32 ` Avi Kivity [not found] ` <4559D38A.9080802-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 1 sibling, 1 reply; 15+ messages in thread From: Avi Kivity @ 2006-11-14 14:32 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 116 bytes --] Gildas wrote: > > I'll test it happily attached. -- error compiling committee.c: too many arguments to function [-- Attachment #2: kvm-test-bios-vmx-on-all-cpus.patch --] [-- Type: text/x-patch, Size: 749 bytes --] Index: kvm_main.c =================================================================== --- kvm_main.c (revision 3648) +++ kvm_main.c (working copy) @@ -555,14 +555,26 @@ return 0; } -static __init int vmx_disabled_by_bios(void) +static int vmx_disabled; + +static __init void __vmx_disabled_by_bios(void *garbage) { u64 msr; rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); - return (msr & 5) == 1; /* locked but not enabled */ + if ((msr & 5) == 1) { /* locked but not enabled */ + vmx_disabled = 1; + smp_wmb(); + } } +static __init int vmx_disabled_by_bios(void) +{ + on_each_cpu(__vmx_disabled_by_bios, 0, 0, 1); + smp_rmb(); + return vmx_disabled; +} + static __init void kvm_enable(void *garbage) { int cpu = raw_smp_processor_id(); [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <4559D38A.9080802-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <4559D38A.9080802-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2006-11-14 15:14 ` Avi Kivity [not found] ` <4559DD41.4010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Avi Kivity @ 2006-11-14 15:14 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 273 bytes --] Avi Kivity wrote: > Gildas wrote: >> >> I'll test it happily > > attached. > [failed live on IRC] Please try this new one. It will display a few lines before crashing. (revert the previous patch before) -- error compiling committee.c: too many arguments to function [-- Attachment #2: kvm-test-bios-vmx-on-all-cpus-2.patch --] [-- Type: text/x-patch, Size: 1873 bytes --] Index: kvm_main.c =================================================================== --- kvm_main.c (revision 3648) +++ kvm_main.c (working copy) @@ -555,27 +555,58 @@ return 0; } -static __init int vmx_disabled_by_bios(void) +static int vmx_disabled; + +static __init void __vmx_disabled_by_bios(void *garbage) { u64 msr; rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); - return (msr & 5) == 1; /* locked but not enabled */ + if ((msr & 5) == 1) { /* locked but not enabled */ + vmx_disabled = 1; + smp_wmb(); + } } +static __init int vmx_disabled_by_bios(void) +{ + on_each_cpu(__vmx_disabled_by_bios, 0, 0, 1); + smp_rmb(); + return vmx_disabled; +} + static __init void kvm_enable(void *garbage) { int cpu = raw_smp_processor_id(); u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); u64 old; + u64 cr0f0, cr0f1, cr4f0, cr4f1; rdmsrl(MSR_IA32_FEATURE_CONTROL, old); if ((old & 5) == 0) /* enable and lock */ wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5); write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */ + printk(KERN_ERR "enabling vmx on cpu %d\n", raw_smp_processor_id()); + printk(KERN_ERR "cr0 %lx cr4 %lx phys_addr %llx\n", + read_cr0(), read_cr4(), phys_addr); + +#define MSR_IA32_VMX_CR0_FIXED0 0x486 +#define MSR_IA32_VMX_CR0_FIXED1 0x487 + +#define MSR_IA32_VMX_CR4_FIXED0 0x488 +#define MSR_IA32_VMX_CR4_FIXED1 0x489 + + rdmsrl(MSR_IA32_VMX_CR0_FIXED0, cr0f0); + rdmsrl(MSR_IA32_VMX_CR0_FIXED1, cr0f1); + rdmsrl(MSR_IA32_VMX_CR4_FIXED0, cr4f0); + rdmsrl(MSR_IA32_VMX_CR4_FIXED1, cr4f1); + printk(KERN_ERR "cr0 fixed %llx %llx\n", cr0f0, cr0f1); + printk(KERN_ERR "cr4 fixed %llx %llx\n", cr4f0, cr4f1); + printk(KERN_ERR "doing it now!\n"); asm volatile (ASM_VMX_VMXON_RAX : : "a"(&phys_addr), "m"(phys_addr) : "memory", "cc"); + printk(KERN_ERR "done\n"); } static void kvm_disable(void *garbage) [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <4559DD41.4010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <4559DD41.4010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2006-11-14 15:39 ` Avi Kivity 2006-11-14 16:35 ` Muli Ben-Yehuda 1 sibling, 0 replies; 15+ messages in thread From: Avi Kivity @ 2006-11-14 15:39 UTC (permalink / raw) To: Gildas; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f [-- Attachment #1: Type: text/plain, Size: 233 bytes --] Avi Kivity wrote: > Avi Kivity wrote: >> Gildas wrote: >>> >>> I'll test it happily >> >> attached. >> > > [failed live on IRC] > [did not apply] new patch attached -- error compiling committee.c: too many arguments to function [-- Attachment #2: kvm-test-bios-vmx-on-all-cpus-3.patch --] [-- Type: text/x-patch, Size: 1830 bytes --] --- ./kvm_main.c.old 2006-11-14 17:35:50.000000000 +0200 +++ ./kvm_main.c 2006-11-14 17:37:31.000000000 +0200 @@ -518,12 +518,24 @@ return 0; } -static __init int vmx_disabled_by_bios(void) +static int vmx_disabled; + +static __init void __vmx_disabled_by_bios(void *garbage) { u64 msr; rdmsrl(MSR_IA32_FEATURE_CONTROL, msr); - return (msr & 5) == 1; /* locked but not enabled */ + if ((msr & 5) == 1) { /* locked but not enabled */ + vmx_disabled = 1; + smp_wmb(); + } +} + +static __init int vmx_disabled_by_bios(void) +{ + on_each_cpu(__vmx_disabled_by_bios, 0, 0, 1); + smp_rmb(); + return vmx_disabled; } static __init void kvm_enable(void *garbage) @@ -531,13 +543,32 @@ int cpu = raw_smp_processor_id(); u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); u64 old; + u64 cr0f0, cr0f1, cr4f0, cr4f1; rdmsrl(MSR_IA32_FEATURE_CONTROL, old); if ((old & 5) == 0) /* enable and lock */ wrmsrl(MSR_IA32_FEATURE_CONTROL, old | 5); write_cr4(read_cr4() | CR4_VMXE); /* FIXME: not cpu hotplug safe */ + printk(KERN_ERR "enabling vmx on cpu %d\n", raw_smp_processor_id()); + printk(KERN_ERR "cr0 %lx cr4 %lx phys_addr %llx\n", + read_cr0(), read_cr4(), phys_addr); + +#define MSR_IA32_VMX_CR0_FIXED0 0x486 +#define MSR_IA32_VMX_CR0_FIXED1 0x487 + +#define MSR_IA32_VMX_CR4_FIXED0 0x488 +#define MSR_IA32_VMX_CR4_FIXED1 0x489 + + rdmsrl(MSR_IA32_VMX_CR0_FIXED0, cr0f0); + rdmsrl(MSR_IA32_VMX_CR0_FIXED1, cr0f1); + rdmsrl(MSR_IA32_VMX_CR4_FIXED0, cr4f0); + rdmsrl(MSR_IA32_VMX_CR4_FIXED1, cr4f1); + printk(KERN_ERR "cr0 fixed %llx %llx\n", cr0f0, cr0f1); + printk(KERN_ERR "cr4 fixed %llx %llx\n", cr4f0, cr4f1); + printk(KERN_ERR "doing it now!\n"); asm volatile (ASM_VMX_VMXON_RAX : : "a"(&phys_addr) : "memory", "cc"); + printk(KERN_ERR "done\n"); } static void kvm_disable(void *garbage) [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 186 bytes --] _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: compilation on ubuntu 32 bit host? [not found] ` <4559DD41.4010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2006-11-14 15:39 ` Avi Kivity @ 2006-11-14 16:35 ` Muli Ben-Yehuda [not found] ` <20061114163556.GA6848-k73YwwB0fHlWk0Htik3J/w@public.gmane.org> 1 sibling, 1 reply; 15+ messages in thread From: Muli Ben-Yehuda @ 2006-11-14 16:35 UTC (permalink / raw) To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Tue, Nov 14, 2006 at 05:14:09PM +0200, Avi Kivity wrote: > [failed live on IRC] Is there an official IRC channel? Cheers, Muli ------------------------------------------------------------------------- SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. Check out Slashdot's new job board. Browse through tons of technical jobs posted by companies looking to hire people just like you. http://jobs.slashdot.org/ ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20061114163556.GA6848-k73YwwB0fHlWk0Htik3J/w@public.gmane.org>]
* Re: compilation on ubuntu 32 bit host? [not found] ` <20061114163556.GA6848-k73YwwB0fHlWk0Htik3J/w@public.gmane.org> @ 2006-11-14 16:37 ` Avi Kivity 0 siblings, 0 replies; 15+ messages in thread From: Avi Kivity @ 2006-11-14 16:37 UTC (permalink / raw) To: Muli Ben-Yehuda; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Muli Ben-Yehuda wrote: > On Tue, Nov 14, 2006 at 05:14:09PM +0200, Avi Kivity wrote: > > >> [failed live on IRC] >> > > Is there an official IRC channel? > > #kvm on freenode -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. Check out Slashdot's new job board. Browse through tons of technical jobs posted by companies looking to hire people just like you. http://jobs.slashdot.org/ ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2006-11-15 9:52 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 12:18 compilation on ubuntu 32 bit host? Gildas
[not found] ` <b2ace7f20611100418i6e94ed5ehaaadeda5a708009e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-11-10 15:04 ` Anthony Liguori
2006-11-10 16:02 ` Avi Kivity
[not found] ` <4554A2A6.8020509-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-10 16:14 ` Gildas
[not found] ` <b2ace7f20611100814o8438c3dybdf9a00b5ee512d3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-11-10 16:29 ` Avi Kivity
2006-11-14 13:42 ` Gildas
[not found] ` <b2ace7f20611140542of22cf8alc7efdfd0af6be6c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-11-14 13:51 ` Avi Kivity
[not found] ` <4559C9D7.2050107-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-14 13:59 ` Gildas
[not found] ` <b2ace7f20611140559s303a26bcr425506a2f2711390-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-11-14 14:16 ` Avi Kivity
[not found] ` <4559CFBE.1020903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-15 9:52 ` Ubunto live cd (was: Re: compilation on ubuntu 32 bit host?) Avi Kivity
2006-11-14 14:32 ` compilation on ubuntu 32 bit host? Avi Kivity
[not found] ` <4559D38A.9080802-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-14 15:14 ` Avi Kivity
[not found] ` <4559DD41.4010305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-11-14 15:39 ` Avi Kivity
2006-11-14 16:35 ` Muli Ben-Yehuda
[not found] ` <20061114163556.GA6848-k73YwwB0fHlWk0Htik3J/w@public.gmane.org>
2006-11-14 16:37 ` Avi Kivity
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox