]>
Commit | Line | Data |
---|---|---|
78e87797 PB |
1 | @node Implementation notes |
2 | @appendix Implementation notes | |
debc7065 FB |
3 | |
4 | @menu | |
77d47e16 | 5 | * CPU emulation:: |
047f7038 | 6 | * Managed start up options:: |
debc7065 | 7 | @end menu |
debc7065 | 8 | |
77d47e16 | 9 | @node CPU emulation |
78e87797 | 10 | @section CPU emulation |
1f673135 | 11 | |
debc7065 | 12 | @menu |
77d47e16 PB |
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 | |
debc7065 FB |
19 | @end menu |
20 | ||
77d47e16 | 21 | @node x86 |
78e87797 | 22 | @subsection x86 and x86-64 emulation |
1f673135 FB |
23 | |
24 | QEMU x86 target features: | |
25 | ||
5fafdf24 | 26 | @itemize |
1f673135 | 27 | |
5fafdf24 | 28 | @item The virtual x86 CPU supports 16 bit and 32 bit addressing with segmentation. |
998a0501 BS |
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. | |
1f673135 FB |
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 | ||
5fafdf24 | 37 | @item An extensive Linux x86 CPU test program is included @file{tests/test-i386}. |
1f673135 FB |
38 | It can be used to test other x86 virtual CPUs. |
39 | ||
40 | @end itemize | |
41 | ||
42 | Current QEMU limitations: | |
43 | ||
5fafdf24 | 44 | @itemize |
1f673135 | 45 | |
998a0501 | 46 | @item Limited x86-64 support. |
1f673135 FB |
47 | |
48 | @item IPC syscalls are missing. | |
49 | ||
5fafdf24 | 50 | @item The x86 segment limits and access rights are not tested at every |
1f673135 FB |
51 | memory access (yet). Hopefully, very few OSes seem to rely on that for |
52 | normal use. | |
53 | ||
1f673135 FB |
54 | @end itemize |
55 | ||
77d47e16 | 56 | @node ARM |
78e87797 | 57 | @subsection ARM emulation |
1f673135 FB |
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 | ||
77d47e16 | 69 | @node MIPS |
78e87797 | 70 | @subsection MIPS emulation |
24d4de45 TS |
71 | |
72 | @itemize | |
73 | ||
74 | @item The system emulation allows full MIPS32/MIPS64 Release 2 emulation, | |
75 | including privileged instructions, FPU and MMU, in both little and big | |
76 | endian modes. | |
77 | ||
78 | @item The Linux userland emulation can run many 32 bit MIPS Linux binaries. | |
79 | ||
80 | @end itemize | |
81 | ||
82 | Current 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 | ||
b1f45238 TS |
92 | @item The watchpoint debug facility is not implemented. |
93 | ||
24d4de45 TS |
94 | @end itemize |
95 | ||
77d47e16 | 96 | @node PPC |
78e87797 | 97 | @subsection PowerPC emulation |
1f673135 FB |
98 | |
99 | @itemize | |
100 | ||
5fafdf24 | 101 | @item Full PowerPC 32 bit emulation, including privileged instructions, |
1f673135 FB |
102 | FPU and MMU. |
103 | ||
104 | @item Can run most PowerPC Linux binaries. | |
105 | ||
106 | @end itemize | |
107 | ||
77d47e16 | 108 | @node SPARC |
78e87797 | 109 | @subsection Sparc32 and Sparc64 emulation |
1f673135 FB |
110 | |
111 | @itemize | |
112 | ||
f6b647cd | 113 | @item Full SPARC V8 emulation, including privileged |
3475187d | 114 | instructions, FPU and MMU. SPARC V9 emulation includes most privileged |
a785e42e | 115 | and VIS instructions, FPU and I/D MMU. Alignment is fully enforced. |
1f673135 | 116 | |
a785e42e BS |
117 | @item Can run most 32-bit SPARC Linux binaries, SPARC32PLUS Linux binaries and |
118 | some 64-bit SPARC Linux binaries. | |
3475187d FB |
119 | |
120 | @end itemize | |
121 | ||
122 | Current QEMU limitations: | |
123 | ||
5fafdf24 | 124 | @itemize |
3475187d | 125 | |
3475187d FB |
126 | @item IPC syscalls are missing. |
127 | ||
1f587329 | 128 | @item Floating point exception support is buggy. |
3475187d FB |
129 | |
130 | @item Atomic instructions are not correctly implemented. | |
131 | ||
998a0501 BS |
132 | @item There are still some problems with Sparc64 emulators. |
133 | ||
134 | @end itemize | |
135 | ||
77d47e16 | 136 | @node Xtensa |
78e87797 | 137 | @subsection Xtensa emulation |
3aeaea65 MF |
138 | |
139 | @itemize | |
140 | ||
141 | @item Core Xtensa ISA emulation, including most options: code density, | |
142 | loop, extended L32R, 16- and 32-bit multiplication, 32-bit division, | |
044d003d MF |
143 | MAC16, miscellaneous operations, boolean, FP coprocessor, coprocessor |
144 | context, debug, multiprocessor synchronization, | |
3aeaea65 MF |
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. | |
149 | ||
044d003d MF |
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. | |
3aeaea65 MF |
153 | |
154 | @item Can run most Xtensa Linux binaries. | |
155 | ||
156 | @item New core configuration that requires no additional instructions | |
157 | may be created from overlay with minimal amount of hand-written code. | |
158 | ||
159 | @end itemize | |
160 | ||
047f7038 IM |
161 | @node Managed start up options |
162 | @section Managed start up options | |
163 | ||
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: | |
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 | |
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. | |
175 | @end table | |
176 | ||
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. | |
180 | ||
181 | However, at the -S pause point, it's impossible to configure options that affect | |
361ac948 MA |
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 | |
047f7038 IM |
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: | |
189 | @table @asis | |
190 | @item qmp_capabilities | |
191 | @item query-qmp-schema | |
192 | @item query-commands | |
193 | @item query-status | |
361ac948 | 194 | @item x-exit-preconfig |
047f7038 | 195 | @end table |