You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

qemu-tech.texi 5.4KB

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