[net.micro.68k] Making the 68000 "read SSR" instruction privileged in the 68010

laurir (03/14/83)

	Which brings up another O.S. gaffe on the part of Motorola: at
    a talk I went to about the '10, they mentioned that the only instruction
    in the current set which was going to change was "read SSR",
    which will become privileged.  Will someone tell me why they bothered?
	Michael Turner

  This is necessary to permit the existence of a Virtual Machine Monitor
on the 68010.  This is a operating-system-like program which runs several
processes, each of which think they are running stand-alone on a bare
68010.  For example, attempts to do input and output can be trapped
(via memory management) and simulated by the VMM.
  Since the idea is to fake out each process, it is insufficient to allow
a process to read the real SSR.  Making the "read SSR" instruction
privileged gives the VMM the hook it needs to simulate this instruction
by passing a virtual SSR to the process.  An example of the differences
between the real and virtual is that the virtual SSR may well indicate
that the process is in supervisor mode, while the real SSR shows user
mode.
  As far as I can tell, this was the only aspect of the 68000 which
prevented a VMM.  When I first read the 68000 book in 1978, I recall
becoming excited about the prospect of a true "mainframe on a chip"
which could do big-computer things like VMM's; imagine my despair when
I saw the misdesign of this instruction.  (The lack of support for
demand paging was another disappointment.)
  This was also a problem with the PDP-10.  The PORTAL instruction,
used by an operating system to jump and switch from supervisor to user
mode, acted as a simple jump if the machine was already in user mode.
Thus, any VMM would be unable to determine when the process thought it
had switched from supervisor to user mode.
  -- Andrew Klossner (decvax!tektronix!tekmdp!laurir)