From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 7 17:59:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE1791065673 for ; Sun, 7 Dec 2008 17:59:51 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 34C658FC14 for ; Sun, 7 Dec 2008 17:59:51 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 09DA3191A2A; Sun, 7 Dec 2008 18:59:49 +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 mB7HtuNO061435; Sun, 7 Dec 2008 18:55:56 +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 mB7HtufT061434; Sun, 7 Dec 2008 18:55:56 +0100 (CET) (envelope-from nox) From: Juergen Lock Date: Sun, 7 Dec 2008 18:55:56 +0100 To: Nate Eldredge Message-ID: <20081207175556.GA61107@saturn.kn-bremen.de> References: <5f67a8c40812021718i4cc225fem5b02a448702ec606@mail.gmail.com> <7d6fde3d0812040327w7c92826i64c6073a453d65ef@mail.gmail.com> <5f67a8c40812040952u1364563awcfd493695e7fea7c@mail.gmail.com> <200812042046.mB4KkC0k016853@saturn.kn-bremen.de> <20081204212311.GA17962@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Mailman-Approved-At: Sun, 07 Dec 2008 20:32:06 +0000 Cc: yanefbsd@gmail.com, freebsd-hackers@freebsd.org Subject: Re: AMD64 qemu completely broken? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 17:59:51 -0000 On Thu, Dec 04, 2008 at 02:43:47PM -0800, Nate Eldredge wrote: > On Thu, 4 Dec 2008, Juergen Lock wrote: > >> I forgot to say the qemu-devel port (as well as the later snapshots I >> posted about on -emulation) also support -curses, which shows the emulated >> vga text(!)console on qemu's tty. This works quite well with FreeBSD guests >> (even the isos) if you extend your xterm/whatever by one line (the default >> vga textconsole is 80x25 instead of 80x24.) > > As long as we're sharing tips about qemu: > > I've recently been working with qemu on amd64 and have set up a Debian etch > i386 guest which is working well. I am using the qemu-devel and > kqemu-kmod-devel ports. I am not using -kernel-kqemu at the moment; I > thought I would get things working before trying to speed up. > > Using qemu I've finally achieved my goal of being able to use flash on > FreeBSD/amd64 (in some sense :-O). > Actually at least on RELENG_7 and later the original www/linux-flashplugin9 + www/nspluginwrapper don't work too bad at least for video sites these days (on 6 and 7.0 you need a patch and there it probably doesn't quite work on SMP because another patch concerning SMP can't be merged.) See e.g. this thread on -emulation for more: http://lists.freebsd.org/pipermail/freebsd-emulation/2008-October/005433.html (also later on that thread iirc were reports of hangs with ff3 and linux base fc4, so either use f7 or f8, or stick with ff2 for now, like if you're on 6 + linprocfs patch where only fc4 works. And you want to run that nspluginwrapper -i command under 5. as the user that will run the browser, not as root. Oh and that flash9 advisory is no longer an issue, it has been updated since.) I even got flash10 running, which probably can enter ports some time after the slush: http://lists.freebsd.org/pipermail/freebsd-emulation/2008-October/005438.html > savevm and loadvm don't work due to a security patch. Since my guest > system is trusted I reverted the patch. I filed a PR as ports/129417 . > Yup, fixed since. (I'm only saying this for the benefit of other readers. :) Merged a fix from debian sid kvm. > I found that '-net user' is horribly broken on amd64 (qemu segfaults). It > uses some ancient [*] BSD TCP/IP code (via slirp) which assumes that > pointers are 32 bits and doesn't hesitate to shove them into random 32-bit > corners of externally defined structures if it's convenient. Looks like a > pain to clean up. Yup slirp is ancient code and doesnt really work on 64 bit hosts. (as also mentioned in the qemu ports' pkg-message...) > '-net tap' works fine, but requires root privileges and > is more work to set up. > Actually it doesn't require root privs to run, only to setup. (Ok you _might_ need sudo to ifconfig the tap device and/or bridge in the qemu-ifup script... But qemu itself can certainly run as user.) > [*] Out of curiosity, I looked at some Unix Archive stuff and found the > identical code in BSD's Net2, circa 1991. It is identified in a comment as > a "quick hack" and adorned with several /* XXX */. Naturally the code and > the comments survive intact, 17 years later. :-( > This might be somewhat more understandable if you know that the original slirp code was written many moons ago and only later resurrected for emulation purposes. (It was originally invented for dialup users that logged into shellservers' gettys via serial modem lines so they could also use the box' inet connection locally before things like ppp were available...) Cheers, Juergen