* Unable to unload kvm-intel module
[not found] <BANLkTikYgrQ0Ge-RgXOQcNv6Osr1Xs1k9Q@mail.gmail.com>
@ 2011-06-11 0:02 ` AP
2011-06-12 15:35 ` Avi Kivity
0 siblings, 1 reply; 14+ messages in thread
From: AP @ 2011-06-11 0:02 UTC (permalink / raw)
To: kvm
I am building kvm as an external module against 2.6.38-8 (Ubuntu 11.04
kernel). The kvm.ko and kvm-intel.ko build and insmod without any
issues. However I am able to unload the kvm-intel module. Here is the
lsmod listing:
kvm_intel 135653 0 [permanent]
kvm 381130 1 kvm_intel,[permanent]
This is the error I get when I try to unload the module:
ERROR: Removing 'kvm_intel': Device or resource busy
Do I need to do anything special during building for
CONFIG_MODULE_UNLOAD to take effect?
PS: I am able to rmmod the kvm module that is packages with the Ubuntu
11.04 kernel.
Thanks,
AP
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-11 0:02 ` Unable to unload kvm-intel module AP
@ 2011-06-12 15:35 ` Avi Kivity
2011-06-13 17:11 ` AP
0 siblings, 1 reply; 14+ messages in thread
From: Avi Kivity @ 2011-06-12 15:35 UTC (permalink / raw)
To: AP; +Cc: kvm
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?
> The kvm.ko and kvm-intel.ko build and insmod without any
> issues. However I am able to unload the kvm-intel module. Here is the
> lsmod listing:
>
> kvm_intel 135653 0 [permanent]
> kvm 381130 1 kvm_intel,[permanent]
>
> This is the error I get when I try to unload the module:
>
> ERROR: Removing 'kvm_intel': Device or resource busy
>
> Do I need to do anything special during building for
> CONFIG_MODULE_UNLOAD to take effect?
>
No, as far as I know it should just work, and always has for me. But it
does say [permanent]. Any clue why in dmesg?
> PS: I am able to rmmod the kvm module that is packages with the Ubuntu
> 11.04 kernel.
Does it say [permanent] with these modules?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-12 15:35 ` Avi Kivity
@ 2011-06-13 17:11 ` AP
2011-06-14 6:25 ` Jan Kiszka
2011-06-14 8:32 ` Avi Kivity
0 siblings, 2 replies; 14+ messages in thread
From: AP @ 2011-06-13 17:11 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity <avi@redhat.com> 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 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?
>> The kvm.ko and kvm-intel.ko build and insmod without any
>> issues. However I am able to unload the kvm-intel module. Here is the
>> lsmod listing:
>>
>> kvm_intel 135653 0 [permanent]
>> kvm 381130 1 kvm_intel,[permanent]
>>
>> This is the error I get when I try to unload the module:
>>
>> ERROR: Removing 'kvm_intel': Device or resource busy
>>
>> Do I need to do anything special during building for
>> CONFIG_MODULE_UNLOAD to take effect?
>>
>
> No, as far as I know it should just work, and always has for me. But it
> does say [permanent]. Any clue why in dmesg?
The only thing I see in dmesg is:
loaded kvm module (v2.6.39-8627-g2c2b5df)
>> PS: I am able to rmmod the kvm module that is packages with the Ubuntu
>> 11.04 kernel.
>
> Does it say [permanent] with these modules?
No it does not.
kvm_intel 56851 0
kvm 367707 1 kvm_intel
> --
> error compiling committee.c: too many arguments to function
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-13 17:11 ` AP
@ 2011-06-14 6:25 ` Jan Kiszka
2011-06-14 8:32 ` Avi Kivity
1 sibling, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2011-06-14 6:25 UTC (permalink / raw)
To: AP; +Cc: Avi Kivity, kvm
[-- Attachment #1: Type: text/plain, Size: 603 bytes --]
On 2011-06-13 19:11, AP wrote:
> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity <avi@redhat.com> 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 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?
You want to use the kvm-kmod package, e.g.
http://sourceforge.net/projects/kvm/files/kvm-kmod/2.6.39/kvm-kmod-2.6.39.tar.bz2/download
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-13 17:11 ` AP
2011-06-14 6:25 ` Jan Kiszka
@ 2011-06-14 8:32 ` Avi Kivity
2011-06-14 18:30 ` AP
1 sibling, 1 reply; 14+ messages in thread
From: Avi Kivity @ 2011-06-14 8:32 UTC (permalink / raw)
To: AP; +Cc: kvm
On 06/13/2011 08:11 PM, AP wrote:
> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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.
> >> The kvm.ko and kvm-intel.ko build and insmod without any
> >> issues. However I am able to unload the kvm-intel module. Here is the
> >> lsmod listing:
> >>
> >> kvm_intel 135653 0 [permanent]
> >> kvm 381130 1 kvm_intel,[permanent]
> >>
> >> This is the error I get when I try to unload the module:
> >>
> >> ERROR: Removing 'kvm_intel': Device or resource busy
> >>
> >> Do I need to do anything special during building for
> >> CONFIG_MODULE_UNLOAD to take effect?
> >>
> >
> > No, as far as I know it should just work, and always has for me. But it
> > does say [permanent]. Any clue why in dmesg?
>
> The only thing I see in dmesg is:
> loaded kvm module (v2.6.39-8627-g2c2b5df)
if (mod->init != NULL && mod->exit == NULL) {
printed_something = 1;
seq_printf(m, "[permanent],");
}
I don't recall anything in kvm-kmod playing with these, so it's a
mystery why this happens.
kvm.ko doesn't have an init or exit function. kvm-intel.ko has both.
Wierd.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-14 8:32 ` Avi Kivity
@ 2011-06-14 18:30 ` AP
2011-06-14 20:05 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: AP @ 2011-06-14 18:30 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
> On 06/13/2011 08:11 PM, AP wrote:
>>
>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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.
>> >> The kvm.ko and kvm-intel.ko build and insmod without any
>> >> issues. However I am able to unload the kvm-intel module. Here is the
>> >> lsmod listing:
>> >>
>> >> kvm_intel 135653 0 [permanent]
>> >> kvm 381130 1 kvm_intel,[permanent]
>> >>
>> >> This is the error I get when I try to unload the module:
>> >>
>> >> ERROR: Removing 'kvm_intel': Device or resource busy
>> >>
>> >> Do I need to do anything special during building for
>> >> CONFIG_MODULE_UNLOAD to take effect?
>> >>
>> >
>> > No, as far as I know it should just work, and always has for me. But
>> > it
>> > does say [permanent]. Any clue why in dmesg?
>>
>> The only thing I see in dmesg is:
>> loaded kvm module (v2.6.39-8627-g2c2b5df)
>
> if (mod->init != NULL && mod->exit == NULL) {
> printed_something = 1;
> seq_printf(m, "[permanent],");
> }
>
> I don't recall anything in kvm-kmod playing with these, so it's a mystery
> why this happens.
>
> kvm.ko doesn't have an init or exit function. kvm-intel.ko has both.
> Wierd.
When I look at kvm.mod.c and kvm-intel.mod.c which I think are built
on the fly during compile time, I see the following:
struct module __this_module
__attribute__((section(".gnu.linkonce.this_module"))) = {
.name = KBUILD_MODNAME,
.init = init_module,
#ifdef CONFIG_MODULE_UNLOAD
.exit = cleanup_module,
#endif
.arch = MODULE_ARCH_INIT,
};
My fear is that for some reason CONFIG_MODULE_UNLOAD is not getting
set and hence .exit fields are not being compiled. Though I am not
completely sure of this.
AP
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-14 18:30 ` AP
@ 2011-06-14 20:05 ` Jan Kiszka
2011-06-14 21:10 ` AP
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2011-06-14 20:05 UTC (permalink / raw)
To: AP; +Cc: Avi Kivity, kvm
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
On 2011-06-14 20:30, AP wrote:
> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>> On 06/13/2011 08:11 PM, AP wrote:
>>>
>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-14 20:05 ` Jan Kiszka
@ 2011-06-14 21:10 ` AP
2011-06-15 6:37 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: AP @ 2011-06-14 21:10 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, kvm
On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2011-06-14 20:30, AP wrote:
>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>>> On 06/13/2011 08:11 PM, AP wrote:
>>>>
>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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@siemens.com>
Date: Wed Jun 1 09:08:49 2011 +0200
Update source link
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The kvm source comes from the kernel tree that is part of kvm-kmod i.e
in the linux-2.6 directory.
Thanks,
AP
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-14 21:10 ` AP
@ 2011-06-15 6:37 ` Jan Kiszka
2011-06-16 22:10 ` AP
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2011-06-15 6:37 UTC (permalink / raw)
To: AP; +Cc: Avi Kivity, kvm
[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]
On 2011-06-14 23:10, AP wrote:
> On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2011-06-14 20:30, AP wrote:
>>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>>>> On 06/13/2011 08:11 PM, AP wrote:
>>>>>
>>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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@siemens.com>
> Date: Wed Jun 1 09:08:49 2011 +0200
>
> Update source link
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> 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?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-15 6:37 ` Jan Kiszka
@ 2011-06-16 22:10 ` AP
2011-06-17 7:18 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: AP @ 2011-06-16 22:10 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, kvm
On Tue, Jun 14, 2011 at 11:37 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2011-06-14 23:10, AP wrote:
>> On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>> On 2011-06-14 20:30, AP wrote:
>>>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>>>>> On 06/13/2011 08:11 PM, AP wrote:
>>>>>>
>>>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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@siemens.com>
>> Date: Wed Jun 1 09:08:49 2011 +0200
>>
>> Update source link
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> 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?
Thanks,
AP
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-16 22:10 ` AP
@ 2011-06-17 7:18 ` Jan Kiszka
2011-06-17 18:04 ` AP
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2011-06-17 7:18 UTC (permalink / raw)
To: AP; +Cc: Avi Kivity, kvm
[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]
On 2011-06-17 00:10, AP wrote:
> On Tue, Jun 14, 2011 at 11:37 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2011-06-14 23:10, AP wrote:
>>> On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>>> On 2011-06-14 20:30, AP wrote:
>>>>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>>>>>> On 06/13/2011 08:11 PM, AP wrote:
>>>>>>>
>>>>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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@siemens.com>
>>> Date: Wed Jun 1 09:08:49 2011 +0200
>>>
>>> Update source link
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> 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).
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-17 7:18 ` Jan Kiszka
@ 2011-06-17 18:04 ` AP
2011-06-19 9:06 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: AP @ 2011-06-17 18:04 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, kvm
On Fri, Jun 17, 2011 at 12:18 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2011-06-17 00:10, AP wrote:
>> On Tue, Jun 14, 2011 at 11:37 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>> On 2011-06-14 23:10, AP wrote:
>>>> On Tue, Jun 14, 2011 at 1:05 PM, Jan Kiszka <jan.kiszka@web.de> wrote:
>>>>> On 2011-06-14 20:30, AP wrote:
>>>>>> On Tue, Jun 14, 2011 at 1:32 AM, Avi Kivity <avi@redhat.com> wrote:
>>>>>>> On 06/13/2011 08:11 PM, AP wrote:
>>>>>>>>
>>>>>>>> On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity<avi@redhat.com> 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@siemens.com>
>>>> Date: Wed Jun 1 09:08:49 2011 +0200
>>>>
>>>> Update source link
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-17 18:04 ` AP
@ 2011-06-19 9:06 ` Jan Kiszka
2011-06-20 21:13 ` AP
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2011-06-19 9:06 UTC (permalink / raw)
To: AP; +Cc: Avi Kivity, kvm
[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]
On 2011-06-17 20:04, AP wrote:
> 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'
Do you install the built modules and then do a modprobe, or how do you
load them? Also try via
insmod /home/ap/dev/kvm/kvm-kmod/x86/kvm.ko
I don't know. Something must be broken with your Ubuntu installation.
>
> My other question is that I see "module_init(vmx_init)" and
> "module_exit(vmx_exit)" but nothing similar for kvm. Is that ok?
Yes, kvm.ko is just a library to kvm-intel/amd.ko. Those modules drive
init and cleanup.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Unable to unload kvm-intel module
2011-06-19 9:06 ` Jan Kiszka
@ 2011-06-20 21:13 ` AP
0 siblings, 0 replies; 14+ messages in thread
From: AP @ 2011-06-20 21:13 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Avi Kivity, kvm
On Sun, Jun 19, 2011 at 2:06 AM, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2011-06-17 20:04, AP wrote:
>> 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'
>
> Do you install the built modules and then do a modprobe, or how do you
> load them? Also try via
>
> insmod /home/ap/dev/kvm/kvm-kmod/x86/kvm.ko
I don't modprobe them. I use the insmod command above after I rmmod
the existing drivers.
I tried doing a "make install" and modprob. No luck!
> I don't know. Something must be broken with your Ubuntu installation.
This is looking very likely at this point. Thanks for all the help.
AP
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-06-20 21:13 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <BANLkTikYgrQ0Ge-RgXOQcNv6Osr1Xs1k9Q@mail.gmail.com>
2011-06-11 0:02 ` Unable to unload kvm-intel module AP
2011-06-12 15:35 ` Avi Kivity
2011-06-13 17:11 ` AP
2011-06-14 6:25 ` Jan Kiszka
2011-06-14 8:32 ` Avi Kivity
2011-06-14 18:30 ` AP
2011-06-14 20:05 ` Jan Kiszka
2011-06-14 21:10 ` AP
2011-06-15 6:37 ` Jan Kiszka
2011-06-16 22:10 ` AP
2011-06-17 7:18 ` Jan Kiszka
2011-06-17 18:04 ` AP
2011-06-19 9:06 ` Jan Kiszka
2011-06-20 21:13 ` AP
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.