From owner-freebsd-emulation@FreeBSD.ORG Fri Aug 12 17:11:07 2011 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 8B156106566B; Fri, 12 Aug 2011 17:11:07 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from sarah.protected-networks.net (sarah.protected-networks.net [IPv6:2001:470:1f07:4e1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4EBCF8FC08; Fri, 12 Aug 2011 17:11:07 +0000 (UTC) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [202.12.127.84]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Iain Butler", Issuer "RSA Class 2 Personal CA" (verified OK)) (Authenticated sender: imb@protected-networks.net) by sarah.protected-networks.net (Postfix) with ESMTPSA id 5EF8F6136; Fri, 12 Aug 2011 13:11:06 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=protected-networks.net; s=200705; t=1313169066; bh=K//vDVuMpuOfh//H2fvghI+5x1cLi/xTY3XAV9rBcMs=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=F3PvwnoMfVecuU+zw4VMgJIbV2T3j9CUuOoYgwFif8rPavBmi1dusdWcWssaO+hmX bQonoRRyKcl5U/3utTxnMBNi4rYqwFmaWt7OEm+2Rde+l0Oj+kZGnpZojXUGVPv DomainKey-Signature: a=rsa-sha1; s=200509; d=protected-networks.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=JPrjIxSEqtKLRrEopOgO5bH5zvF62lpDQmalbxCEV1fdbM3wrEUGVL5GZBqxpxDuT JN3aA4TPzPLvr8Quc4BAh9mMjPQ9RLhl8A9Bs3QriOstkrggRRb7gyCNeWnnaC8 Message-ID: <4E455EA8.70705@protected-networks.net> Date: Fri, 12 Aug 2011 13:11:04 -0400 From: Michael Butler User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:5.0) Gecko/20110713 Thunderbird/5.0 MIME-Version: 1.0 To: Bernhard Froehlich References: <4E441A9D.1060102@protected-networks.net> <201108111544.20198.jkim@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.2.1 OpenPGP: id=0442D492 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@FreeBSD.org, Jung-uk Kim Subject: Re: PG_UNMANAGED disappearance in -current 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: Fri, 12 Aug 2011 17:11:07 -0000 On 08/12/11 02:51, Bernhard Froehlich wrote: > > I have started the same way and then talked to kib. He told me that > vm_phys_alloc_contig() already initializes the page as unmanaged so this > stuff should be a noop in the kmod. I have not runtime tested it myself > though so i would welcome some feedback on that. This appears to work just fine too - thanks! :-) imb > http://home.bluelife.at/patches/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd.c > > --- > src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 > 14:34:09.000000000 +0200 > +++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 > 15:06:46.000000000 +0200 > @@ -394,9 +394,13 @@ > pPage->wire_count = 1; > pPage->pindex = iPage; > pPage->act_count = 0; > - pPage->oflags = 0; > - pPage->flags = PG_UNMANAGED; > atomic_add_int(&cnt.v_wire_count, 1); > + > +#if __FreeBSD_version >= 900040 > + Assert(pPage->oflags & VPO_UNMANAGED != 0); > +#else > + Assert(pPage->flags & PG_UNMANAGED != 0); > +#endif > } >