From owner-freebsd-emulation@FreeBSD.ORG Thu Feb 12 18:20:31 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 40C3E106566C for ; Thu, 12 Feb 2009 18:20:31 +0000 (UTC) (envelope-from nox@saturn.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 C1C938FC19 for ; Thu, 12 Feb 2009 18:20:30 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 8C5381E0027B; Thu, 12 Feb 2009 19:20:29 +0100 (CET) Received: from saturn.kn-bremen.de (noident@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id n1CIHFP9014254; Thu, 12 Feb 2009 19:17:15 +0100 (CET) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id n1CIHDbM014253; Thu, 12 Feb 2009 19:17:13 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Thu, 12 Feb 2009 19:17:13 +0100 To: Daichi GOTO Message-ID: <20090212181713.GA13229@saturn.kn-bremen.de> Mail-Followup-To: Daichi GOTO , John Hein , freebsd-emulation@freebsd.org References: <498A5F90.1030004@ongs.co.jp> <20090206214916.GA14653@saturn.kn-bremen.de> <200902102257.n1AMvF9v013733@saturn.kn-bremen.de> <4992924E.4090604@ongs.co.jp> <18834.42024.739091.493218@gromit.timing.com> <499419DC.1050102@ongs.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <499419DC.1050102@ongs.co.jp> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-emulation@freebsd.org Subject: Re: emulators/qemu: build fail on current amd64 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: Thu, 12 Feb 2009 18:20:31 -0000 On Thu, Feb 12, 2009 at 09:45:16PM +0900, Daichi GOTO wrote: > John Hein wrote: >> Daichi GOTO wrote at 17:54 +0900 on Feb 11, 2009: >> > Juergen Lock wrote: >> > > In article <4990EF3E.5090908@ongs.co.jp> you write: >> > >> After some days, I have tried to build qemu and kqemu with >> > >> latest amd64 current system, and I have gottten it success :) >> > >> >> > >> FYI, qemu works well but without kqemu. >> > >> >> > >> # /usr/local/etc/rc.d/kqemu start >> > >> kldload: can't load kqemu: Exec format error >> > >> /usr/local/etc/rc.d/kqemu: WARNING: kqemu module failed to load. >> > >> # >> > > > > Oh? Is there anything in dmesg, like a missing symbol? Or did >> you >> > > update your world/kernel after building kqemu? In that case you should >> > > rebuild your kqemu port... >> > > # uname -a >> > FreeBSD parancell.ongs.co.jp 8.0-CURRENT FreeBSD 8.0-CURRENT #3: Mon >> Feb 9 14:18:09 JST 2009 > >> root@parancell.ongs.co.jp:/usr/obj/usr/src/sys/PARANCELL amd64 >> > # dmesg >> > (snip) >> > link_elf_obj: symbol unit2minor undefined >> > kldload: /boot/modules/kqemu.ko: Unsupported file type >> > (snip) >> >> unit2minor was removed recently. >> See recent commit to sys/sys/conf.h >> Any in-tree drivers left that used unit2minor were fixed at the same time. >> >> For kqemu-kmod, try this... >> >> --- kqemu-1.3.0pre11/kqemu-freebsd.c.orig 2007-02-06 14:02:00.000000000 -0700 >> +++ kqemu-1.3.0pre11/kqemu-freebsd.c 2009-02-11 03:04:50.000000000 -0700 >> @@ -296,7 +296,11 @@ >> r = clone_create(&kqemuclones, &kqemu_cdevsw, &unit, dev, 0); >> if (r) { >> +#if __FreeBSD_version > 800061 >> + *dev = make_dev(&kqemu_cdevsw, unit, >> +#else >> *dev = make_dev(&kqemu_cdevsw, unit2minor(unit), >> +#endif >> UID_ROOT, GID_WHEEL, 0660, "kqemu%d", unit); >> if (*dev != NULL) { >> dev_ref(*dev); > > Adove patch works well :) Now I can load kqemu and run > qemu with it! I guess it should be under files dir of > emulators/kqemu-kmod. > Yeah I just committed ports/131603 which contains the same fix, just written a little different. > And another problem comming X-( > After startup WinXP on qemu+kqemu, at user logs in, > qemu gets Segmentation fault. It looks like fails > at the same point always. > Any one have any ideas? Someone have the same situation? A backtrace could be useful here, do something like gdb /usr/ports/emulators/qemu/work/qemu-0.9.1/i386-softmmu/qemu qemu.core and then in gdb `bt'. My crystal ball :) tells me you are using slirp on amd64 (-net user which is the default nat-kinda networking) and the guest may be trying to access the network when you login (slirp is unstable on 64 bit hosts in the qemu versions in ports which is also documented in the pkg-message.s) If its that you could either try using tuntap networking instead, or try qemu svn, a snapshot of which I posted a qemu-devel port update for here: http://lists.freebsd.org/pipermail/freebsd-emulation/2009-February/005650.html (qemu-devel uses the kqemu-kmod-devel port which CONFLICTS with kqemu-kmod, so if you are upgrading from qemu 0.9.1 pkg_delete the old kqemu first.) Good luck, Juergen