From owner-freebsd-emulation@FreeBSD.ORG Sun Apr 12 18:58:29 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CDB21065674; Sun, 12 Apr 2009 18:58:28 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 57FCF8FC18; Sun, 12 Apr 2009 18:58:28 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 66F821E000D6; Sun, 12 Apr 2009 20:58:30 +0200 (CEST) Received: from triton.kn-bremen.de (noident@localhost [127.0.0.1]) by triton.kn-bremen.de (8.14.3/8.14.3) with ESMTP id n3CIuPB2065698; Sun, 12 Apr 2009 20:56:25 +0200 (CEST) (envelope-from nox@triton.kn-bremen.de) Received: (from nox@localhost) by triton.kn-bremen.de (8.14.3/8.14.3/Submit) id n3CIuOpe065697; Sun, 12 Apr 2009 20:56:24 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 12 Apr 2009 20:56:24 +0200 To: Bakul Shah Message-ID: <20090412185624.GB65339@triton.kn-bremen.de> References: <22999502.post@talk.nabble.com> <22999521.post@talk.nabble.com> <200904121415.n3CEFDCf025538@triton.kn-bremen.de> <20090412182939.E23F15B23@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090412182939.E23F15B23@mail.bitblocks.com> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: jtidwell , freebsd-emulation@freebsd.org Subject: Re: cannot get kqemu to load with kldload X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 18:58:29 -0000 On Sun, Apr 12, 2009 at 11:29:39AM -0700, Bakul Shah wrote: > On Sun, 12 Apr 2009 16:15:13 +0200 Juergen Lock wrote: > > In article <20090411192326.GA73059@freebsd.org> you write: > > >On Sat, Apr 11, 2009 at 02:43:52AM -0700, jtidwell wrote: > > >> > > >> > > >> > > >> jtidwell wrote: > > >> > > > >> > Greetings, qemu folk :) > > >> > > > >> > I've recently upgraded my FreeBSD box from 6.2 to 7.2. I'm trying to > > >> > install qemo, but I keep getting stuck at the point where I load kqemu > > >> > with kldload. The module file exists in /boot/modules, but I get this > > >> > error every time I try to load: > > >> > > > >> > # kldload kqemu > > >> > kldload: can't load kqemu: No such file or directory > > This is a confusing message when kldload can't find a symbol. > > > >> > > > >> > # ls /boot/modules > > >> > kqemu.ko linker.hints rt2500_sys.ko rt61_sys.ko > > >> > > > >> > > > >> > > >> I forgot to add, I get this error message on the console when i try to loa > > d > > >> the module: > > >> > > >> link_elf : symbol sched_lock undefined > > > > > >you use ULE, right? try switching to 4BSD... the .ko uses 4BSD specific thin > > gs, > > >no idea why > > In kqemu-kmod-devel, kqemu-freebsd.c uses sched_lock() in > kqemu_schedule() if __FreeBSD_version is < 700044 & > 500000. > 7.0 has __FreeBSD_version defined to be 700055. > 7.1 has __FreeBSD_version defined to be 701000. > > So the OP shouldn't have had the problem he is seeing if he > has indeed updated to 7.x and is getting the right kqemu.ko. > > I suggest he do pkg_delete /var/db/pkg/kqemu-kmod*, ensure > that /boot/module/kqemu.ko is gone and then rebuild and > install kqemu-kmod-devel. > > But this brings up another problem with kqemu: if you are > using SCHED_4BSD with 7.x or current, kqemu is not guaranteed > to work. Oh, so the code it then uses in kqemu_schedule() is ule only? Does the old scheduler still use sched_lock? [...] struct thread *td = curthread; thread_lock(td); mi_switch(SW_VOL, NULL); thread_unlock(td); [...] Wondering... Juergen