Difference between pages "Compatibility layers" and "Hypervisors"

From Emulation General Wiki
(Difference between pages)
Jump to navigation Jump to search
m (From latest Wayback Machine snapshot)
 
 
Line 1: Line 1:
While not strictly emulation ''per se'' (hence why [[Wine]] stands for "Wine Is Not an Emulator"), '''compatibility layers''' allow software written for one operating system to run on a different OS, often by translating API and system calls made by an application to their equivalent calls in the host operating system. In theory, this should allow for near-native performance since no processor emulation takes place, but in practice some software such as games will tend to run a bit slower due to other bottlenecks that occur as a result of [[Emulation Accuracy|replicating the correct behavior]], such as accounting for graphics APIs like Direct3D that aren't supported on non-Microsoft platforms. Additionally, compatibility layers may also use emulation in order to run software built for a different architecture.
+
{{WIP}}
 +
 
 +
A '''[[wikipedia:x86_virtualization|hypervisor]]''' is a program that takes advantage of an architectural quirk in [[Intel CPUs]] to run emulated software at near-bare-metal speeds, running modern operating systems faster than emulators, but running video games slower than native hardware. This is possible because the processor is designed to execute code in a hierarchy that allows less-privileged software to run almost unmodified. For any instruction in a program that requests more privileges, such as those used by drivers, the hypervisor steps in to emulate the hardware response. There are two types of hypervisors;
 +
# A '''bare-metal hypervisor''', which is the operating system.
 +
# A '''software hypervisor''', the ones many are familiar with. They hook into the kernel of an existing operating system (such as Linux or Windows NT) and run alongside the rest of the software on the system.
 +
 
 +
Hypervisors are the source of the "host" and "guest" terminology since they help clarify the specific "machine" one refers to; the host is the physical hardware and it manages the guests. Most hypervisors try and support the Open Virtualization Format (OVF) to facilitate virtual appliances which are built for a specific purpose (such as running common server software like WordPress or MediaWiki).
 +
 
 +
==Type 2 hypervisors==
  
==Compatibility layers==
 
 
{| class="wikitable" style="text-align:center;"
 
{| class="wikitable" style="text-align:center;"
|-
 
 
! scope="col"|Name
 
! scope="col"|Name
 
! scope="col"|Operating System(s)
 
! scope="col"|Operating System(s)
Line 10: Line 16:
 
! scope="col"|Active
 
! scope="col"|Active
 
! scope="col"|[[Recommended Emulators|Recommended]]
 
! scope="col"|[[Recommended Emulators|Recommended]]
! scope="col"|Runs the following software
 
|-
 
!colspan="7"|PC / x86
 
 
|-
 
|-
|[[Wine]]
+
|[[QEMU]]
|align=left|{{Icon|Linux|macOS|FreeBSD}}
+
|align=left|{{Icon|Windows|Linux|macOS|FreeBSD}}
|[https://wiki.winehq.org/Download {{WineVer}} <br />(Dev: {{WineDevVer}})]
+
|{{QEMUVer}}
 
|{{✓}} ||{{✓}} ||{{✓}}
 
|{{✓}} ||{{✓}} ||{{✓}}
|Windows applications and games
 
 
|-
 
|-
|[[Proton]]
+
|[https://www.virtualbox.org/ Oracle VM VirtualBox]
|align=left|{{Icon|Linux}}
+
|align=left|{{Icon|Windows|Linux|macOS|FreeBSD|Solaris}}
|[https://store.steampowered.com/about/ {{ProtonVer}}]
+
|[https://www.virtualbox.org/wiki/Downloads {{VirtualBoxVer}}]
 
|{{✓}} ||{{✓}} ||{{✓}}
 
|{{✓}} ||{{✓}} ||{{✓}}
|Windows games
 
 
|-
 
|-
|[[TeknoParrot]]
+
|VMware Workstation Player/Pro
|align=left|{{Icon|Windows}}
+
|align=left|{{Icon|Windows|Linux}}
|[https://teknoparrot.com/download {{TeknoVer}}]
+
|{{VMwareWorkstationVer}}
 
|{{✗}} ||{{✓}} ||{{✓}}
 
|{{✗}} ||{{✓}} ||{{✓}}
|PC-based arcade games
 
 
|-
 
|-
|CrossOver
+
|VMware Fusion
|align=left|{{Icon|Linux|macOS|ChromeOS}}
+
|align=left|{{Icon|macOS}}
|[https://www.codeweavers.com/products 20.0.0]
+
|{{VMwareFusionVer}}
 
|{{✗}} ||{{✓}} ||{{✓}}
 
|{{✗}} ||{{✓}} ||{{✓}}
|Windows applications and games
 
|-
 
|[[Anbox]]
 
|align=left|{{Icon|Linux}}
 
|[https://docs.anbox.io/userguide/install.html git]
 
|{{✓}} ||{{✓}} ||{{✗}}
 
|Android software
 
|-
 
|[[Darling]]
 
|align=left|{{Icon|Linux}}
 
|[https://github.com/darlinghq/darling git]
 
|{{✓}} ||{{✓}} ||{{✗}} <small>(WIP)</small>
 
|macOS software
 
|-
 
|[[WineVDM]]
 
|align=left|{{Icon|Windows}}
 
|[https://github.com/otya128/winevdm/releases git]<br />[https://ci.appveyor.com/project/otya128/winevdm/ Dev]
 
|{{✓}} ||{{✓}} ||{{✗}}
 
|16-bit Windows apps and games
 
|-
 
|[[Wineskin]]
 
|align=left|{{Icon|macOS}}
 
|[http://wineskin.urgesoftware.com/tiki-index.php?page=Downloads 1.7]
 
|{{✓}} ||{{✗}} ||{{✗}}
 
|Windows applications and games
 
|-
 
|WineBottler
 
|align=left|{{Icon|macOS}}
 
|[https://winebottler.kronenberg.org/ 4.0.1.1 Dev]
 
|{{✓}} ||{{✗}} ||{{✗}}
 
|Windows applications and games
 
|-
 
|[[WoW]]
 
|align=left|{{Icon|Windows}}
 
|?
 
|{{✗}} ||{{✗}} ||{{✗}}
 
|Windows 9x apps and games
 
|-
 
|[[Win3mu]]
 
|align=left|{{Icon|Windows}}
 
|?
 
|{{✓}} ||{{✗}} ||{{✗}}
 
|Windows 3.x apps and games
 
|-
 
|[[Ardi Executor]]
 
|align=left|{{Icon|Windows|Linux|DOS}}
 
|[https://web.archive.org/web/20080404193445/http://www.ardi.com/ardi.php 2.1.17]
 
|{{✓}} ||{{✗}} ||{{✗}}
 
|Classic Mac OS software up to System 6
 
|-
 
|[http://dosemu.sourceforge.net/ DOSEmu]
 
|align=left|{{Icon|Linux}}
 
|[https://sourceforge.net/projects/dosemu/files/ 1.4.0]
 
|{{✓}} ||{{✗}} ||{{✗}}
 
|DOS software
 
|-
 
|[http://dosemu2.github.io/dosemu2/ DOSEmu2]
 
|align=left|{{Icon|Linux}}
 
|[https://github.com/dosemu2/dosemu2 git]
 
|{{✓}} ||{{✓}} ||{{✗}}
 
|DOS software
 
|-
 
!colspan="7"|Mobile / ARM
 
|-
 
|[[Wine]]
 
|align=left|{{Icon|Android}}
 
|[https://wiki.winehq.org/Download {{WineDevVer}}]
 
|{{✓}} ||{{✓}} ||{{✗}} <small>(WIP)</small>
 
|Windows applications and games
 
|-
 
|[https://github.com/AndreRH/hangover Hangover]
 
|align=left|{{Icon|Android|LinuxARM}}
 
|[https://github.com/AndreRH/hangover/releases git]
 
|{{✓}} ||{{✓}} ||{{✗}}
 
|Windows applications and games
 
|-
 
|[[Anbox]]
 
|align=left|{{Icon|LinuxARM}}
 
|[https://docs.anbox.io/userguide/install.html git]
 
|{{✓}} ||{{✓}} ||{{✗}}
 
|Android software
 
|-
 
!colspan="9"|Console
 
|-
 
|[[Nintendont]]
 
|align=left|{{Icon|Wii|WiiU}}
 
|[http://wii2.fr/download/Nintendont%20-%20190202.zip 2019-02-02]
 
|{{✓}} ||{{✗}} ||{{✓}}
 
|GameCube Games
 
 
|}
 
|}
  
===Comparisons===
+
;[[QEMU]]
*[[Wine]] is a free and open-source compatibility layer that aims to allow computer programs (application software and computer games) developed for Microsoft Windows to run on Unix-like operating systems, primarily Linux and macOS. Since late 2017 there is also an experimental build for Android. Wine is almost as old as the Linux project, starting in the summer of 1993. Today it's widely used, very popular and sponsored by companies such as CodeWeavers and Valve. The core Wine development aims at a correct implementation of the Windows API as a whole. In this regard it's similar to the [[MAME]] project in its focus on correctness over usability. There are a lot of versions/forks of Wine which focus of different goals, such as usability, compatibility, gaming, office applications, etc. A few are listed below, Wikipedia has [[wikipedia:Wine_(software)#Other_versions_of_Wine|a more complete list]].
+
:A general-purpose emulator that supports a wide range of hardware for use on a multitude of platforms. Used to be a hypervisor by way of KQEMU but has been deprecated in favor of other systems like KVM (a kernel module for Linux and FreeBSD) and HAXM (which is developed by Intel). QEMU has been used to emulate several non-PC x86 machines like [[XQEMU]] for the [[Xbox emulators|Xbox]], and [[Orbital]] for the [[PlayStation 4 emulators|PlayStation 4]]. The non-specific application of QEMU allows emulators like XQEMU and Orbital to function as hypervisors without having to write custom-made drivers.
**[[Proton]] is Valve's one-click solution to play Windows games on Linux. It's included in the Steam Linux client by default. Simply click on a whitelisted game and it will launch without any configuration, or enable it for all games in the settings. Proton is based on a fork of Wine in combination with other components such as DXVK (explained below) and FAudio.
+
 
**[https://www.codeweavers.com/products/ CrossOver] is a commercialized, supported version of Wine from CodeWeavers. It uses additional patches on top of Wine to make it easy to use. They contribute all of their work on CrossOvers back to Wine and make up about two thirds of the commits made to Wine. CrossOver is available on macOS, Linux and Chrome OS.
+
;Oracle VM VirtualBox
**[[Wineskin]] is an open-source compatibility layer which allows users to easily convert Windows software to macOS. The ports are in the form of Mac .app bundles with a self-contained Wine instance which are wrapped around the application to be converted.  
+
:VirtualBox is open source but it has an extension pack that adds features common on standard PCs like USB 2.0, 3.0, PXE boot, and hard drive encryption. It is generally the easiest to set up and get running.
* [[TeknoParrot]] is a compatibility layer for Windows PCs to run games originally made for Windows-based arcade systems. Has since version 1.51 also support for some games from the Linux-based Sega Lindbergh arcade board.
+
 
* [[Darling]] is a translation layer that allows you to run unmodified macOS binaries on Linux. In its nature, it is similar to the well-known [[Wine]] project. At this point, does not yet run macOS application with a GUI.
+
;VMware Workstation Pro
 +
:Is also available for GNU/Linux, though the Windows version has better 3D support because of its native Direct3D implementation.
 +
:;VMware Workstation Player
 +
::Formerly VMware Player, Workstation Player is VMware's free offering but lacks a few features like snapshots.
 +
:;VMware Fusion
 +
::A macOS port.
 +
 
 +
;Virtual PC
 +
:Microsoft's original offering for consumers, originally made by Connectix as commercial software until Microsoft made it a free download in 2006. Support ended with the introduction of Hyper-V but the last version can be downloaded [http://www.win3x.org/win3board/viewtopic.php?t=19227&language=en here]. Beware that it may cause issues on newer Windows so it's recommended that it's ran on older versions of Windows.
 +
 
 +
==Type 1 hypervisors==
 +
Rather than being installed as a standard program in an operating system, Type 1 hypervisors form the operating system used by a computer. Examples include;
 +
 
 +
* ESXi (commercial hypervisor by VMware)
 +
* Xen (open-source hypervisor developed for the Linux kernel)
 +
* UnRAID (commercial NAS distribution with an integrated hypervisor)
 +
* Hyper-V (commercial hypervisor Microsoft developed for Windows. Requires a Pro, Enterprise, or Education version of Windows 8, 8.1, or 10)
 +
 
 +
==Integrations==
 +
Many type 2 hypervisors include some sort of additional software that can be installed in a guest. This software listens to the hypervisor and facilitates communication between the guest and host, allowing for features like automatic screen resizing (where the host measures the height and width of the window and sends an optimal size for the guest to resize the display to), clipboard sharing (where anything copied on the host can be pasted in the guest), shared folders (where a directory on the host can be made available for access from a guest using a built-in file server and a direct network connection to the guest), and mouse integration (where the hypervisor emulates an absolute pointing device like a drawing tablet to give the impression that moving the cursor in and out of the machine's display is seamless). Three hypervisors are known to have them;
 +
* VirtualBox Guest Additions
 +
* VMware Tools (and its open-source counterpart, open-vm-tools)
 +
* SPICE Guest Additions (for use with libvirt and/or QEMU on UNIX/Linux hosts)
 +
==VFIO==
 +
VFIO (short for Virtual Function I/O) is a Linux kernel driver for PCI passthrough. Its appeal is that it works with graphics cards, meaning hypervisors on Linux can bypass graphics emulation for modern Windows games as opposed to having to use compatibility layers and wrappers. The catch is that the system needs;
 +
* An IOMMU (outlined in the VT-d and AMD-Vi specs) with processor and motherboard support
 +
And because the graphics card doesn't get utilized until the guest powers on, that also means;
 +
* A dedicated monitor, a monitor with multiple inputs, and/or a KVM switch (not to be confused with the KVM hypervisor)
 +
 
 +
If you're using an NVIDIA card, you also need to configure how the graphics card appears to the VM so that NVIDIA's driver doesn't reject the card.
 +
 
 +
==Emulation issues==
 +
===Graphics===
 +
Hypervisors don't have direct access to the graphics hardware with exception to Virgil/Virtio GPU available in QEMU (only works with Linux guests), which means graphics card emulation is less than ideal for video games that use 3D APIs. Every hypervisor has a different approach to handling 3D graphics; none are by any means performant enough to run modern video games without resorting to hardware passthrough. Support for OpenGL is slightly better than Direct3D since it doesn't have to be reverse engineered, but most Windows games (including ports) use Direct3D.
  
==Wrappers==
+
===[[Macintosh line#x86|macOS]]===
Compatibility layers may also make use of '''wrappers''', which translate a specific graphics API to another. How the user sets up the wrapper varies between each project but most involve a drop-in replacement of the original libraries.
+
There's an ongoing effort to get macOS installations working on hypervisors. Support has historically been low or non-existent since Apple makes no effort to support standard PC hardware. Some people have gotten this to successfully work on KVM/QEMU, with an example/setup guide for Debian/Ubuntu hosts being available [https://github.com/kholia/OSX-KVM here].
  
{{Main|Wrappers}}
+
==See also==
 +
* [[Intel CPUs]]
  
[[Category:Compatibility layers]]
+
[[Category:Computers]]
 
[[Category:Not really emulators]]
 
[[Category:Not really emulators]]

Revision as of 22:51, 9 July 2021

A hypervisor is a program that takes advantage of an architectural quirk in Intel CPUs to run emulated software at near-bare-metal speeds, running modern operating systems faster than emulators, but running video games slower than native hardware. This is possible because the processor is designed to execute code in a hierarchy that allows less-privileged software to run almost unmodified. For any instruction in a program that requests more privileges, such as those used by drivers, the hypervisor steps in to emulate the hardware response. There are two types of hypervisors;

  1. A bare-metal hypervisor, which is the operating system.
  2. A software hypervisor, the ones many are familiar with. They hook into the kernel of an existing operating system (such as Linux or Windows NT) and run alongside the rest of the software on the system.

Hypervisors are the source of the "host" and "guest" terminology since they help clarify the specific "machine" one refers to; the host is the physical hardware and it manages the guests. Most hypervisors try and support the Open Virtualization Format (OVF) to facilitate virtual appliances which are built for a specific purpose (such as running common server software like WordPress or MediaWiki).

Type 2 hypervisors

Name Operating System(s) Latest Version FLOSS Active Recommended
QEMU Windows Linux macOS FreeBSD 9.0.0-rc4
Oracle VM VirtualBox Windows Linux macOS FreeBSD Solaris 7.0.16
VMware Workstation Player/Pro Windows Linux 17.5.1
VMware Fusion macOS 11.5
QEMU
A general-purpose emulator that supports a wide range of hardware for use on a multitude of platforms. Used to be a hypervisor by way of KQEMU but has been deprecated in favor of other systems like KVM (a kernel module for Linux and FreeBSD) and HAXM (which is developed by Intel). QEMU has been used to emulate several non-PC x86 machines like XQEMU for the Xbox, and Orbital for the PlayStation 4. The non-specific application of QEMU allows emulators like XQEMU and Orbital to function as hypervisors without having to write custom-made drivers.
Oracle VM VirtualBox
VirtualBox is open source but it has an extension pack that adds features common on standard PCs like USB 2.0, 3.0, PXE boot, and hard drive encryption. It is generally the easiest to set up and get running.
VMware Workstation Pro
Is also available for GNU/Linux, though the Windows version has better 3D support because of its native Direct3D implementation.
VMware Workstation Player
Formerly VMware Player, Workstation Player is VMware's free offering but lacks a few features like snapshots.
VMware Fusion
A macOS port.
Virtual PC
Microsoft's original offering for consumers, originally made by Connectix as commercial software until Microsoft made it a free download in 2006. Support ended with the introduction of Hyper-V but the last version can be downloaded here. Beware that it may cause issues on newer Windows so it's recommended that it's ran on older versions of Windows.

Type 1 hypervisors

Rather than being installed as a standard program in an operating system, Type 1 hypervisors form the operating system used by a computer. Examples include;

  • ESXi (commercial hypervisor by VMware)
  • Xen (open-source hypervisor developed for the Linux kernel)
  • UnRAID (commercial NAS distribution with an integrated hypervisor)
  • Hyper-V (commercial hypervisor Microsoft developed for Windows. Requires a Pro, Enterprise, or Education version of Windows 8, 8.1, or 10)

Integrations

Many type 2 hypervisors include some sort of additional software that can be installed in a guest. This software listens to the hypervisor and facilitates communication between the guest and host, allowing for features like automatic screen resizing (where the host measures the height and width of the window and sends an optimal size for the guest to resize the display to), clipboard sharing (where anything copied on the host can be pasted in the guest), shared folders (where a directory on the host can be made available for access from a guest using a built-in file server and a direct network connection to the guest), and mouse integration (where the hypervisor emulates an absolute pointing device like a drawing tablet to give the impression that moving the cursor in and out of the machine's display is seamless). Three hypervisors are known to have them;

  • VirtualBox Guest Additions
  • VMware Tools (and its open-source counterpart, open-vm-tools)
  • SPICE Guest Additions (for use with libvirt and/or QEMU on UNIX/Linux hosts)

VFIO

VFIO (short for Virtual Function I/O) is a Linux kernel driver for PCI passthrough. Its appeal is that it works with graphics cards, meaning hypervisors on Linux can bypass graphics emulation for modern Windows games as opposed to having to use compatibility layers and wrappers. The catch is that the system needs;

  • An IOMMU (outlined in the VT-d and AMD-Vi specs) with processor and motherboard support

And because the graphics card doesn't get utilized until the guest powers on, that also means;

  • A dedicated monitor, a monitor with multiple inputs, and/or a KVM switch (not to be confused with the KVM hypervisor)

If you're using an NVIDIA card, you also need to configure how the graphics card appears to the VM so that NVIDIA's driver doesn't reject the card.

Emulation issues

Graphics

Hypervisors don't have direct access to the graphics hardware with exception to Virgil/Virtio GPU available in QEMU (only works with Linux guests), which means graphics card emulation is less than ideal for video games that use 3D APIs. Every hypervisor has a different approach to handling 3D graphics; none are by any means performant enough to run modern video games without resorting to hardware passthrough. Support for OpenGL is slightly better than Direct3D since it doesn't have to be reverse engineered, but most Windows games (including ports) use Direct3D.

macOS

There's an ongoing effort to get macOS installations working on hypervisors. Support has historically been low or non-existent since Apple makes no effort to support standard PC hardware. Some people have gotten this to successfully work on KVM/QEMU, with an example/setup guide for Debian/Ubuntu hosts being available here.

See also