qemu-tech cleanup
cover qemu-tech cleanup
qemu-tech is limited to TCG and large parts of it are obsolete or are just fine in qemu-doc. Split it into other sources of documentation, placing what's left in an appendix of qemu-doc.
Ultimately we should have a new internals manual built from docs/, and then the "Translator Internals" parts of qemu-tech could move to docs/ as well. The bits on limitation and features of CPU emulation should remain in qemu-doc. They are not entirely up-to-date, but I am not attempting to improve that yet---also because I could only really do that for x86.
Paolo Bonzini (10):
qemu-tech: drop index
qemu-doc: replace introduction with the one from the internals manual
qemu-doc: drop installation and compilation notes
qemu-tech: move text from qemu-tech to tcg/README
qemu-tech: document lazy condition code evaluation in cpu.h
qemu-tech: move user mode emulation features from qemu-tech
qemu-tech: move TCG test documentation to tests/tcg/README
qemu-tech: reorganize content
qemu-tech: rewrite some parts
qemu-doc: merge qemu-tech and qemu-doc
.gitignore | 2 - Makefile | 13 +- README | 2 - qemu-doc.texi | 352 +++++++-------------------------- qemu-tech.texi | 557 +++++++++++------------------------------------------ qemu.nsi | 3 - target-cris/cpu.h | 7 + target-i386/cpu.h | 7 + target-m68k/cpu.h | 8 + target-sparc/cpu.h | 5 + tcg/README | 5 + tests/tcg/README | 76 ++++++++ ui/cocoa.m | 9 - 13 files changed, 301 insertions(+), 745 deletions(-) create mode 100644 tests/tcg/README
Signature · 1 line
2.7.4
PATCH 1/10 qemu-tech: drop index
--- qemu-tech.texi | 5 ----- 1 file changed, 5 deletions(-)
qemu-tech.texi +0 -5
@@ -32,7 +32,6 @@ * Introduction:: * QEMU Internals:: * Regression Tests:: -* Index:: @end menu @end ifnottex
@@ -691,8 +690,4 @@ This program tests various Linux system calls. It is used to verify that the system call parameters are correctly converted between target and host CPUs. -@node Index -@chapter Index -@printindex cp - @bye
Signature · 1 line
2.7.4
PATCH 2/10 qemu-doc: replace introduction with the one from the internals manual
In reply to Paolo BonziniThe user manual has an obsolete introduction, while the one in the internals manual lists QEMU's features quite nicely. Drop the obsolete content and remove generic user-level documentation from qemu-tech.
--- qemu-doc.texi | 84 +++++++++++++++++++++++++++++-------------------------- qemu-tech.texi | 88 ---------------------------------------------------------- 2 files changed, 44 insertions(+), 128 deletions(-)
qemu-doc.texi +44 -40
@@ -57,65 +57,69 @@ QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed. +@cindex operating modes QEMU has two operating modes: @itemize -@cindex operating modes - -@item @cindex system emulation -Full system emulation. In this mode, QEMU emulates a full system (for +@item Full system emulation. In this mode, QEMU emulates a full system (for example a PC), including one or several processors and various peripherals. It can be used to launch different Operating Systems without rebooting the PC or to debug system code. -@item @cindex user mode emulation -User mode emulation. In this mode, QEMU can launch +@item User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU. It can be used to launch the Wine Windows API emulator (@url{http://www.winehq.org}) or to ease cross-compilation and cross-debugging. @end itemize -QEMU can run without a host kernel driver and yet gives acceptable -performance. +QEMU has the following features: + +@itemize +@item QEMU can run without a host kernel driver and yet gives acceptable +performance. It uses dynamic translation to native code for reasonable speed, +with support for self-modifying code and precise exceptions. + +@item It is portable to several operating systems (GNU/Linux, *BSD, Mac OS X, +Windows) and architectures. + +@item It performs accurate software emulation of the FPU. +@end itemize -For system emulation, the following hardware targets are supported: +QEMU user mode emulation has the following features: @itemize -@cindex emulated target systems -@cindex supported target systems -@item PC (x86 or x86_64 processor) -@item ISA PC (old style PC without PCI bus) -@item PREP (PowerPC processor) -@item G3 Beige PowerMac (PowerPC processor) -@item Mac99 PowerMac (PowerPC processor, in progress) -@item Sun4m/Sun4c/Sun4d (32-bit Sparc processor) -@item Sun4u/Sun4v (64-bit Sparc processor, in progress) -@item Malta board (32-bit and 64-bit MIPS processors) -@item MIPS Magnum (64-bit MIPS processor) -@item ARM Integrator/CP (ARM) -@item ARM Versatile baseboard (ARM) -@item ARM RealView Emulation/Platform baseboard (ARM) -@item Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor) -@item Luminary Micro LM3S811EVB (ARM Cortex-M3) -@item Luminary Micro LM3S6965EVB (ARM Cortex-M3) -@item Freescale MCF5208EVB (ColdFire V2). -@item Arnewsh MCF5206 evaluation board (ColdFire V2). -@item Palm Tungsten|E PDA (OMAP310 processor) -@item N800 and N810 tablets (OMAP2420 processor) -@item MusicPal (MV88W8618 ARM processor) -@item Gumstix "Connex" and "Verdex" motherboards (PXA255/270). -@item Siemens SX1 smartphone (OMAP310 processor) -@item AXIS-Devboard88 (CRISv32 ETRAX-FS). -@item Petalogix Spartan 3aDSP1800 MMU ref design (MicroBlaze). -@item Avnet LX60/LX110/LX200 boards (Xtensa) +@item Generic Linux system call converter, including most ioctls. + +@item clone() emulation using native CPU clone() to use Linux scheduler for threads. + +@item Accurate signal handling by remapping host signals to target signals. +@end itemize + +QEMU full system emulation has the following features: +@itemize +@item +QEMU uses a full software MMU for maximum portability. + +@item +QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators +execute most of the guest code natively, while +continuing to emulate the rest of the machine. + +@item +Various hardware devices can be emulated and in some cases, host +devices (e.g. serial and parallel ports, USB, drives) can be used +transparently by the guest Operating System. Host device passthrough +can be used for talking to external physical peripherals (e.g. a +webcam, modem or tape drive). + +@item +Symmetric multiprocessing (SMP) support. Currently, an in-kernel +accelerator is required to use more than one host CPU for emulation. + @end itemize -@cindex supported user mode targets -For user emulation, x86 (32 and 64 bit), PowerPC (32 and 64 bit), -ARM, MIPS (32 bit only), Sparc (32 and 64 bit), -Alpha, ColdFire(m68k), CRISv32 and MicroBlaze CPUs are supported. @node Installation @chapter Installation
qemu-tech.texi +0 -88
100 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 3/10 qemu-doc: drop installation and compilation notes
In reply to Paolo BonziniThese are in README or obsolete, and the detailed version can be on a website instead.
--- README | 2 - qemu-doc.texi | 249 ---------------------------------------------------------- 2 files changed, 251 deletions(-)
README +0 -2
@@ -42,8 +42,6 @@ of other UNIX targets. The simple steps to build QEMU are: ../configure make -Complete details of the process for building and configuring QEMU for -all supported host platforms can be found in the qemu-tech.html file. Additional information can also be found online via the QEMU website: http://qemu-project.org/Hosts/Linux
qemu-doc.texi +0 -249
270 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 4/10 qemu-tech: move text from qemu-tech to tcg/README
In reply to Paolo Bonzini--- qemu-tech.texi | 12 ++---------- tcg/README | 5 +++++ 2 files changed, 7 insertions(+), 10 deletions(-)
qemu-tech.texi +2 -10
@@ -287,16 +287,8 @@ are very complicated and highly CPU dependent. QEMU uses some tricks which make it relatively easily portable and simple while achieving good performances. -After the release of version 0.9.1, QEMU switched to a new method of -generating code, Tiny Code Generator or TCG. TCG relaxes the -dependency on the exact version of the compiler used. The basic idea -is to split every target instruction into a couple of RISC-like TCG -ops (see @code{target-i386/translate.c}). Some optimizations can be -performed at this stage, including liveness analysis and trivial -constant expression evaluation. TCG ops are then implemented in the -host CPU back end, also known as TCG target (see -@code{tcg/i386/tcg-target.inc.c}). For more information, please take a -look at @code{tcg/README}. +QEMU's dynamic translation backend is called TCG, for "Tiny Code +Generator". For more information, please take a look at @code{tcg/README}. @node Condition code optimisations @section Condition code optimisations
tcg/README +5 -0
@@ -8,6 +8,11 @@ in the QOP code generator written by Paul Brook. 2) Definitions +TCG receives RISC-like "TCG ops" and performs some optimizations on them, +including liveness analysis and trivial constant expression +evaluation. TCG ops are then implemented in the host CPU back end, +also known as the TCG "target". + The TCG "target" is the architecture for which we generate the code. It is of course not the same as the "target" of QEMU which is the emulated architecture. As TCG started as a generic C backend used
Signature · 1 line
2.7.4
PATCH 5/10 qemu-tech: document lazy condition code evaluation in cpu.h
In reply to Paolo BonziniUnlike the other sections, they are pretty specific to a particular CPU.
--- qemu-tech.texi | 25 ------------------------- target-cris/cpu.h | 7 +++++++ target-i386/cpu.h | 7 +++++++ target-m68k/cpu.h | 8 ++++++++ target-sparc/cpu.h | 5 +++++ 5 files changed, 27 insertions(+), 25 deletions(-)
qemu-tech.texi +0 -25
@@ -214,7 +214,6 @@ SH4 @menu * QEMU compared to other emulators:: * Portable dynamic translation:: -* Condition code optimisations:: * CPU state optimisations:: * Translation cache:: * Direct block chaining::
@@ -290,30 +289,6 @@ performances. QEMU's dynamic translation backend is called TCG, for "Tiny Code Generator". For more information, please take a look at @code{tcg/README}. -@node Condition code optimisations -@section Condition code optimisations - -Lazy evaluation of CPU condition codes (@code{EFLAGS} register on x86) -is important for CPUs where every instruction sets the condition -codes. It tends to be less important on conventional RISC systems -where condition codes are only updated when explicitly requested. On -Sparc64, costly update of both 32 and 64 bit condition codes can be -avoided with lazy evaluation. - -Instead of computing the condition codes after each x86 instruction, -QEMU just stores one operand (called @code{CC_SRC}), the result -(called @code{CC_DST}) and the type of operation (called -@code{CC_OP}). When the condition codes are needed, the condition -codes can be calculated using this information. In addition, an -optimized calculation can be performed for some instruction types like -conditional branches. - -@code{CC_OP} is almost never explicitly set in the generated code -because it is known at translation time. - -The lazy condition code evaluation is used on x86, m68k, cris and -Sparc. ARM uses a simplified variant for the N and Z flags. - @node CPU state optimisations @section CPU state optimisations
target-cris/cpu.h +7 -0
@@ -223,6 +223,13 @@ int cpu_cris_signal_handler(int host_signum, void *pinfo,void cris_initialize_tcg (void );void cris_initialize_crisv10_tcg (void ); +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ enum {CC_OP_DYNAMIC ,/* Use env->cc_op */ CC_OP_FLAGS ,
target-i386/cpu.h +7 -0
@@ -698,6 +698,13 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];/* Use a clearer name for this. */ #define CPU_INTERRUPT_INIT CPU_INTERRUPT_RESET +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ typedef enum { CC_OP_DYNAMIC, /* must use dynamic code to get cc_op */ CC_OP_EFLAGS, /* all cc are explicitly computed, CC_SRC = flags */
target-m68k/cpu.h +8 -0
@@ -154,6 +154,14 @@ int cpu_m68k_signal_handler(int host_signum, void *pinfo, void *puc);void cpu_m68k_flush_flags (CPUM68KState *,int ); + +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ enum {CC_OP_DYNAMIC ,/* Use env->cc_op */ CC_OP_FLAGS ,/* CC_DEST = CVZN, CC_SRC = unused */
target-sparc/cpu.h +5 -0
@@ -102,6 +102,11 @@#define CC_DST (env->cc_dst)#define CC_OP (env->cc_op) +/* Even though lazy evaluation of CPU condition codes tends to be less +* important on RISC systems where condition codes are only updated +* when explicitly requested, SPARC uses it to update 32-bit and 64-bit +* condition codes. +*/ enum {CC_OP_DYNAMIC ,/* must use dynamic code to get cc_op */ CC_OP_FLAGS ,/* all cc are back in status register */
Signature · 1 line
2.7.4
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h
Quoted 10 lines · Paolo Bonzini
Unlike the other sections, they are pretty specific to a particular CPU.
Signed-off-by Paolo Bonzini <[email protected]>--- qemu-tech.texi | 25 ------------------------- target-cris/cpu.h | 7 +++++++ target-i386/cpu.h | 7 +++++++ target-m68k/cpu.h | 8 ++++++++ target-sparc/cpu.h | 5 +++++ 5 files changed, 27 insertions(+), 25 deletions(-)
(snip)
Quoted 5 lines
target-cris/cpu.h +0
-0
target-cris/cpu.h int cpu_cris_signal_handler(int host_signum, void *pinfo, · line 232
Quoted 10 lines
target-cris/cpu.h +7
-0@@ -223,6 +223,13 @@ int cpu_cris_signal_handler(int host_signum, void *pinfo,void cris_initialize_tcg (void );void cris_initialize_crisv10_tcg (void ); +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/
This text doesn't seem to be cris-specific, e.g.:
- "each x86 instruction"
- CC_SRC (git grep CC_SRC here doesn't return anything)
- CC_DST (ditto)
Quoted 27 lines
target-cris/cpu.h +0
-0enum {CC_OP_DYNAMIC ,/* Use env->cc_op */ CC_OP_FLAGS ,target-i386/cpu.h +7
-0@@ -698,6 +698,13 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];/* Use a clearer name for this. */ #define CPU_INTERRUPT_INIT CPU_INTERRUPT_RESET +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ typedef enum { CC_OP_DYNAMIC, /* must use dynamic code to get cc_op */ CC_OP_EFLAGS, /* all cc are explicitly computed, CC_SRC = flags */target-m68k/cpu.h +0
-0@@ -154,6 +154,14 @@ int cpu_m68k_signal_handler(int host_signum, void *pinfo, void *puc);
target-m68k/cpu.h int cpu_m68k_signal_handler(int host_signum, void *pinfo, · line 164
Quoted 10 lines
target-m68k/cpu.h +8
-0void cpu_m68k_flush_flags (CPUM68KState *,int ); + +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/
Same as above:
- "each x86 instruction"
- no CC_DST
Emilio
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h
Quoted 20 lines · Emilio G. Cota
Quoted 10 lines · Paolo Bonzini
Unlike the other sections, they are pretty specific to a particular CPU.
Signed-off-by Paolo Bonzini <[email protected]>--- qemu-tech.texi | 25 ------------------------- target-cris/cpu.h | 7 +++++++ target-i386/cpu.h | 7 +++++++ target-m68k/cpu.h | 8 ++++++++ target-sparc/cpu.h | 5 +++++ 5 files changed, 27 insertions(+), 25 deletions(-)(snip)
Quoted 8 lines
target-cris/cpu.h +0
-0@@ -223,6 +223,13 @@ int cpu_cris_signal_handler(int host_signum, void *pinfo,void cris_initialize_tcg (void );void cris_initialize_crisv10_tcg (void );
Quoted 12 lines
target-cris/cpu.h int cpu_cris_signal_handler(int host_signum, void *pinfo, · line 232
Quoted 7 lines
target-cris/cpu.h +7
-0+/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ This text doesn't seem to be cris-specific, e.g.:
- "each x86 instruction"
-CC_SRC(git grepCC_SRChere doesn't return anything)
-CC_DST(ditto)
Yeah, it's cc_src and cc_dest. The uppercase is a relic of dyngen (pre-TCG). Same for m68k.
Paolo
Quoted 45 lines
Quoted 28 lines
target-cris/cpu.h +0
-0enum {CC_OP_DYNAMIC ,/* Use env->cc_op */ CC_OP_FLAGS ,target-i386/cpu.h +7
-0@@ -698,6 +698,13 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];/* Use a clearer name for this. */ #define CPU_INTERRUPT_INIT CPU_INTERRUPT_RESET +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ typedef enum { CC_OP_DYNAMIC, /* must use dynamic code to get cc_op */ CC_OP_EFLAGS, /* all cc are explicitly computed, CC_SRC = flags */target-m68k/cpu.h +0
-0@@ -154,6 +154,14 @@ int cpu_m68k_signal_handler(int host_signum, void *pinfo, void *puc);target-m68k/cpu.h int cpu_m68k_signal_handler(int host_signum, void *pinfo, · line 164
Quoted 10 lines
target-m68k/cpu.h +8
-0void cpu_m68k_flush_flags (CPUM68KState *,int ); + +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores one operand (called CC_SRC), the result +* (called CC_DST) and the type of operation (called CC_OP). When the +* condition codes are needed, the condition codes can be calculated +* using this information. Condition codes are not generated if they +* are only needed for conditional branches. +*/ Same as above:
- "each x86 instruction"
- noCC_DSTEmilio
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h
In reply to Paolo BonziniQuoted 10 lines · Paolo Bonzini
Unlike the other sections, they are pretty specific to a particular CPU.
Signed-off-by Paolo Bonzini <[email protected]>--- qemu-tech.texi | 25 ------------------------- target-cris/cpu.h | 7 +++++++ target-i386/cpu.h | 7 +++++++ target-m68k/cpu.h | 8 ++++++++ target-sparc/cpu.h | 5 +++++ 5 files changed, 27 insertions(+), 25 deletions(-)
target-s390x/ also seems to have the CC optimization...
thanks
-- PMM
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h
Quoted 12 lines · Peter Maydell
Quoted 10 lines · Paolo Bonzini
Unlike the other sections, they are pretty specific to a particular CPU.
Signed-off-by Paolo Bonzini <[email protected]>--- qemu-tech.texi | 25 ------------------------- target-cris/cpu.h | 7 +++++++ target-i386/cpu.h | 7 +++++++ target-m68k/cpu.h | 8 ++++++++ target-sparc/cpu.h | 5 +++++ 5 files changed, 27 insertions(+), 25 deletions(-)
Quoted 1 line
target-s390x/ also seems to have the CC optimization...
Indeed:
target-s390x/cpu.h +7 -0
@@ -671,6 +671,13 @@ ObjectClass *s390_cpu_class_by_name(const char *name);/* CC optimization */ +/* Instead of computing the condition codes after each x86 instruction, +* QEMU just stores the result (called CC_DST), the type of operation +* (called CC_OP) and whatever operands are needed (CC_SRC and possibly +* CC_VR). When the condition codes are needed, the condition codes can +* be calculated using this information. Condition codes are not generated +* if they are only needed for conditional branches. +*/ enum cc_op {CC_OP_CONST0 =0 ,/* CC is 0 */ CC_OP_CONST1 ,/* CC is 1 */
Paolo
PATCH 6/10 qemu-tech: move user mode emulation features from qemu-tech
In reply to Paolo BonziniThese are interesting for users too, since nowadays most qemu-user users are going to be somewhat technical rather than just people that want to run Wine. Some detail is lost, on the other hand some of the information I removed (e.g. basic block unchaining) was obsolete.
--- qemu-doc.texi | 34 ++++++++++++++++++++++++++++ qemu-tech.texi | 71 ---------------------------------------------------------- 2 files changed, 34 insertions(+), 71 deletions(-)
qemu-doc.texi +34 -0
@@ -2629,6 +2629,7 @@ so should only be used with trusted guest OS. @menu * Supported Operating Systems :: +* Features:: * Linux User space emulator:: * BSD User space emulator :: @end menu
@@ -2645,6 +2646,39 @@ Linux (referred as qemu-linux-user) BSD (referred as qemu-bsd-user) @end itemize +@node Features +@section Features + +QEMU user space emulation has the following notable features: + +@table @strong +@item System call translation: +QEMU includes a generic system call translator. This means that +the parameters of the system calls can be converted to fix +endianness and 32/64-bit mismatches between hosts and targets. +IOCTLs can be converted too. + +@item POSIX signal handling: +QEMU can redirect to the running program all signals coming from +the host (such as SIGALRM), as well as synthesize signals from +virtual CPU extensions (for example SIGFPE when the program +executes a division by zero). + +QEMU relies on the host kernel to emulate most signal system +calls, for example to emulate the signal mask. On Linux, QEMU +supports both normal and real-time signals. + +@item Threading: +On Linux, QEMU can emulate the @code{clone} and create a real host +thread (with a separate virtual CPU) for each emulated thread. +Note that not all targets currently emulate atomic operations correctly. +x86 and ARM use a global lock in order to preserve their semantics. +@end table + +QEMU was conceived so that ultimately it can emulate itself. Although +it is not very useful, it is an important test to show the power of the +emulator. + @node Linux User space emulator @section Linux User space emulator
qemu-tech.texi +0 -71
83 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [Qemu-devel] [PATCH 06/10] qemu-tech: move user mode emulation features from qemu-tech
Quoted 8 lines · Paolo Bonzini
These are interesting for users too, since nowadays most qemu-user users are going to be somewhat technical rather than just people that want to run Wine. Some detail is lost, on the other hand some of the information I removed (e.g. basic block unchaining) was obsolete.
Signed-off-by Paolo Bonzini <[email protected]>---
[...]
Quoted 2 lines
+@item Threading:
+On Linux, QEMU can emulate the @code{clone} and create a real host
s/@code{clone}/@code{clone} syscall/ ?
Thanks for reworking the documentation!
Regards,
Jonathan Neuschäfer
Re: [Qemu-devel] [PATCH 06/10] qemu-tech: move user mode emulation features from qemu-tech
Quoted 7 lines · Jonathan Neuschäfer
Quoted 6 lines · Paolo Bonzini
These are interesting for users too, since nowadays most qemu-user users are going to be somewhat technical rather than just people that want to run Wine. Some detail is lost, on the other hand some of the information I removed (e.g. basic block unchaining) was obsolete.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Paolo Bonzini <[email protected]>---
[...]
Quoted 2 lines
+@item Threading:
+On Linux, QEMU can emulate the @code{clone} and create a real hosts/@code{clone}/@code{clone} syscall/ ?
Indeed, thanks!
Paolo
Quoted 6 lines
Thanks for reworking the documentation!
Regards,
Jonathan Neuschäfer
PATCH 7/10 qemu-tech: move TCG test documentation to tests/tcg/README
In reply to Paolo Bonzini--- qemu-tech.texi | 35 -------------------------- tests/tcg/README | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 35 deletions(-) create mode 100644 tests/tcg/README
qemu-tech.texi +0 -35
@@ -31,7 +31,6 @@ @menu * Introduction:: * QEMU Internals:: -* Regression Tests:: @end menu @end ifnottex
@@ -464,38 +463,4 @@ QEMU-SystemC, a hardware co-simulator. @end table -@node Regression Tests -@chapter Regression Tests - -In the directory @file{tests/}, various interesting testing programs -are available. They are used for regression testing. - -@menu -* test-i386:: -* linux-test:: -@end menu - -@node test-i386 -@section @file{test-i386} - -This program executes most of the 16 bit and 32 bit x86 instructions and -generates a text output. It can be compared with the output obtained with -a real CPU or another emulator. The target @code{make test} runs this -program and a @code{diff} on the generated output. - -The Linux system call @code{modify_ldt()} is used to create x86 selectors -to test some 16 bit addressing and 32 bit with segmentation cases. - -The Linux system call @code{vm86()} is used to test vm86 emulation. - -Various exceptions are raised to test most of the x86 user space -exception reporting. - -@node linux-test -@section @file{linux-test} - -This program tests various Linux system calls. It is used to verify -that the system call parameters are correctly converted between target -and host CPUs. - @bye
tests/tcg/README new file +80 -0
80 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 8/10 qemu-tech: reorganize content
In reply to Paolo BonziniMake the structure more flat, place comparison last, rename "Introduction" to "CPU emulation".
--- qemu-tech.texi | 171 +++++++++++++++++++++++++-------------------------------- 1 file changed, 74 insertions(+), 97 deletions(-)
qemu-tech.texi +74 -97
@@ -29,27 +29,29 @@ @top @menu -* Introduction:: -* QEMU Internals:: +* CPU emulation:: +* Translator Internals:: +* Device emulation:: +* QEMU compared to other emulators:: +* Bibliography:: @end menu @end ifnottex @contents -@node Introduction -@chapter Introduction +@node CPU emulation +@chapter CPU emulation @menu -* intro_x86_emulation:: x86 and x86-64 emulation -* intro_arm_emulation:: ARM emulation -* intro_mips_emulation:: MIPS emulation -* intro_ppc_emulation:: PowerPC emulation -* intro_sparc_emulation:: Sparc32 and Sparc64 emulation -* intro_xtensa_emulation:: Xtensa emulation -* intro_other_emulation:: Other CPU emulation +* x86:: x86 and x86-64 emulation +* ARM:: ARM emulation +* MIPS:: MIPS emulation +* PPC:: PowerPC emulation +* SPARC:: Sparc32 and Sparc64 emulation +* Xtensa:: Xtensa emulation @end menu -@node intro_x86_emulation +@node x86 @section x86 and x86-64 emulation QEMU x86 target features:
@@ -84,7 +86,7 @@ normal use. @end itemize -@node intro_arm_emulation +@node ARM @section ARM emulation @itemize
@@ -97,7 +99,7 @@ normal use. @end itemize -@node intro_mips_emulation +@node MIPS @section MIPS emulation @itemize
@@ -124,7 +126,7 @@ Current QEMU limitations: @end itemize -@node intro_ppc_emulation +@node PPC @section PowerPC emulation @itemize
@@ -136,7 +138,7 @@ FPU and MMU. @end itemize -@node intro_sparc_emulation +@node SPARC @section Sparc32 and Sparc64 emulation @itemize
@@ -164,7 +166,7 @@ Current QEMU limitations: @end itemize -@node intro_xtensa_emulation +@node Xtensa @section Xtensa emulation @itemize
@@ -189,94 +191,18 @@ may be created from overlay with minimal amount of hand-written code. @end itemize -@node intro_other_emulation -@section Other CPU emulation - -In addition to the above, QEMU supports emulation of other CPUs with -varying levels of success. These are: - -@itemize - -@item -Alpha -@item -CRIS -@item -M68k -@item -SH4 -@end itemize - -@node QEMU Internals -@chapter QEMU Internals +@node Translator Internals +@chapter Translator Internals @menu -* QEMU compared to other emulators:: -* Portable dynamic translation:: * CPU state optimisations:: * Translation cache:: * Direct block chaining:: * Self-modifying code and translated code invalidation:: * Exception support:: * MMU emulation:: -* Device emulation:: -* Bibliography:: @end menu -@node QEMU compared to other emulators -@section QEMU compared to other emulators - -Like bochs [1], QEMU emulates an x86 CPU. But QEMU is much faster than -bochs as it uses dynamic compilation. Bochs is closely tied to x86 PC -emulation while QEMU can emulate several processors. - -Like Valgrind [2], QEMU does user space emulation and dynamic -translation. Valgrind is mainly a memory debugger while QEMU has no -support for it (QEMU could be used to detect out of bound memory -accesses as Valgrind, but it has no support to track uninitialised data -as Valgrind does). The Valgrind dynamic translator generates better code -than QEMU (in particular it does register allocation) but it is closely -tied to an x86 host and target and has no support for precise exceptions -and system emulation. - -EM86 [3] is the closest project to user space QEMU (and QEMU still uses -some of its code, in particular the ELF file loader). EM86 was limited -to an alpha host and used a proprietary and slow interpreter (the -interpreter part of the FX!32 Digital Win32 code translator [4]). - -TWIN from Willows Software was a Windows API emulator like Wine. It is less -accurate than Wine but includes a protected mode x86 interpreter to launch -x86 Windows executables. Such an approach has greater potential because most -of the Windows API is executed natively but it is far more difficult to -develop because all the data structures and function parameters exchanged -between the API and the x86 code must be converted. - -User mode Linux [5] was the only solution before QEMU to launch a -Linux kernel as a process while not needing any host kernel -patches. However, user mode Linux requires heavy kernel patches while -QEMU accepts unpatched Linux kernels. The price to pay is that QEMU is -slower. - -The Plex86 [6] PC virtualizer is done in the same spirit as the now -obsolete qemu-fast system emulator. It requires a patched Linux kernel -to work (you cannot launch the same kernel on your PC), but the -patches are really small. As it is a PC virtualizer (no emulation is -done except for some privileged instructions), it has the potential of -being faster than QEMU. The downside is that a complicated (and -potentially unsafe) host kernel patch is needed. - -The commercial PC Virtualizers (VMWare [7], VirtualPC [8]) are faster -than QEMU (without virtualization), but they all need specific, proprietary -and potentially unsafe host drivers. Moreover, they are unable to -provide cycle exact simulation as an emulator can. - -VirtualBox [9], Xen [10] and KVM [11] are based on QEMU. QEMU-SystemC -[12] uses QEMU to simulate a system where some hardware devices are -developed in SystemC. - -@node Portable dynamic translation -@section Portable dynamic translation - QEMU is a dynamic translator. When it first encounters a piece of code, it converts it to the host instruction set. Usually dynamic translators are very complicated and highly CPU dependent. QEMU uses some tricks
@@ -381,7 +307,7 @@ When MMU mappings change, only the chaining of the basic blocks is reset (i.e. a basic block can no longer jump directly to another one). @node Device emulation -@section Device emulation +@chapter Device emulation Systems emulated by QEMU are organized by boards. At initialization phase, each board instantiates a number of CPUs, devices, RAM and
@@ -407,8 +333,59 @@ Usually the devices implement a reset method and register support for saving and loading of the device state. The devices can also use timers, especially together with the use of bottom halves (BHs). +@node QEMU compared to other emulators +@chapter QEMU compared to other emulators + +Like bochs [1], QEMU emulates an x86 CPU. But QEMU is much faster than +bochs as it uses dynamic compilation. Bochs is closely tied to x86 PC +emulation while QEMU can emulate several processors. + +Like Valgrind [2], QEMU does user space emulation and dynamic +translation. Valgrind is mainly a memory debugger while QEMU has no +support for it (QEMU could be used to detect out of bound memory +accesses as Valgrind, but it has no support to track uninitialised data +as Valgrind does). The Valgrind dynamic translator generates better code +than QEMU (in particular it does register allocation) but it is closely +tied to an x86 host and target and has no support for precise exceptions +and system emulation. + +EM86 [3] is the closest project to user space QEMU (and QEMU still uses +some of its code, in particular the ELF file loader). EM86 was limited +to an alpha host and used a proprietary and slow interpreter (the +interpreter part of the FX!32 Digital Win32 code translator [4]). + +TWIN from Willows Software was a Windows API emulator like Wine. It is less +accurate than Wine but includes a protected mode x86 interpreter to launch +x86 Windows executables. Such an approach has greater potential because most +of the Windows API is executed natively but it is far more difficult to +develop because all the data structures and function parameters exchanged +between the API and the x86 code must be converted. + +User mode Linux [5] was the only solution before QEMU to launch a +Linux kernel as a process while not needing any host kernel +patches. However, user mode Linux requires heavy kernel patches while +QEMU accepts unpatched Linux kernels. The price to pay is that QEMU is +slower. + +The Plex86 [6] PC virtualizer is done in the same spirit as the now +obsolete qemu-fast system emulator. It requires a patched Linux kernel +to work (you cannot launch the same kernel on your PC), but the +patches are really small. As it is a PC virtualizer (no emulation is +done except for some privileged instructions), it has the potential of +being faster than QEMU. The downside is that a complicated (and +potentially unsafe) host kernel patch is needed. + +The commercial PC Virtualizers (VMWare [7], VirtualPC [8]) are faster +than QEMU (without virtualization), but they all need specific, proprietary +and potentially unsafe host drivers. Moreover, they are unable to +provide cycle exact simulation as an emulator can. + +VirtualBox [9], Xen [10] and KVM [11] are based on QEMU. QEMU-SystemC +[12] uses QEMU to simulate a system where some hardware devices are +developed in SystemC. + @node Bibliography -@section Bibliography +@chapter Bibliography @table @asis
Signature · 1 line
2.7.4
PATCH 9/10 qemu-tech: rewrite some parts
In reply to Paolo BonziniDrop most the device emulation part and merge the rest into the description of the MMU. Make some bits more up-to-date.
--- qemu-tech.texi | 124 +++++++++++++++++++-------------------------------------- 1 file changed, 42 insertions(+), 82 deletions(-)
qemu-tech.texi +42 -82
@@ -31,7 +31,6 @@ @menu * CPU emulation:: * Translator Internals:: -* Device emulation:: * QEMU compared to other emulators:: * Bibliography:: @end menu
@@ -194,15 +193,6 @@ may be created from overlay with minimal amount of hand-written code. @node Translator Internals @chapter Translator Internals -@menu -* CPU state optimisations:: -* Translation cache:: -* Direct block chaining:: -* Self-modifying code and translated code invalidation:: -* Exception support:: -* MMU emulation:: -@end menu - QEMU is a dynamic translator. When it first encounters a piece of code, it converts it to the host instruction set. Usually dynamic translators are very complicated and highly CPU dependent. QEMU uses some tricks
@@ -212,33 +202,23 @@ performances. QEMU's dynamic translation backend is called TCG, for "Tiny Code Generator". For more information, please take a look at @code{tcg/README}. -@node CPU state optimisations -@section CPU state optimisations +Some notable features of QEMU's dynamic translator are: +@table @strong + +@item CPU state optimisations: The target CPUs have many internal states which change the way it evaluates instructions. In order to achieve a good speed, the translation phase considers that some state information of the virtual CPU cannot change in it. The state is recorded in the Translation Block (TB). If the state changes (e.g. privilege level), a new TB will be generated and the previous TB won't be used anymore until the state -matches the state recorded in the previous TB. For example, if the SS, +matches the state recorded in the previous TB. The same idea can be applied +to other aspects of the CPU state. For example, on x86, if the SS, DS and ES segments have a zero base, then the translator does not even generate an addition for the segment base. -[The FPU stack pointer register is not handled that way yet]. - -@node Translation cache -@section Translation cache - -A 32 MByte cache holds the most recently used translations. For -simplicity, it is completely flushed when it is full. A translation unit -contains just a single basic block (a block of x86 instructions -terminated by a jump or by a virtual CPU state change which the -translator cannot deduce statically). - -@node Direct block chaining -@section Direct block chaining - +@item Direct block chaining: After each translated basic block is executed, QEMU uses the simulated Program Counter (PC) and other cpu state information (such as the CS segment base value) to find the next basic block.
@@ -252,18 +232,17 @@ it easier to make the jump target modification atomic. On some host architectures (such as x86 or PowerPC), the @code{JUMP} opcode is directly patched so that the block chaining has no overhead. -@node Self-modifying code and translated code invalidation -@section Self-modifying code and translated code invalidation - +@item Self-modifying code and translated code invalidation: Self-modifying code is a special challenge in x86 emulation because no instruction cache invalidation is signaled by the application when code is modified. -When translated code is generated for a basic block, the corresponding -host page is write protected if it is not already read-only. Then, if -a write access is done to the page, Linux raises a SEGV signal. QEMU -then invalidates all the translated code in the page and enables write -accesses to the page. +User-mode emulation marks a host page as write-protected (if it is +not already read-only) every time translated code is generated for a +basic block. Then, if a write access is done to the page, Linux raises +a SEGV signal. QEMU then invalidates all the translated code in the page +and enables write accesses to the page. For system emulation, write +protection is achieved through the software MMU. Correct translated code invalidation is done efficiently by maintaining a linked list of every translated block contained in a given page. Other
@@ -275,63 +254,44 @@ necessary. However, QEMU still requires that the generated code always matches the target instructions in memory in order to handle exceptions correctly. -@node Exception support -@section Exception support - +@item Exception support: longjmp() is used when an exception such as division by zero is encountered. The host SIGSEGV and SIGBUS signal handlers are used to get invalid -memory accesses. The simulated program counter is found by -retranslating the corresponding basic block and by looking where the -host program counter was at the exception point. - -The virtual CPU cannot retrieve the exact @code{EFLAGS} register because -in some cases it is not computed because of condition code -optimisations. It is not a big concern because the emulated code can -still be restarted in any cases. - -@node MMU emulation -@section MMU emulation - -For system emulation QEMU supports a soft MMU. In that mode, the MMU +memory accesses. QEMU keeps a map that host program counter to +target program counter, and looks up where the exception happened +based on the host program counter at the exception point. + +On some targets, some bits of the virtual CPU's state are not flushed to the +memory until the end of the translation block. This is done for internal +emulation state that is rarely accessed directly by the program and/or changes +very often throughout the execution of a translation block---this includes +condition codes on x86, delay slots on SPARC, conditional execution on +ARM, and so on. This state is stored for each target instruction, and +looked up on exceptions. + +@item MMU emulation: +For system emulation QEMU uses a software MMU. In that mode, the MMU virtual to physical address translation is done at every memory -access. QEMU uses an address translation cache to speed up the -translation. +access. +QEMU uses an address translation cache (TLB) to speed up the translation. In order to avoid flushing the translated code each time the MMU -mappings change, QEMU uses a physically indexed translation cache. It +mappings change, all caches in QEMU are physically indexed. This means that each basic block is indexed with its physical address. -When MMU mappings change, only the chaining of the basic blocks is -reset (i.e. a basic block can no longer jump directly to another one). - -@node Device emulation -@chapter Device emulation - -Systems emulated by QEMU are organized by boards. At initialization -phase, each board instantiates a number of CPUs, devices, RAM and -ROM. Each device in turn can assign I/O ports or memory areas (for -MMIO) to its handlers. When the emulation starts, an access to the -ports or MMIO memory areas assigned to the device causes the -corresponding handler to be called. +In order to avoid invalidating the basic block chain when MMU mappings +change, chaining is only performed when the destination of the jump +shares a page with the basic block that is performing the jump. -RAM and ROM are handled more optimally, only the offset to the host -memory needs to be added to the guest address. - -The video RAM of VGA and other display cards is special: it can be -read or written directly like RAM, but write accesses cause the memory -to be marked with VGA_DIRTY flag as well. - -QEMU supports some device classes like serial and parallel ports, USB, -drives and network devices, by providing APIs for easier connection to -the generic, higher level implementations. The API hides the -implementation details from the devices, like native device use or -advanced block device formats like QCOW. - -Usually the devices implement a reset method and register support for -saving and loading of the device state. The devices can also use -timers, especially together with the use of bottom halves (BHs). +The MMU can also distinguish RAM and ROM memory areas from MMIO memory +areas. Access is faster for RAM and ROM because the translation cache also +hosts the offset between guest address and host memory. Accessing MMIO +memory areas instead calls out to C code for device emulation. +Finally, the MMU helps tracking dirty pages and pages pointed to by +translation blocks. +@end table @node QEMU compared to other emulators @chapter QEMU compared to other emulators
Signature · 1 line
2.7.4
Re: [Qemu-devel] [PATCH 09/10] qemu-tech: rewrite some parts
Quoted 4 lines · Paolo Bonzini
Drop most the device emulation part and merge the rest into the description of the MMU. Make some bits more up-to-date.
Signed-off-by Paolo Bonzini <[email protected]>
(snip)
Quoted 7 lines
The host SIGSEGV and SIGBUS signal handlers are used to get invalid
qemu-tech.texi +0
-6-memory accesses. The simulated program counter is found by -retranslating the corresponding basic block and by looking where the -host program counter was at the exception point. - -The virtual CPU cannot retrieve the exact @code{EFLAGS} register because -in some cases it is not computed because of condition code
qemu-tech.texi necessary. However, QEMU still requires that the generated code always · line 264
Quoted 10 lines
qemu-tech.texi +3
-7-optimisations. It is not a big concern because the emulated code can -still be restarted in any cases. - -@node MMU emulation -@section MMU emulation - -For system emulation QEMU supports a soft MMU. In that mode, the MMU +memory accesses. QEMU keeps a map that host program counter to +target program counter, and looks up where the exception happened +based on the host program counter at the exception point.
I had to read "keeps a map that host program to target program counter" several times; that "that" confused me.
Perhaps "keeps a map of host-to-target program counters" would be clearer?
qemu-tech.texi necessary. However, QEMU still requires that the generated code always · line 267
Quoted 2 lines
qemu-tech.texi +2
-0+On some targets, some bits of the virtual CPU's state are not flushed to the +memory until the end of the translation block. This is done for internal
"flushed to memory" sounds better to me than "flushed to the memory".
Emilio
Re: [Qemu-devel] [PATCH 09/10] qemu-tech: rewrite some parts
Quoted 10 lines · Emilio G. Cota
Quoted 5 lines
qemu-tech.texi necessary. However, QEMU still requires that the generated code always · line 264
Quoted 5 lines
qemu-tech.texi +3
-2- -For system emulation QEMU supports a soft MMU. In that mode, the MMU +memory accesses. QEMU keeps a map that host program counter to +target program counter, and looks up where the exception happened +based on the host program counter at the exception point.I had to read "keeps a map that host program to target program counter" several times; that "that" confused me.
Perhaps "keeps a map of host-to-target program counters" would be clearer?
It should have been a "from" (from host program counter to target program counter).
Paolo
PATCH 10/10 qemu-doc: merge qemu-tech and qemu-doc
In reply to Paolo BonziniMerge what is left of qemu-tech into the main manual.
--- .gitignore | 2 -- Makefile | 13 ++++++------- qemu-doc.texi | 3 +++ qemu-tech.texi | 56 ++++++++++++-------------------------------------------- qemu.nsi | 3 --- ui/cocoa.m | 9 --------- 6 files changed, 21 insertions(+), 65 deletions(-)
.gitignore +0 -2
@@ -39,9 +39,7 @@ /qmp-introspect.[ch] /qmp-marshal.c /qemu-doc.html -/qemu-tech.html /qemu-doc.info -/qemu-tech.info /qemu-img /qemu-nbd /qemu-options.def
Makefile +6 -7
@@ -93,7 +93,7 @@ LIBS+=-lz $(LIBS_TOOLS) HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) ifdef BUILD_DOCS -DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 +DOCS=qemu-doc.html qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8 ifdef CONFIG_VIRTFS DOCS+=fsdev/virtfs-proxy-helper.1 endif
@@ -398,7 +398,6 @@ distclean: clean rm -f qemu-doc.vr rm -f config.log rm -f linux-headers/asm - rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr for d in $(TARGET_DIRS); do \ rm -rf $$d || exit 1 ; \ done
@@ -434,7 +433,7 @@ endif install-doc: $(DOCS) $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)" - $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)" + $(INSTALL_DATA) qemu-doc.html "$(DESTDIR)$(qemu_docdir)" $(INSTALL_DATA) $(SRC_PATH)/docs/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)" ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
@@ -592,10 +591,10 @@ qemu-ga.8: qemu-ga.texi $(POD2MAN) --section=8 --center=" " --release=" " qemu-ga.pod > $@, \ " GEN $@") -dvi: qemu-doc.dvi qemu-tech.dvi -html: qemu-doc.html qemu-tech.html -info: qemu-doc.info qemu-tech.info -pdf: qemu-doc.pdf qemu-tech.pdf +dvi: qemu-doc.dvi +html: qemu-doc.html +info: qemu-doc.info +pdf: qemu-doc.pdf qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ qemu-img.texi qemu-nbd.texi qemu-options.texi qemu-option-trace.texi \
qemu-doc.texi +3 -0
@@ -35,6 +35,7 @@ * QEMU PC System emulator:: * QEMU System emulator for non PC targets:: * QEMU User space emulator:: +* Implementation notes:: * License:: * Index:: @end menu
@@ -2949,6 +2950,8 @@ Run the emulation in single step mode. @end table +@include qemu-tech.texi + @node License @appendix License
qemu-tech.texi +12 -44
124 lines not on this page · raw message
qemu.nsi +0 -3
@@ -171,10 +171,8 @@ SectionEnd Section "Documentation" SectionDoc SetOutPath "$INSTDIR" File "${BINDIR}\qemu-doc.html" - File "${BINDIR}\qemu-tech.html" CreateDirectory "$SMPROGRAMS\${PRODUCT}" CreateShortCut "$SMPROGRAMS\${PRODUCT}\User Documentation.lnk" "$INSTDIR\qemu-doc.html" "" "$INSTDIR\qemu-doc.html" 0 - CreateShortCut "$SMPROGRAMS\${PRODUCT}\Technical Documentation.lnk" "$INSTDIR\qemu-tech.html" "" "$INSTDIR\qemu-tech.html" 0 SectionEnd !endif
@@ -219,7 +217,6 @@ Section "Uninstall" Delete "$INSTDIR\qemu.exe" Delete "$INSTDIR\qemu-system-*.exe" Delete "$INSTDIR\qemu-doc.html" - Delete "$INSTDIR\qemu-tech.html" RMDir /r "$INSTDIR\keymaps" RMDir /r "$INSTDIR\share" ; Remove generated files
ui/cocoa.m +0 -9
@@ -814,7 +814,6 @@ QemuCocoaView *cocoaView; - (void)doToggleFullScreen:(id)sender; - (void)toggleFullScreen:(id)sender; - (void)showQEMUDoc:(id)sender; -- (void)showQEMUTec:(id)sender; - (void)zoomToFit:(id) sender; - (void)displayConsole:(id)sender; - (void)pauseQEMU:(id)sender;
@@ -998,13 +997,6 @@ QemuCocoaView *cocoaView; [self openDocumentation: @"qemu-doc.html"]; } -- (void)showQEMUTec:(id)sender -{ - COCOA_DEBUG("QemuCocoaAppController: showQEMUTec\n"); - - [self openDocumentation: @"qemu-tech.html"]; -} - /* Stretches video to fit host monitor size */ - (void)zoomToFit:(id) sender {
@@ -1335,7 +1327,6 @@ int main (int argc, const char * argv[]) { // Help menu menu = [[NSMenu alloc] initWithTitle:@"Help"]; [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"QEMU Documentation" action:@selector(showQEMUDoc:) keyEquivalent:@"?"] autorelease]]; // QEMU Help - [menu addItem: [[[NSMenuItem alloc] initWithTitle:@"QEMU Technology" action:@selector(showQEMUTec:) keyEquivalent:@""] autorelease]]; // QEMU Help menuItem = [[[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""] autorelease]; [menuItem setSubmenu:menu]; [[NSApp mainMenu] addItem:menuItem];
Signature · 1 line
2.7.4
Quoted 10 lines · Paolo Bonzini
qemu-tech is limited to TCG and large parts of it are obsolete or are just fine in qemu-doc. Split it into other sources of documentation, placing what's left in an appendix of qemu-doc.
Ultimately we should have a new internals manual built from docs/, and then the "Translator Internals" parts of qemu-tech could move to docs/ as well. The bits on limitation and features of CPU emulation should remain in qemu-doc. They are not entirely up-to-date, but I am not attempting to improve that yet---also because I could only really do that for x86.
Very happy with this update!
for the whole patchset.
Thanks,
Emilio