Re: virtualbox r0 memory management update [Was: Freeze with 10.0 and VirtualBox {4.1.4|4.1.6|4.1.51r38464}]

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Tue, 06 Dec 2011 22:22:15 +0200
on 06/12/2011 20:54 Bernhard Froehlich said the following:
> On 06.12.2011 12:14, Andriy Gapon wrote:
>> Meanwhile, here is the code that I came up with:
>> http://people.freebsd.org/~avg/vbox/
>> For your convenience I have uploaded both the new file and its diff
>> against svn
>> head.  I am testing this on FreeBSD head (r228017), so far no
>> breakage observed.
>>
>> I would appreciate reviews and testing of this code.  Especially testing with
>> earlier FreeBSD releases.
> 
> VirtualBox 4.1.6 on FreeBSD 9.0-RC2/amd64 gave me:
> 
> cc -O2 -pipe -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX
> -DRT_WITH_VBOX -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS
> -DRT_ARCH_AMD64 -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc 
> -Iinclude -I. -Ir0drv -I. -I_at_ -I_at_/contrib/altq -finline-limit=8000 --param
> inline-unit-growth=100 --param large-function-growth=1000 -fno-common 
> -fno-omit-frame-pointer  -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx
> -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector
> -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs
> -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual 
> -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs
> -fdiagnostics-show-option -c
> /usr/home/decke/rpvbox/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.6_OSE/out/freebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c
> 
> /usr/home/decke/rpvbox/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.6_OSE/out/freebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:
> In function 'FreeBSDContigPhysAllocHelper':
> /usr/home/decke/rpvbox/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.6_OSE/out/freebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:212:
> error: incompatible types in initialization
> *** Error code 1
> 
> Stop in
> /usr/home/decke/rpvbox/emulators/virtualbox-ose-kmod/work/VirtualBox-4.1.6_OSE/out/freebsd.amd64/release/bin/src/vboxdrv.
> 
> *** Error code 1
> 

Could you please change that line as follows?
	vm_page_t pPage = pPages +iPage;

-- 
Andriy Gapon
Received on Tue Dec 06 2011 - 19:22:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:21 UTC