On Fri, Jun 17, 2011 at 12:18 AM, Jan Kiszka <jan.kiszka@xxxxxx> wrote: > On 2011-06-17 00:10, AP wrote: >> On Tue, Jun 14, 2011 at 11:37 PM, Jan Kiszka <jan.kiszka@xxxxxx> wrote: >>> On 2011-06-14 23:10, AP wrote: >>>> On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@xxxxxx> wrote: >>>>> On 2011-06-14 20:30, AP wrote: >>>>>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@xxxxxxxxxx> wrote: >>>>>>> On 06/13/2011 08:11 PM, AP wrote: >>>>>>>> >>>>>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@xxxxxxxxxx> wrote: >>>>>>>>> On 06/11/2011 03:02 AM, AP wrote: >>>>>>>>>> >>>>>>>>>> I am building kvm as an external module against 2.6.38-8 (Ubuntu 11.04 >>>>>>>>>> kernel). >>>>>>>>> >>>>>>>>> Why? >>>>>>>> >>>>>>>> I did not want move to the new kernel from kvm.git. >>>>>>> >>>>>>> I generally find that it works well, though I only run it on servers. >>>>>>> >>>>>>>> I just wanted to >>>>>>>> upgrade to the latest kvm module for some development. Is there a way >>>>>>>> to use the kvm.git tree and only build and load kvm? >>>>>>> >>>>>>> kvm-kmod. >>>>>> >>>>>> That is what I am using and running in to the permanent module issue. >>>>> >>>>> What version of kvm-kmod? What are your steps to reproduce? >>>>> >>>>> I've just checked the kvm-kmod-2.6.39 release in an Ubuntu 11.4 VM, and >>>>> it's loading&unloading fine. >>>> >>>> I am following the instruction that I found here under "building an >>>> external module with older kernels": >>>> http://www.linux-kvm.org/page/Code >>>> >>>> I ran: >>>> git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-kmod.git >>>> cd kvm-kmod >>>> git submodule update --init >>>> ./configure --kerneldir=/lib/modules/2.6.38-8-generic/build >>>> make sync >>>> make >>>> >>>> I am at: >>>> commit bed5dfdeb11cf3a749396e4c353018bae5aff66f >>>> Author: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> >>>> Date: Wed Jun 1 09:08:49 2011 +0200 >>>> >>>> Update source link >>>> >>>> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> >>>> >>>> The kvm source comes from the kernel tree that is part of kvm-kmod i.e >>>> in the linux-2.6 directory. >>>> >>>> Thanks, >>>> AP >>> >>> Still unreproducible here - and unexplainable. Can you debug your setup >>> further, maybe following the suspect you had regarding CONFIG_MODULE_UNLOAD? >> >> I am not able to figure out how kvm.mod.c and kvm-intel.mod.c get >> created at compile time. Could you please give me a pointer to where >> that happens? > > That's embedded in the standard build process of the kernel. If Ubuntu > didn't break it, the config should remain stable between primary source > files (as provided by kvm-kmod) and the generated ones (like *.mod.c). > So let's first check if the config used is consistent by adding > > #ifndef CONFIG_MODULE_UNLOAD > #warning CONFIG_MODULE_UNLOAD missing! > #endif > > to the end of x86/vmx.c (do not re-run 'make sync' afterward). I tired that and it did not give me any warning. Here is the compilation output: make -C /lib/modules/2.6.38-8-generic/build M=`pwd` \ LINUXINCLUDE="-I`pwd`/include -Iinclude \ -Iarch/x86/include \ -I`pwd`/include-compat -I`pwd`/x86 \ -include include/generated/autoconf.h \ -include `pwd`/x86/external-module-compat.h" \ "$@" make[1]: Entering directory `/usr/src/linux-headers-2.6.38-8-generic' CC [M] /home/ap/dev/kvm/kvm-kmod/x86/vmx.o LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm.o LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm-intel.o LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm-amd.o Building modules, stage 2. MODPOST 3 modules LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm-amd.ko CC /home/ap/dev/kvm/kvm-kmod/x86/kvm-intel.mod.o LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm-intel.ko LD [M] /home/ap/dev/kvm/kvm-kmod/x86/kvm.ko make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic' My other question is that I see "module_init(vmx_init)" and "module_exit(vmx_exit)" but nothing similar for kvm. Is that ok? Thanks, AP -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html