Subject: Re: VMS ABI emulation under NetBSD
To: None <port-vax@NetBSD.ORG>
From: John Wilson <wilson@dbit.com>
List: port-vax
Date: 12/17/2002 10:59:39
From: Brian Chase <vaxzilla@jarai.org>

>How difficult would it be to create multiple virtual (but not emulated)
>machines on a VAX, something along the lines of what VMware does for
>PCs?

This is just speculation about how VMware works:  my understanding (I
don't have it) is things run a bunch slower under VMware, but not orders
of magnitude slower.  So it's not simply that they know about some magical
undocumented true-VM hooks in the '386 architecture (because then it
would run close to full speed), and it's not that they're single-stepping
through the guest code looking for privileged instructions, non-flat code,
V86 stuff, etc. (because then it would be far slower than it is).

It seems like the obvious middle path is, it's a dynamic translator.
Only it has a really easy job of it because 99% of the code actually
requires no translation at all, so they just copy it into the cached
translation blocks and do address fixups.  That would also mean they can
(with much more effort, but still not as bad as a real cross-architecture
emulator) run segmented and V86 code in flatland w/o even needing
modify_ldt()/vm86() or whatever the host OS uses (some of the more
annoying OSes don't even have any version of those calls), since they
can translate it to equivalent flat code on the fly.

Whether or not this is what VMware does (anyone know for real?), *sure*
it could be done this way on the VAX.  While you were at it you could
even add PDP-11 compatibility mode to newer VAXen, add or delete optional
instructions, mix & match peripherals, etc., all that emulator style stuff
except that most cases wouldn't really be emulated so the performance
would be pretty good.

That's not to say it would be easy!  But it sure would be neat.  I've been
thinking of trying something like this on the PDP-11, the performance would
blow pretty hard there (phys mem is already too tight to share it with a
whole other PDP-11), but at least it's a simple enough architecture that it
wouldn't take a whole lifetime to write it.  (Just nine years!)

John Wilson
D Bit