Date: Thu, 11 Aug 2011 15:44:12 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: freebsd-emulation@FreeBSD.org Subject: Re: PG_UNMANAGED disappearance in -current Message-ID: <201108111544.20198.jkim@FreeBSD.org> In-Reply-To: <4E441A9D.1060102@protected-networks.net> References: <4E441A9D.1060102@protected-networks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108111544.20198.jkim>
