From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Unable to unload kvm-intel module Date: Tue, 14 Jun 2011 11:32:21 +0300 Message-ID: <4DF71C95.7080406@redhat.com> References: <4DF4DCBC.609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: AP Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44008 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754450Ab1FNIcZ (ORCPT ); Tue, 14 Jun 2011 04:32:25 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 06/13/2011 08:11 PM, AP wrote: > On Sun, Jun 12, 2011 at 8:35 AM, Avi Kivity 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