Hi, I'm trying to port FreeMWare kernel module to FreeBSD.
As I read mainly the Linux-dependent code,I have some question about code.
I don't know about Linux Kernel very well.
1.FMWALLOCVPHYS allocs some kernel memory by vmalloc().I think that
this kernel API allocs page-aligned and kernel-wired memory. True?
2.If so,the guest memory will not be swapped out ,isn't it?Isn't it bad thing?
Shouldn't the module API changed ,so that pass mmap(2)-ed file descripter
and get memory chanks from the file when virtual machine cause page fault?
The reason why I think about it is because BSD device_pager can handle
only fixed physical memory to user-land map.
3.host-linux tells OS-independent part to where the kernel module is mapped.
It seems that this infomation is used to map some part of kernel module
to 'nexus' page. Which part should be mapped? Module in nexus.S? Or all kernel
module should be mapped?
The partly ported one is
http://www.planet.sci.kobe-u.ac.jp/~takawata/freemware/
.Based on a bit older version.
Status: Will not work.Can be built *in my environment*.
Modified file:
freemware.h(ioctl command value)
all module file
(Change comment style because // comment is not permitted by kernel module
default compiler option.)
Add:
kernel/host-freebsd.c
kernel/freebsd/Makefile
Regards,
Takanori Watanabe
<a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html">
Public Key</a>
Key fingerprint = 2C 51 E2 78 2C E1 C5 2D 0F F1 20 A3 11 3A 62 2A