This is needed to be able to apply different protections to
different mem bases. Note that it is (almost) impossible to
keep DPMI mem unaliased if one wants to create the separate
lowmem base for JIT. I.e. if you have MEM_BASE unprotected
and spanning both lowmem and DPMI, and EMU_BASE only for vm86jit,
then DPMI jit won't work on that EMU_BASE alias. You need
EMU_BASE spanning DPMI too, to allow DPMI jit to use it.
It is possible to hack up jit to use weird layouts, but it
will be slower. Better to add DPMI alias.
TODO: do something about fixed-addr linear allocs.
Export mem_bases instead.
Had to prepend mem_base with underscore in simx86, to avoid
the macro expansion for its private member with the same name.
Also replace most of MAP_FAILED with (void *)-1 to avoid the
inclusion of sys/mman.h everywhere.
simx86: IOPL=3 in eflags + code generation for v86 pushf
Using IOPL=3 simplifies IF flag processing by PUSHF/POPF etc, since
shifting to VIF is more work; also using VIF in PUSHF/POPF for
DPMI is cheating a little since the CPU doesn't trap them natively
and doesn't use VIF/VIP even with PVI unfortunately.
Programs shouldn't see much difference except that now for DPMI
IOPL=3 in the stack image of PUSHF (it was already 3 for vm86, no
changes there). There may be some DOS extenders sensitive to this.