I had been keeping some half-notes on porting KQEMU on my work wesite, but I don't really see that site staying in tact too much longer in its current form. Now that olix0r.net exists, it seems better to keep all of my notes on development in one place.
The following is generally a recap of the work done between 2007/01/10 and 2007/02/07.
- Reformat kqemu-freebsd.c (rev 1.6) while trying to get a feel for the work needed to be done
- Translations from FreeBSD interfaces:
- module(9) -> lkm(9)
- vm(9) -> uvm(9)
- scheduler(9) -> scheduler(9)
- proc(9)/thread(9) -> lwp(9)
Since then, I have been reading (albeit, sporadically) both BSDs' bpf(4) implementations in order to compare the way in which devices are cloned. I've grokked most of it, but there were a seemingly minor difference that were nagging me, which I have since chalked up to bpf(4) implementation differences (rather than API differences).
This evening, I sat down and tried to finish the rest of the KQEMU port. At this point, it's not quite compiling, but I believe all of the interfaces have been translated appropriately. There are several bizarre compile (#include!) errors that I have to mitigate before I can start testing KQEMU.
Now that I look back, it's surprising how little work I had remaining. It was really all about getting throught the bpf(4) code. Really, what I had to do was use the file(9) interface to clone the KQEMU file pointer. This is implemented with a list (from QUEUE(3)) of KQEMU instances.
Tired- but pleased ;)