kqemu does not work on an SMP kernel with compiled without SMP support. It gets an error message about failing to wire/unwire a page, then typically just goes nuts with errors from the kernel extension.
After looking into this finally, I discovered that the code does have the necessary SMP locking, however if compiled without 'MULTIPROCESSOR' defined (as currently happens), the locking code is #defined away. This is a patch which will build a kernel extension on i386 which appears to be running correctly, it has been running for over 5 minutes and with the non-smp .ko on SMP kernel it would fail within 45 seconds of booting. Honestly I am not certain this is the correct approach. The SMP version of the kernel extension will fail to load on a non-SMP kernel due to references to SMP only kernel symbols. Is a FLAVOR the right way to handle this, or should the package be changed to build and install both versions, then expect the user to load the appropriate kernel extension in rc.securelevel. Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/kqemu/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- Makefile 20 Jan 2008 15:11:05 -0000 1.3 +++ Makefile 4 Apr 2008 04:01:00 -0000 @@ -35,6 +35,13 @@ FILES= Makefile.openbsd kqemu-openbsd.c +FLAVORS= smp +FLAVOR?= + +.if ${FLAVOR:L:Msmp} +CFLAGS+=-DMULTIPROCESSOR +.endif + post-extract: .for _f in ${FILES} @cp ${FILESDIR}/${_f} ${WRKBUILD} Dale Rahn [EMAIL PROTECTED]