PG_UNMANAGED disappearance in -current

Michael Butler imb at protected-networks.net
Fri Aug 12 17:11:07 UTC 2011


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
>  }
> 



More information about the freebsd-emulation mailing list