From owner-freebsd-emulation@FreeBSD.ORG Sun Aug 9 18:54:20 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 52606106564A for ; Sun, 9 Aug 2009 18:54:20 +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 132878FC16 for ; Sun, 9 Aug 2009 18:54:19 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id A07401E00313; Sun, 9 Aug 2009 20:54:18 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.3/8.14.3) with ESMTP id n79IppcJ004238; Sun, 9 Aug 2009 20:51:51 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.3/8.14.3/Submit) id n79IppUW004237; Sun, 9 Aug 2009 20:51:51 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 9 Aug 2009 20:51:50 +0200 To: freebsd-emulation@FreeBSD.org Message-ID: <20090809185150.GA2688@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: qemu-devel@nongnu.org Subject: experimental FreeBSD qemu 0.11.0-rc1 port update up for testing; unstable guest timer irqs and more 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, 09 Aug 2009 18:54:20 -0000 As qemu upstream has cut a new rc from its new 0.11 stable branch, http://lists.gnu.org/archive/html/qemu-devel/2009-07/msg02521.html I thought its time to start testing on FreeBSD and made a preliminary update for our qemu-devel port: http://people.freebsd.org/~nox/qemu/qemu-devel-0.11.0r1.patch I don't plan to commit this as it is, its just so we can test the new branch on FreeBSD easier... Some notes: 1. kqemu still works, but is disabled by default now so you'll have to pass -enable-kqemu (or -kernel-kqemu as with the previous versions) if you want to use it. 2. guest timer irqs seem to be even less stable when running qemu on FreeBSD 8 than they were on 7, I now regularly have to pass `no_timer_check' to linux guest kernels or they'd hang at boot after saying something like this: [...] Getting LVT1: 10000 enabled ExtINT on CPU#0 ENABLING IO-APIC IRQs ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1 ..MP-BIOS bug: 8254 timer not connected to IO-APIC ...trying to set up timer (IRQ0) through the 8259A ... ..... (found apic 0 pin 2) ... ....... failed. ...trying to set up timer as Virtual Wire IRQ... I see reports of this on the net for qemu running on Linux hosts too tho, so this doesn't seem to be specific to FreeBSD. (And it has nothing to do with the new qemu branch, it happens here with 0.10.6 too, I just was testing qemu on FreeBSD 7 before only.) 3. The binutils in FreeBSD base are too old for as(1) to understand constructs used in multiboot.bin's asm source, so this port now depends on the new devel/binutils port and patches qemu/pc-bios/optionrom/Makefile to invoke the new as for the file in question. (see files/patch-pc-bios-optionrom-Makefile at the end of the patch; the same problem has been reported for OpenBSD on the qemu list before.) 4. There's a bug in qemu/osdep.c:kqemu_vmalloc(), it doesn't round its size arg up to full pages before calling mmap on the BSDs. Here is the patch: (files/patch-osdep.c in the port.) Index: qemu/osdep.c @@ -179,7 +179,9 @@ } unlink(phys_ram_file); } +#endif /* !(__OpenBSD__ || __FreeBSD__ || __DragonFly__) */ size = (size + 4095) & ~4095; +#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__) ftruncate(phys_ram_fd, phys_ram_size + size); #endif /* !(__OpenBSD__ || __FreeBSD__ || __DragonFly__) */ ptr = mmap(NULL, Ok I guess thats it for now. Happy testing... :) Juergen