1@node Implementation notes 2@appendix Implementation notes 3 4@menu 5* CPU emulation:: 6* Managed start up options:: 7@end menu 8 9@node CPU emulation 10@section CPU emulation 11 12@menu 13* x86:: x86 and x86-64 emulation 14* ARM:: ARM emulation 15* MIPS:: MIPS emulation 16* PPC:: PowerPC emulation 17* SPARC:: Sparc32 and Sparc64 emulation 18* Xtensa:: Xtensa emulation 19@end menu 20 21@node x86 22@subsection x86 and x86-64 emulation 23 24QEMU x86 target features: 25 26@itemize 27 28@item The virtual x86 CPU supports 16 bit and 32 bit addressing with segmentation. 29LDT/GDT and IDT are emulated. VM86 mode is also supported to run 30DOSEMU. There is some support for MMX/3DNow!, SSE, SSE2, SSE3, SSSE3, 31and SSE4 as well as x86-64 SVM. 32 33@item Support of host page sizes bigger than 4KB in user mode emulation. 34 35@item QEMU can emulate itself on x86. 36 37@item An extensive Linux x86 CPU test program is included @file{tests/test-i386}. 38It can be used to test other x86 virtual CPUs. 39 40@end itemize 41 42Current QEMU limitations: 43 44@itemize 45 46@item Limited x86-64 support. 47 48@item IPC syscalls are missing. 49 50@item The x86 segment limits and access rights are not tested at every 51memory access (yet). Hopefully, very few OSes seem to rely on that for 52normal use. 53 54@end itemize 55 56@node ARM 57@subsection ARM emulation 58 59@itemize 60 61@item Full ARM 7 user emulation. 62 63@item NWFPE FPU support included in user Linux emulation. 64 65@item Can run most ARM Linux binaries. 66 67@end itemize 68 69@node MIPS 70@subsection MIPS emulation 71 72@itemize 73 74@item The system emulation allows full MIPS32/MIPS64 Release 2 emulation, 75including privileged instructions, FPU and MMU, in both little and big 76endian modes. 77 78@item The Linux userland emulation can run many 32 bit MIPS Linux binaries. 79 80@end itemize 81 82Current QEMU limitations: 83 84@itemize 85 86@item Self-modifying code is not always handled correctly. 87 88@item 64 bit userland emulation is not implemented. 89 90@item The system emulation is not complete enough to run real firmware. 91 92@item The watchpoint debug facility is not implemented. 93 94@end itemize 95 96@node PPC 97@subsection PowerPC emulation 98 99@itemize 100 101@item Full PowerPC 32 bit emulation, including privileged instructions, 102FPU and MMU. 103 104@item Can run most PowerPC Linux binaries. 105 106@end itemize 107 108@node SPARC 109@subsection Sparc32 and Sparc64 emulation 110 111@itemize 112 113@item Full SPARC V8 emulation, including privileged 114instructions, FPU and MMU. SPARC V9 emulation includes most privileged 115and VIS instructions, FPU and I/D MMU. Alignment is fully enforced. 116 117@item Can run most 32-bit SPARC Linux binaries, SPARC32PLUS Linux binaries and 118some 64-bit SPARC Linux binaries. 119 120@end itemize 121 122Current QEMU limitations: 123 124@itemize 125 126@item IPC syscalls are missing. 127 128@item Floating point exception support is buggy. 129 130@item Atomic instructions are not correctly implemented. 131 132@item There are still some problems with Sparc64 emulators. 133 134@end itemize 135 136@node Xtensa 137@subsection Xtensa emulation 138 139@itemize 140 141@item Core Xtensa ISA emulation, including most options: code density, 142loop, extended L32R, 16- and 32-bit multiplication, 32-bit division, 143MAC16, miscellaneous operations, boolean, FP coprocessor, coprocessor 144context, debug, multiprocessor synchronization, 145conditional store, exceptions, relocatable vectors, unaligned exception, 146interrupts (including high priority and timer), hardware alignment, 147region protection, region translation, MMU, windowed registers, thread 148pointer, processor ID. 149 150@item Not implemented options: data/instruction cache (including cache 151prefetch and locking), XLMI, processor interface. Also options not 152covered by the core ISA (e.g. FLIX, wide branches) are not implemented. 153 154@item Can run most Xtensa Linux binaries. 155 156@item New core configuration that requires no additional instructions 157may be created from overlay with minimal amount of hand-written code. 158 159@end itemize 160 161@node Managed start up options 162@section Managed start up options 163 164In system mode emulation, it's possible to create a VM in a paused state using 165the -S command line option. In this state the machine is completely initialized 166according to command line options and ready to execute VM code but VCPU threads 167are not executing any code. The VM state in this paused state depends on the way 168QEMU was started. It could be in: 169@table @asis 170@item initial state (after reset/power on state) 171@item with direct kernel loading, the initial state could be amended to execute 172code 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 174machine state after migration completes. 175@end table 176 177This paused state is typically used by users to query machine state and/or 178additionally configure the machine (by hotplugging devices) in runtime before 179allowing VM code to run. 180 181However, at the -S pause point, it's impossible to configure options that affect 182initial VM creation (like: -smp/-m/-numa ...) or cold plug devices. The 183experimental --preconfig command line option allows pausing QEMU 184before the initial VM creation, in a ``preconfig'' state, where additional 185queries and configuration can be performed via QMP before moving on to 186the resulting configuration startup. In the preconfig state, QEMU only allows 187a limited set of commands over the QMP monitor, where the commands do not 188depend on an initialized machine, including but not limited to: 189@table @asis 190@item qmp_capabilities 191@item query-qmp-schema 192@item query-commands 193@item query-status 194@item x-exit-preconfig 195@end table 196