From LinuxMIPS
Revision as of 22:46, 5 December 2013 by Jhogan (talk | contribs) (s/revision/release)
Jump to: navigation, search

KVM is one of several virtualization technologies available for Linux. KVM generally requires hardware support but can run an unmodified OS image but in exchange offers full system virtualization, good performance. Also since KVM is based on a standard Linux kernel the host system uses the standard I/O drivers available for the platform.

Trap and Emulate

KymaSys implemented MIPS support in KVM for MIPS32 processors using Trap and Emulate, which was merged in Linux 3.10. A guest kernel is running in user space which means in the lowest 2GB of the address space. As the result the address space for guest applications had to be shrunk so guest kernels now use a 1GB/1GB userspace/kernelspace split. Instructions which require kernel mode trap to the kernel which emulates the instruction.

Kyma claims “We've limited the changes to the Linux guest to less than 10 lines of code and use advanced techniques like run-time binary translation to minimize the number of traps and greatly improve performance.”[1][2] for their software-only implementation. If their technology holds up to its promise they should deliver performance below but fairly close to that of a hardware-based KVM implementation.

VZ (Hardware Assisted Virtualization)

MIPS Release 5 has the VZ module to support hardware assisted virtualization. Multiple KVM implementations utilising VZ have been proposed.


David Daney posted a patchset to add KVM/VZ support on 7th June 2013[3].

It modifies the existing exception handlers to handle guest mode, and is largely focussed on MIPS64 so far. David Daney has also ported the kvm tool to MIPS as the controlling program, so this implementation makes use of paravirtualization.


Sanjay Lal posted a patchset to add KVM/VZ support on 19th May 2013[4].

It creates a new exception vector (using the EBASE COP0 register) for use when running guests, and is largely focussed on MIPS32 so far. KymaSys have also adding MIPS KVM support to QEMU[5], which is used to emulate the Malta platform.

See Also