cannot get kqemu to load with kldload
Juergen Lock
nox at jelal.kn-bremen.de
Sun Apr 12 18:58:29 UTC 2009
On Sun, Apr 12, 2009 at 11:29:39AM -0700, Bakul Shah wrote:
> On Sun, 12 Apr 2009 16:15:13 +0200 Juergen Lock <nox at jelal.kn-bremen.de> wrote:
> > In article <20090411192326.GA73059 at 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
More information about the freebsd-emulation
mailing list