Features/SoftMMU: Difference between revisions

From QEMU
No edit summary
No edit summary
 
Line 3: Line 3:
In terms of features the SoftMMU is the mechanism by which the TCG allows the emulation of virtual memory. It does this by implementing a TLB mechanism which translates a virtual address into an addend which combined with the original address will point to an user-space address inside QEMUs memory space.
In terms of features the SoftMMU is the mechanism by which the TCG allows the emulation of virtual memory. It does this by implementing a TLB mechanism which translates a virtual address into an addend which combined with the original address will point to an user-space address inside QEMUs memory space.


There is a fast path where the lookup is done in generated TCG code. When a TLB entry doesn't match the looked up page a slow path will re-fill the TLB with the correct entry. The code is in {{src|accel/tcg/cputlb.c}}
There is a fast path where the lookup is done in generated TCG code. When a TLB entry doesn't match the looked up page a slow path will re-fill the TLB with the correct entry. The code is in {{src|path=accel/tcg/cputlb.c}}


== Emulated MMUs ==
== Emulated MMUs ==

Latest revision as of 12:14, 17 January 2018

SoftMMU is an overloaded term in QEMU. When people refer to the softmmu binaries they mean the system emulation binary which is used in both TCG and KVM modes as opposed to linux-user binaries.

In terms of features the SoftMMU is the mechanism by which the TCG allows the emulation of virtual memory. It does this by implementing a TLB mechanism which translates a virtual address into an addend which combined with the original address will point to an user-space address inside QEMUs memory space.

There is a fast path where the lookup is done in generated TCG code. When a TLB entry doesn't match the looked up page a slow path will re-fill the TLB with the correct entry. The code is in accel/tcg/cputlb.c

Emulated MMUs

The SoftMMU explicitly doesn't emulate any particular systems MMU facilities. It does however use the emulated systems lookup tables when filling new entries.

Speed

As each memory access at a minimum needs a number of instructions to lookup the address it will be slower than TCG based linux-user emulation.