Subject: Porting KQEMU LKM from FreeBSD
To: None <tech-kern@netbsd.org>
From: Oliver V Gould <ogould@olix0r.net>
List: tech-kern
Date: 01/19/2007 13:38:32
--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello-

I am attempting to port an LKM that wraps KQEMU [1] from FreeBSD to
NetBSD 3.1.  Based on preliminary attempts to compile the FreeBSD LKM
under NetBSD, I have located several trouble spots.  I'm not sure how
familar the list is with FreeBSD sources (I am not at all), but
hopefully somebody can help to put me on the right track...

* #include <sys/module.h>

NetBSD does not have a <sys/module.h>, but it does have a <sys/lkm.h>
that FreeBSD lacks.  Is anyone familiar enough with these two interfaces
to explain what (generally) needs to be converted?

* #include <vm/vm.h>                                                       =
                   =20
  #include <vm/vm_param.h>                                                 =
                   =20
  #include <vm/vm_extern.h>                                                =
                   =20
  #include <vm/pmap.h>                                                     =
                   =20
  #include <vm/vm_map.h>                                                   =
                   =20
  #include <vm/vm_kern.h>                                                  =
                   =20
  #include <vm/vm_page.h>

This interface is used to control memory mapping, AFAICT.  Is there an
equivalent interface in NetBSD?

This is my first real foray into this part of the OS, so any and all
pointers are appreciated.

Thanks,
  -Oliver

[1] KQEMU is a Lunix-binary that provides near-native performance for
    emulated QEMU environments.  http://qemu.org/qemu-accel.html

--6c2NcOVqGQ03X4Wi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iD8DBQFFsRAoC6De7no7rEgRAqk6AJ4yAK8q/Gk296u3UeQRoTDOyVcoNACfSEQk
nft5otg28BlbCMFU0qOdHrs=
=cOL1
-----END PGP SIGNATURE-----

--6c2NcOVqGQ03X4Wi--