1 @node Implementation notes
2 @appendix Implementation notes
6 * Managed start up options::
10 @section CPU emulation
13 * x86:: x86 and x86-64 emulation
15 * MIPS:: MIPS emulation
16 * PPC:: PowerPC emulation
17 * SPARC:: Sparc32 and Sparc64 emulation
18 * Xtensa:: Xtensa emulation
22 @subsection x86 and x86-64 emulation
24 QEMU x86 target features:
28 @item The virtual x86 CPU supports 16 bit and 32 bit addressing with segmentation.
29 LDT/GDT and IDT are emulated. VM86 mode is also supported to run
30 DOSEMU. There is some support for MMX/3DNow!, SSE, SSE2, SSE3, SSSE3,
31 and SSE4 as well as x86-64 SVM.
33 @item Support of host page sizes bigger than 4KB in user mode emulation.
35 @item QEMU can emulate itself on x86.
37 @item An extensive Linux x86 CPU test program is included @file{tests/test-i386}.
38 It can be used to test other x86 virtual CPUs.
42 Current QEMU limitations:
46 @item Limited x86-64 support.
48 @item IPC syscalls are missing.
50 @item The x86 segment limits and access rights are not tested at every
51 memory access (yet). Hopefully, very few OSes seem to rely on that for
57 @subsection ARM emulation
61 @item Full ARM 7 user emulation.
63 @item NWFPE FPU support included in user Linux emulation.
65 @item Can run most ARM Linux binaries.
70 @subsection MIPS emulation
74 @item The system emulation allows full MIPS32/MIPS64 Release 2 emulation,
75 including privileged instructions, FPU and MMU, in both little and big
78 @item The Linux userland emulation can run many 32 bit MIPS Linux binaries.
82 Current QEMU limitations:
86 @item Self-modifying code is not always handled correctly.
88 @item 64 bit userland emulation is not implemented.
90 @item The system emulation is not complete enough to run real firmware.
92 @item The watchpoint debug facility is not implemented.
97 @subsection PowerPC emulation
101 @item Full PowerPC 32 bit emulation, including privileged instructions,
104 @item Can run most PowerPC Linux binaries.
109 @subsection Sparc32 and Sparc64 emulation
113 @item Full SPARC V8 emulation, including privileged
114 instructions, FPU and MMU. SPARC V9 emulation includes most privileged
115 and VIS instructions, FPU and I/D MMU. Alignment is fully enforced.
117 @item Can run most 32-bit SPARC Linux binaries, SPARC32PLUS Linux binaries and
118 some 64-bit SPARC Linux binaries.
122 Current QEMU limitations:
126 @item IPC syscalls are missing.
128 @item Floating point exception support is buggy.
130 @item Atomic instructions are not correctly implemented.
132 @item There are still some problems with Sparc64 emulators.
137 @subsection Xtensa emulation
141 @item Core Xtensa ISA emulation, including most options: code density,
142 loop, extended L32R, 16- and 32-bit multiplication, 32-bit division,
143 MAC16, miscellaneous operations, boolean, FP coprocessor, coprocessor
144 context, debug, multiprocessor synchronization,
145 conditional store, exceptions, relocatable vectors, unaligned exception,
146 interrupts (including high priority and timer), hardware alignment,
147 region protection, region translation, MMU, windowed registers, thread
148 pointer, processor ID.
150 @item Not implemented options: data/instruction cache (including cache
151 prefetch and locking), XLMI, processor interface. Also options not
152 covered by the core ISA (e.g. FLIX, wide branches) are not implemented.
154 @item Can run most Xtensa Linux binaries.
156 @item New core configuration that requires no additional instructions
157 may be created from overlay with minimal amount of hand-written code.
161 @node Managed start up options
162 @section Managed start up options
164 In system mode emulation, it's possible to create a VM in a paused state using
165 the -S command line option. In this state the machine is completely initialized
166 according to command line options and ready to execute VM code but VCPU threads
167 are not executing any code. The VM state in this paused state depends on the way
168 QEMU was started. It could be in:
170 @item initial state (after reset/power on state)
171 @item with direct kernel loading, the initial state could be amended to execute
172 code loaded by QEMU in the VM's RAM and with incoming migration
173 @item with incoming migration, initial state will by amended with the migrated
174 machine state after migration completes.
177 This paused state is typically used by users to query machine state and/or
178 additionally configure the machine (by hotplugging devices) in runtime before
179 allowing VM code to run.
181 However, at the -S pause point, it's impossible to configure options that affect
182 initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. The
183 experimental --preconfig command line option allows pausing QEMU
184 before the initial VM creation, in a ``preconfig'' state, where additional
185 queries and configuration can be performed via QMP before moving on to
186 the resulting configuration startup. In the preconfig state, QEMU only allows
187 a limited set of commands over the QMP monitor, where the commands do not
188 depend on an initialized machine, including but not limited to:
190 @item qmp_capabilities
191 @item query-qmp-schema
194 @item x-exit-preconfig