I'm currently porting vx32 by Bryan Ford and Russ Cox to Win32. This is very much a work in progress and is in pre-alpha state (it works... sort of), I expect another week or two until I have a usable beta.
I'm not a regular Windows developer and only recently setup a new Windows machine for testing, this project is an effort to do something useful with Windows for once. The MinGW compiler is being used to cross-compile for Win32 from a Linux host, and presumably this should work for MSYS and MinGW on a Windows host. I have no intention of using the Microsoft C compiler for now.
If you need more information, feel free to contact me at: harry.roberts@midnight-labs.org.
My goal is to get 9vx by Russ Cox, a port of Plan9 to run on supported Windows platforms.
The memory mapped file interfaces (CreateFileMapping and MapViewOfFile) can be used to construct equivilents of mmap
Instead of signals I'm using SEH to catch page faults etc. This is done at the process level using SetUnhandledExceptionFilter and SetErrorMode. This introduces yet another problem of jumping out of the SEH filter and back into vxproc_run (e.g. emulating siglongjmp).
After some consideration my previous approach to SEH was wrong, there's too much disambiguation; to greatly simplifly this I'm now using a __try/__catch block within vxproc_run, this generally means we always know the state of vxemu and no longer have to search & validate it.
20/July/2008 - Ditched ZwSetInformationProcess and using ZwSetLdtEntries instead, this lead to issues with MinGW's ntdll definition, see MinGW bug #2022821
20/July/2008 - It seems using a global SetUnhandledExceptionFilter is not the way to go, instead a __try/__catch block around vxproc_run is a better and more natural way.
20/July/2008 - Duh I should read my own notes!
Necessary functions are only available in Windows XP SP2 and Windows Server 2003 or greater.
x86-64 support should be trivial, although I don't have a machine available for testing.