From owner-freebsd-emulation@FreeBSD.ORG Tue Mar 30 19:54:04 2010 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 150FE106566B for ; Tue, 30 Mar 2010 19:54:04 +0000 (UTC) (envelope-from blauwirbel@gmail.com) Received: from mail-pz0-f180.google.com (mail-pz0-f180.google.com [209.85.222.180]) by mx1.freebsd.org (Postfix) with ESMTP id DB1548FC0A for ; Tue, 30 Mar 2010 19:54:03 +0000 (UTC) Received: by pzk10 with SMTP id 10so940388pzk.28 for ; Tue, 30 Mar 2010 12:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=IlxS9ZG6++kf8hxA6Sm/4a1hUxGOvs3pUkVZyxo2zoU=; b=Th01Zu/SN7l+NLkN/Mgpl8t6GxdBOgeTwJ149XfGCuaBjXJhzjZ1vKitW5jyQZeY54 BtG9OItU6b/CdKHJnqwqncLz6FzWJaSDP/eeNPij33eWKMuadAzGuM86fG58K0OTjGnb ONIIm1ofkcvo7kG1t3v96qIxYPYNZY20o4Xwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=xvtW/77H3JCucXLY0v2ciJoE3fRCC54w2IVPPryOPph1ZJsIRDdve+oMUKs8+laY+J kqBtYyPj6IdmN+pczB92opL3ij88OBa0ReH/RIU+WJyqvYzhV/siQiHxIFz4fpxZyvWa 0nDw6UsyvMMNAQWByw5Q8IXo36trCIUFdJA+c= MIME-Version: 1.0 Received: by 10.140.178.12 with HTTP; Tue, 30 Mar 2010 12:54:03 -0700 (PDT) In-Reply-To: <20100330191629.GA95521@triton8.kn-bremen.de> References: <20100325204423.GA46954@triton8.kn-bremen.de> <20100330191629.GA95521@triton8.kn-bremen.de> Date: Tue, 30 Mar 2010 22:54:03 +0300 Received: by 10.141.108.2 with SMTP id k2mr1785222rvm.125.1269978843215; Tue, 30 Mar 2010 12:54:03 -0700 (PDT) Message-ID: From: Blue Swirl To: Juergen Lock Content-Type: text/plain; charset=UTF-8 Cc: freebsd-emulation@freebsd.org, Toni , qemu-devel@nongnu.org, Andreas Tobler Subject: Re: [Qemu-devel] qemu git head 20100323 on FreeBSD - qemu-devel port update for testing 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: Tue, 30 Mar 2010 19:54:04 -0000 On 3/30/10, Juergen Lock wrote: > On Tue, Mar 30, 2010 at 09:04:28PM +0300, Blue Swirl wrote: > > On 3/25/10, Juergen Lock wrote: > > > Hi! > > > > > > Now that qemu git head works again (thanx Aurelien! :) I've finished > > > the FreeBSD qemu-devel port update patch/shar that made me uncover > > > the bug: > > > http://people.freebsd.org/~nox/qemu/qemu-devel-20100323.patch > > > resp. > > > http://people.freebsd.org/~nox/qemu/qemu-devel-20100323.shar > > > > > > This also adds a few misc fixes (that I'll submit on the qemu list > > > seperately), I have... > > > > > > . Fixed the FreeBSD executable path detection to work without /proc > > > mounted (it usually isn't on FreeBSD), so you now no longer have to > > > pass the path to the pc-bios dir with -L if you run qemu out of the > > > build dir when another version is installed, like, > > > work/qemu-snapshot-20100323_20/i386-softmmu/qemu ... > > > > > > (files/patch-vl.c in the shar/patch) > > > > > > . Fixed some more bsd-user bugs so all of i386-bsd-user, x86_64-bsd-user, > > > and sparc64-bsd-user now run for me again on FreeBSD stable/8 amd64. > > > (I didn't test sparc-bsd-user as I only tried -bsd freebsd and FreeBSD > > > doesn't run on 32bit sparc.) - Yes bsd-user still needs more work but > > > at least simple exectuables run. > > > > > > (files/patch-bsd-user-mmap.c, files/patch-exec.c) > > > > > > . Fixed the bsd-user host page protection code for FreeBSD hosts > > > (using kinfo_getvmmap(3) on FeeBSD >= 7.x and /compat/linux/proc > > > on older FreeBSD.) > > > > > > (files/patch-bsd-user-linproc) > > > > > > . Fixed some compilation warnings and a missing #include. > > > > > > (files/patch-qemu-char.c, files/patch-qemu-timer.c) > > > > > > > Thanks, applied all except exec.c one. > > > Oh, is there something wrong with it? You mean this one, right? > > Subject: [PATCH] Avoid page_set_flags() assert in qemu-user host page > protection code > Message-ID: <20100325211421.GA52572@triton8.kn-bremen.de> > [...] > > --- a/exec.c > +++ b/exec.c > @@ -293,10 +293,13 @@ static void page_init(void) > > if (h2g_valid(endaddr)) { > endaddr = h2g(endaddr); > + page_set_flags(startaddr, endaddr, PAGE_RESERVED); > } else { > +#if TARGET_ABI_BITS <= L1_MAP_ADDR_SPACE_BITS > endaddr = ~0ul; > + page_set_flags(startaddr, endaddr, PAGE_RESERVED); > +#endif > } > - page_set_flags(startaddr, endaddr, PAGE_RESERVED); > } > } while (!feof(f)); > > I first tried to replace the endaddr in the !h2g_valid(endaddr) case with > ((abi_ulong)1 << L1_MAP_ADDR_SPACE_BITS) - 1 > if TARGET_ABI_BITS > L1_MAP_ADDR_SPACE_BITS (which comes from the condition > of the assert in page_set_flags() that was triggered on the ~0ul value), > but that caused the qemu process to grow into swap and made the box > usuable when that code was reached and I had to kill qemu. (The box has > 8 GB RAM.) And so I thought just leaving that page range unprotected > if only the start address is valid was the lesser evil... I was thinking something like (abi_ulong)-1 but maybe that isn't any more correct.