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.3KB

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