BHyVeビルドめも22

φ(・・*)ゞ ウーン
vmmdev_mmap()の書き換え終わりです。#if 0のブロック消すの忘れてコミットしちゃったけど直すの面倒なので、それ消したコミットをその後しましたがw

diffはこんな感じですねー

[masami@dfly:/usr/src/sys/platform/pc64/vmm]$ git diff HEAD^^
diff --git a/sys/platform/pc64/vmm/vmm_dev.c b/sys/platform/pc64/vmm/vmm_dev.c
index 5935373..5afd20b 100644
--- a/sys/platform/pc64/vmm/vmm_dev.c
+++ b/sys/platform/pc64/vmm/vmm_dev.c
@@ -364,8 +364,7 @@ done:
 }

 static int
-vmmdev_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr,
-    int nprot, vm_memattr_t *memattr)
+vmmdev_mmap(struct dev_mmap_args *ap)
 {
        int error;
        struct vmmdev_softc *sc;
@@ -373,10 +372,10 @@ vmmdev_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_pad
dr_t *paddr,
        error = -1;
        mtx_lock(&vmmdev_mtx);

-       sc = vmmdev_lookup2(cdev);
-       if (sc != NULL && (nprot & PROT_EXEC) == 0) {
-               *paddr = vm_gpa2hpa(sc->vm, (vm_paddr_t)offset, PAGE_SIZE);
-               if (*paddr != (vm_paddr_t)-1)
+       sc = vmmdev_lookup2(ap->a_head.a_dev);
+       if (sc != NULL && (ap->a_nprot & PROT_EXEC) == 0) {
+               ap->a_result= (int) vm_gpa2hpa(sc->vm, (vm_paddr_t)ap->a_offset,
 PAGE_SIZE);
+               if (ap->a_result != -1)
                        error = 0;
        }

引数各種がdev_mmap_args構造体にまとまっただけです。

そして、コンパイルエラーが一つ減って残り3つ。


--------------------------------------------------------------
>>> Kernel build for BHYVE started on Mon Jul 23 21:16:03 JST 2012
--------------------------------------------------------------
===> BHYVE
cd /usr/src/sys/config;  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin  config  -d /usr/obj/usr/src/sys/BHYVE  /usr/src/sys/config/BHYVE
Kernel build directory is /usr/obj/usr/src/sys/BHYVE
cd /usr/obj/usr/src/sys/BHYVE;  MAKEOBJDIRPREFIX=/usr/obj/usr/src/world_x86_64  OBJTREE=/usr/obj  MACHINE_ARCH=x86_64  MACHINE=x86_64  MACHINE_PLATFORM=pc64  OBJFORMAT_PATH=/usr/obj/usr/src/ctools_x86_64_x86_64  HOST_CCVER=gcc44  CCVER=gcc44  BINUTILSVER=binutils221  DESTDIR=/usr/obj/usr/src/world_x86_64  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin make KERNEL=kernel all
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wold-style-definition -std=c99 -Wold-style-declaration -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/BHYVE -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix/include" -I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=4 -fno-stack-protector -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a  -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt -msoft-float -fno-asynchronous-unwind-tables -fno-omit-frame-pointer  /usr/src/sys/platform/pc64/vmm/vmm_dev.c -Werror
cc1: warnings being treated as errors
/usr/src/sys/platform/pc64/vmm/vmm_dev.c:437: error: initialization from incompatible pointer type
/usr/src/sys/platform/pc64/vmm/vmm_dev.c:439: error: initialization from incompatible pointer type
/usr/src/sys/platform/pc64/vmm/vmm_dev.c:440: error: initialization from incompatible pointer type
*** Error code 1

Stop in /usr/obj/usr/src/sys/BHYVE.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.