Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!amdahl!ptsfa!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: comp.sys.m68k Subject: Re: 68020 virtual machine? Message-ID: <2018@hoptoad.uucp> Date: Mon, 20-Apr-87 01:33:20 EST Article-I.D.: hoptoad.2018 Posted: Mon Apr 20 01:33:20 1987 Date-Received: Tue, 21-Apr-87 00:16:49 EST References: <5989@ism780c.UUCP> Organization: Nebula Consultants in San Francisco Lines: 32 > Suppose you are trying to do a virtual 68020 on the 68020. > How do you deal with attempts by the virtual 68020 to > return from a bus error? This is a hole in the design. You can kludge around in software, e.g. by keeping a cache of recent bus error stack frames and making sure that the one they are RTE-ing with is one actually generated by the machine, but this fails when the cache is not large enough It can potentially be infinite -- many bus errors cause program termination, meaning no RTE is ever done on that stack frame. Alternately, faulting in a page from over the net, from a server which comes back to life an hour later, means you'd have to hold that stack frame for an hour before the virtual system attempted to RTE to it. If you don't validate the bus error stack dump, the virtual machine can quite easily hang the hardware or get into other messy trouble. The microcode program counter is in that stack dump! In fact, this is how Motorola runs some microdiagnostics on the chips -- they are in microcode that is only reachable via RTE from a long stack frame. You can probably get close enough to do useful VM style work, but it requires a small bit of trust of the code running in the virtual machines. E.g. you could put a small hook in the virtual machine such that when it takes a bus error it intends to RTE to later, it calls the VM supervisor via an ILLEGAL instruction, to tell it to save the stack frame for later. If it didn't do this, and didn't RTE soon, a future RTE to that frame would produce an error. -- Copyright 1987 John Gilmore; you can redistribute only if your recipients can. (This is an effort to bend Stargate to work with Usenet, not against it.) {sun,ptsfa,lll-crg,ihnp4,ucbvax}!hoptoad!gnu gnu@ingres.berkeley.edu