2

Is there such thing as a para-emulation? Like para-virtualization but for emulation? If so, where could I find a website that describes it?

  • Are you thinking of a hypervisor plus emulated hardware (like network interface card)? DOSEMU, Virtual DOS Machines, VirtualBox, etc? – Kelvin Sherlock Oct 27 at 0:46
  • Or maybe something like WINE, where windows libraries are re-implented. Or Solaris zones, or Windows subsystem for Linux (first version at least) where the linux kernel syscalls are re-implemented? – Kelvin Sherlock Oct 27 at 1:01
4

Paravirtualisation is virtualisation in which the virtualised machine is provided with an API that allows it to make some calls to the hypervisor, for things the hypervisor can inherently do — typically to do things like expose native network or storage drivers directly to the virtualised OS. The virtualised OS will be aware that it is inside a virtual machine and instead of trying to access network or storage hardware directly will simply call out to the hypervisor with those requests.

Therefore I assume a paraemulator would be the same thing, except that the code inside the virtual instance is for a different processor and is therefore interpreted or dynamically recompiled, rather than being for the native processor.

If that's what you intended by the term then plenty of examples exist. Off the top of my head:

Xbeeb is a BBC Micro emulator first released in 1994. As may not be surprising from its vintage, it appears never to have had a website, being distributed via Usenet and FTP. Amongst its features, this taken from the announcement of version 0.3 in 1996 but present all the way along:

Emulated DFS. Xbeeb comes with it's own DFS ROM to allow emulation of many of the Acorn DFS commands. File images are created as part of the standard UNIX directory structure.

Note the "file images are created as part of the standard UNIX directory structure". What the custom ROM that Xbeeb serves to its emulated BBC Micro does is pipe file manipulations through the emulator to the native filing system. There are no disk images or tape images or anything else, there is only direct loading and saving from your outer machine.

I'd say that's as close to something you could call paraemulation as you're going to get. So, yes, there is such a thing.

I picked Xbeeb as an example because it's very straightforward in its approach. No media emulation whatsoever, just a bridge into your native filing system. Other emulators do very similar things, especially very old emulators as it was still an open question whether they'd be an extension of an old computer platform — allowing it to continue in a new form — or merely a preservation of one.

0

Is there such thing as a para-emulation? Like para-virtualization but for emulation?

In fact, if present it would still be para-virtualization, wouldn't it? There ist no principal difference between an emulated machine and a real one here.

Still, the strict answer is No. There is no para-virtualization in emulations.

Para-virtualization requires the guest system to explicite use host functions as services instead of their own functions. This is done by using new/unused opcodes known as hyper-call or diagnose-code to provide an escape from emulation. Implementing such a switch over is somewhat easy with modern OS and applications software, where user side software never does any hardware access and OS services are modularized as well as driver based. this gives a few, easy points to modify the guest software to make it run and utilise the speed advantage of the host system.

Classic computer software usually doesn't follow that approach. There is neither a well layered system of OS calls nor a sufficient high level layer of services worth to be shifted over, nor do these systems rely on clear encapsulated drivers. Worst of all, user side software regularly handles hardware directly on their own. As a result para-virtualization is quite fruitless.

Equally important, modern hardware is so much faster than the emulated systems, that even full hardware emulation will result in a performance magnitudes faster than the original system. Thus shortcuts to increase performance - and that's that para-virtualisation is about, don't make much sense.

Now, back in the time when speed difference between what the host provided and what the guest expected was still small, there have been attempts made to do emulations and use shortcuts to improve performance by moving part of the tasks into host system code.

  • One approach is Xbeep Tommy mentions where a new 'OS' was made, based on forwarding of guest calls into one or more host calls. 1994 Unix systems weren't that fast and even less timing precise. The drawback is a comparable huge implementation effort and at the same time only restricted capabilities. On the other hand, it made every well behaved guest program quite portable among the new world.

  • A different approach from back then was for 8080 software on PCs using NEC's V20 series chips. The V20 can be switched in a full hardware based 8080 mode. The only difference was an instuction to switch back into x86 mode. Using this offered essentially two modes of para-virtualization. Either replacing BIOS (hardware drivers) or BDOS (the OS). All approched I've seen so far went straight for the BDOS, writing a very small OS stub handing over the CP/M calls to the x86 side and there mapping them onto MS-DOS calls - which after all had direct equivalents to each of them. The result was running CP/M software in acceptable speed even on a standard 4.77 MHz machine.

  • Another approach, seen tried during early days, worked with intercepting subroutine calls to system functions so detecting what address a subroutine call was going to and if it's one of the virtualized, a corresponding host function was called from within the emulator. It still requested full figured emulation - or at least detection - for all code, as programs may jump into any ROM location. I'm not aware of any (still maintained) emulator doing this.

  • 2
    Well, in my WSpecem ZX Spectrum emulator (defunct) and my QtSpecem emulator, I do intercept ROM calls to the tape load routine for loading TAP files instead, implementing the equivalent ROM routine on C on the host side, and I honestly doubt they are the only Spectrum emulators doing that. But calling that paravirtualization is a big stretch. – Rui F Ribeiro Oct 27 at 17:27
  • I used Xbeeb as a clean example because the BBC MOS is layered to allow arbitrary filing systems, and in Xbeeb the emulator author has provided a new filing system, implemented so that it just calls into the host's native filing system calls. On the former claim, see section 16.1.4 onwards of stardot.org.uk/mirrors/www.bbcdocs.com/filebase/essentials/… : "Filing systems, upon selection, must provide a series of seven vectors ... These point to the relevant routines within the filing system." – Tommy Oct 27 at 18:20
  • 1
    @Tommy No doubt. The BBC also gains not only from having a rich interface, but also (as result) rather well behaving programs. – Raffzahn Oct 27 at 18:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.