From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 27 15:34:44 2008 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 7863C1065696 for ; Sat, 27 Sep 2008 15:34:44 +0000 (UTC) (envelope-from anthony@codemonkey.ws) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 35E4D8FC12 for ; Sat, 27 Sep 2008 15:34:44 +0000 (UTC) (envelope-from anthony@codemonkey.ws) Received: by an-out-0708.google.com with SMTP id b33so77364ana.13 for ; Sat, 27 Sep 2008 08:34:43 -0700 (PDT) Received: by 10.100.229.14 with SMTP id b14mr2492417anh.43.1222529683361; Sat, 27 Sep 2008 08:34:43 -0700 (PDT) Received: from squirrel.codemonkey.ws (cpe-24-28-0-183.austin.res.rr.com [24.28.0.183]) by mx.google.com with ESMTPS id d24sm103788and.24.2008.09.27.08.34.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Sep 2008 08:34:42 -0700 (PDT) Message-ID: <48DE5256.5000101@codemonkey.ws> Date: Sat, 27 Sep 2008 10:33:42 -0500 From: Anthony Liguori User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: qemu-devel@nongnu.org, freebsd-emulation@freebsd.org References: <20080921204025.GA81055@saturn.kn-bremen.de> <200809242210.m8OMAcSZ021572@saturn.kn-bremen.de> <48DCF9FC.2070708@codemonkey.ws> <20080926220445.GA13099@saturn.kn-bremen.de> In-Reply-To: <20080926220445.GA13099@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: [Qemu-devel] Re: qemu svn r5281 on FreeBSD - slow usb, vmwarevga, screen updates... (now updated to r5313) 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: Sat, 27 Sep 2008 15:34:44 -0000 Juergen Lock wrote: > On Fri, Sep 26, 2008 at 10:04:28AM -0500, Anthony Liguori wrote: > >> Matt wrote: >> >>>> Here is another experimental update that forces -lthr on 6.x, and >>>> also updates to qemu svn r5313: >>>> http://people.freebsd.org/~nox/qemu/qemu-devel-20080924.patch >>>> >>>> >>> I just built this update and it seems to have fixed the issue. Host >>> CPU usage again tracks with guest CPU usage and all seems well. I'll >>> continue to use this build to see if anything else crops up. >>> >>> Please let me know if there is anything other information I can provide. >>> >>> >> If ya'll have patches to make QEMU work on FreeBSD, please submit them. >> I'm about to commit a patch that's what it took for me to get SVN working >> on FreeBSD. >> >> The one thing that really tripped me up with the whole aio kld-module >> thing. Perhaps we should detect the presence of the module at run time and >> disable aio? I assume kldload can only be run as root? >> > > Yes. Atm the ports print a warning when aio is not loaded: > Yeah, I don't think this is enough. I'd rather see AIO be disabled when modfind("aio") is not available (printing a warning along with that would be fine). A non-privileged user cannot load the aio module so it's not very useful to tell them to load it. > And here is another patch thats needed on amd64 hosts for tcg (which > I had posted before:) > > Index: qemu/exec.c > @@ -405,6 +405,28 @@ > exit(1); > } > } > +#elif defined(__FreeBSD__) > + { > + int flags; > + void *addr = NULL; > + flags = MAP_PRIVATE | MAP_ANONYMOUS; > +#if defined(__x86_64__) > + /* FreeBSD doesn't have MAP_32BIT, use MAP_FIXED and assume > + * 0x40000000 is free */ > + flags |= MAP_FIXED; > + addr = (void *)0x40000000; > + /* Cannot map more than that */ > + if (code_gen_buffer_size > (800 * 1024 * 1024)) > + code_gen_buffer_size = (800 * 1024 * 1024); > +#endif > + code_gen_buffer = mmap(addr, code_gen_buffer_size, > + PROT_WRITE | PROT_READ | PROT_EXEC, > + flags, -1, 0); > + if (code_gen_buffer == MAP_FAILED) { > + fprintf(stderr, "Could not allocate dynamic translator buffer\n"); > + exit(1); > + } > + } > #else > code_gen_buffer = qemu_malloc(code_gen_buffer_size); > if (!code_gen_buffer) { > > Signed-off-by: Juergen Lock > Applied. Thanks. > I'll see if I can prepare another update over the weekend and then go > thru more of the patches that have accumulated in the port... > That would be great! Regards, Anthony Liguori > Thanx, > Juergen >