From owner-freebsd-emulation@FreeBSD.ORG Thu Aug 11 19:44:30 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 96B5E1065672; Thu, 11 Aug 2011 19:44:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Thu, 11 Aug 2011 15:44:12 -0400 User-Agent: KMail/1.6.2 References: <4E441A9D.1060102@protected-networks.net> In-Reply-To: <4E441A9D.1060102@protected-networks.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108111544.20198.jkim@FreeBSD.org> Cc: 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: Thu, 11 Aug 2011 19:44:30 -0000 On Thursday 11 August 2011 02:08 pm, Michael Butler wrote: > /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.0.12_OSE >/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv- >freebsd.c: In function 'rtR0MemObjFreeBSDPhysPageInit': > > /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-4.0.12_OSE >/out/freebsd.x86/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv- >freebsd.c:396: error: 'PG_UNMANAGED' undeclared (first use in this > function) > > Should "pPage->flags = PG_UNMANAGED" now be replaced by some page > lock/unlock function which applies "pPage->oflags = VPO_UNMANAGED"? I am not sure if it is really correct but this patch worked for me: --- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig +++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c @@ -392,8 +392,13 @@ pPage->wire_count = 1; pPage->pindex = iPage; pPage->act_count = 0; +#if __FreeBSD_version < 900000 pPage->oflags = 0; pPage->flags = PG_UNMANAGED; +#else + pPage->oflags = VPO_UNMANAGED; + pPage->flags = 0; +#endif atomic_add_int(&cnt.v_wire_count, 1); } Jung-uk Kim