qemu-doc reorganization
cover qemu-doc reorganization
Prior to rST conversion, reorganize qemu-doc so that PC is handled like all other targets and there is a generic "system emulation" chapter.
This conflicts with the docs/system/cpu-models.texi conversion to rST, but I would like to have a review for the third and fourth patch while that conversion is finalized.
Paolo
Paolo Bonzini (4):
docs: system: remove target OS documentation
docs: system: split CPU models doc between MIPS and x86 parts
docs: split qemu-doc.texi in multiple files
qemu-doc: extract common system emulator documentation from the PC
section
Makefile | 11 +-
docs/system/cpu-models-mips.texi | 200 +++
.../cpu-models-x86.texi} | 232 ---
docs/system/gdb.texi | 71 +
docs/system/images.texi | 88 +
docs/system/invocation.texi | 240 +++
docs/system/ivshmem.texi | 60 +
docs/system/keys.texi | 53 +
docs/system/linuxboot.texi | 27 +
docs/system/monitor.texi | 35 +
docs/system/mux-chardev.texi | 51 +
docs/system/net.texi | 96 +
docs/system/qemu-cpu-models.texi | 28 +
docs/system/quickstart.texi | 13 +
docs/system/tls.texi | 329 ++++
docs/system/usb.texi | 115 ++
docs/system/vnc-security.texi | 196 ++
qemu-doc.texi | 1572 +----------------
18 files changed, 1668 insertions(+), 1749 deletions(-)
create mode 100644 docs/system/cpu-models-mips.texi
rename docs/{qemu-cpu-models.texi => system/cpu-models-x86.texi} (71%)
create mode 100644 docs/system/gdb.texi
create mode 100644 docs/system/images.texi
create mode 100644 docs/system/invocation.texi
create mode 100644 docs/system/ivshmem.texi
create mode 100644 docs/system/keys.texi
create mode 100644 docs/system/linuxboot.texi
create mode 100644 docs/system/monitor.texi
create mode 100644 docs/system/mux-chardev.texi
create mode 100644 docs/system/net.texi
create mode 100644 docs/system/qemu-cpu-models.texi
create mode 100644 docs/system/quickstart.texi
create mode 100644 docs/system/tls.texi
create mode 100644 docs/system/usb.texi
create mode 100644 docs/system/vnc-security.texiSignature · 1 line
2.21.1
PATCH 1/4 docs: system: remove target OS documentation
This section covers OSes up to Windows 2000, and as such it is mostly obsolete. Zap it.
--- qemu-doc.texi | 96 --------------------------------------------------- 1 file changed, 96 deletions(-)
qemu-doc.texi +0 -96
@@ -149,7 +149,6 @@ accelerator is required to use more than one host CPU for emulation. * vnc_security:: VNC security * network_tls:: TLS setup for network services * gdb_usage:: GDB usage -* pcsys_os_specific:: Target OS specific information @end menu @node pcsys_introduction
@@ -1606,101 +1605,6 @@ received: "OK" @end example @end table -@node pcsys_os_specific -@section Target OS specific information - -@subsection Linux - -To have access to SVGA graphic modes under X11, use the @code{vesa} or -the @code{cirrus} X11 driver. For optimal performances, use 16 bit -color depth in the guest and the host OS. - -When using a 2.6 guest Linux kernel, you should add the option -@code{clock=pit} on the kernel command line because the 2.6 Linux -kernels make very strict real time clock checks by default that QEMU -cannot simulate exactly. - -When using a 2.6 guest Linux kernel, verify that the 4G/4G patch is -not activated because QEMU is slower with this patch. The QEMU -Accelerator Module is also much slower in this case. Earlier Fedora -Core 3 Linux kernel (< 2.6.9-1.724_FC3) were known to incorporate this -patch by default. Newer kernels don't have it. - -@subsection Windows - -If you have a slow host, using Windows 95 is better as it gives the -best speed. Windows 2000 is also a good choice. - -@subsubsection SVGA graphic modes support - -QEMU emulates a Cirrus Logic GD5446 Video -card. All Windows versions starting from Windows 95 should recognize -and use this graphic card. For optimal performances, use 16 bit color -depth in the guest and the host OS. - -If you are using Windows XP as guest OS and if you want to use high -resolution modes which the Cirrus Logic BIOS does not support (i.e. >= -1280x1024x16), then you should use the VESA VBE virtual graphic card -(option @option{-std-vga}). - -@subsubsection CPU usage reduction - -Windows 9x does not correctly use the CPU HLT -instruction. The result is that it takes host CPU cycles even when -idle. You can install the utility from -@url{https://web.archive.org/web/20060212132151/http://www.user.cityline.ru/~maxamn/amnhltm.zip} -to solve this problem. Note that no such tool is needed for NT, 2000 or XP. - -@subsubsection Windows 2000 disk full problem - -Windows 2000 has a bug which gives a disk full problem during its -installation. When installing it, use the @option{-win2k-hack} QEMU -option to enable a specific workaround. After Windows 2000 is -installed, you no longer need this option (this option slows down the -IDE transfers). - -@subsubsection Windows 2000 shutdown - -Windows 2000 cannot automatically shutdown in QEMU although Windows 98 -can. It comes from the fact that Windows 2000 does not automatically -use the APM driver provided by the BIOS. - -In order to correct that, do the following (thanks to Struan -Bartlett): go to the Control Panel => Add/Remove Hardware & Next => -Add/Troubleshoot a device => Add a new device & Next => No, select the -hardware from a list & Next => NT Apm/Legacy Support & Next => Next -(again) a few times. Now the driver is installed and Windows 2000 now -correctly instructs QEMU to shutdown at the appropriate moment. - -@subsubsection Share a directory between Unix and Windows - -See @ref{sec_invocation} about the help of the option -@option{'-netdev user,smb=...'}. - -@subsubsection Windows XP security problem - -Some releases of Windows XP install correctly but give a security -error when booting: -@example -A problem is preventing Windows from accurately checking the -license for this computer. Error code: 0x800703e6. -@end example - -The workaround is to install a service pack for XP after a boot in safe -mode. Then reboot, and the problem should go away. Since there is no -network while in safe mode, its recommended to download the full -installation of SP1 or SP2 and transfer that via an ISO or using the -vvfat block device ("-hdb fat:directory_which_holds_the_SP"). - -@subsection MS-DOS and FreeDOS - -@subsubsection CPU usage reduction - -DOS does not correctly use the CPU HLT instruction. The result is that -it takes host CPU cycles even when idle. You can install the utility from -@url{https://web.archive.org/web/20051222085335/http://www.vmware.com/software/dosidle210.zip} -to solve this problem. - @node QEMU System emulator for non PC targets @chapter QEMU System emulator for non PC targets
Signature · 1 line
2.21.1
Re: [PATCH 1/4] docs: system: remove target OS documentation
Quoted 6 lines · Paolo Bonzini
This section covers OSes up to Windows 2000, and as such it is mostly obsolete. Zap it.
Signed-off-by Paolo Bonzini <[email protected]>---
thanks
-- PMM
PATCH 2/4 docs: system: split CPU models doc between MIPS and x86 parts
In reply to Paolo BonziniThe MIPS CPU models end up in the middle of the PC documentation. Move them to a separate file so that they can be placed in the right section.
The man page still includes both x86 and MIPS content.
---
Makefile | 11 +-
docs/system/cpu-models-mips.texi | 200 +++++++++++++++
.../cpu-models-x86.texi} | 232 ------------------
docs/system/qemu-cpu-models.texi | 28 +++
qemu-doc.texi | 8 +-
5 files changed, 238 insertions(+), 241 deletions(-)
create mode 100644 docs/system/cpu-models-mips.texi
rename docs/{qemu-cpu-models.texi => system/cpu-models-x86.texi} (71%)
create mode 100644 docs/system/qemu-cpu-models.texiMakefile +6 -5
@@ -354,7 +354,7 @@ endif DOCS+=$(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 DOCS+=docs/interop/qemu-qmp-ref.html docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7 DOCS+=docs/interop/qemu-ga-ref.html docs/interop/qemu-ga-ref.txt docs/interop/qemu-ga-ref.7 -DOCS+=docs/qemu-cpu-models.7 +DOCS+=docs/system/qemu-cpu-models.7 DOCS+=$(MANUAL_BUILDDIR)/index.html ifdef CONFIG_VIRTFS DOCS+=$(MANUAL_BUILDDIR)/interop/virtfs-proxy-helper.1
@@ -780,7 +780,7 @@ distclean: clean rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html - rm -f docs/qemu-cpu-models.7 + rm -f docs/system/qemu-cpu-models.7 rm -rf .doctrees $(call clean-manual,devel) $(call clean-manual,interop)
@@ -857,7 +857,7 @@ ifdef CONFIG_POSIX $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man7" $(INSTALL_DATA) docs/interop/qemu-qmp-ref.7 "$(DESTDIR)$(mandir)/man7" $(INSTALL_DATA) $(MANUAL_BUILDDIR)/system/qemu-block-drivers.7 "$(DESTDIR)$(mandir)/man7" - $(INSTALL_DATA) docs/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7" + $(INSTALL_DATA) docs/system/qemu-cpu-models.7 "$(DESTDIR)$(mandir)/man7" ifeq ($(CONFIG_TOOLS),y) $(INSTALL_DATA) $(MANUAL_BUILDDIR)/interop/qemu-img.1 "$(DESTDIR)$(mandir)/man1" $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
@@ -1098,7 +1098,7 @@ docs/interop/qemu-ga-qapi.texi: qga/qapi-generated/qga-qapi-doc.texi qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi qemu.1: qemu-option-trace.texi -docs/qemu-cpu-models.7: docs/qemu-cpu-models.texi +docs/system/qemu-cpu-models.7: docs/system/qemu-cpu-models.texi docs/system/cpu-models-x86.texi docs/system/cpu-models-mips.texi html: qemu-doc.html docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html sphinxdocs info: qemu-doc.info docs/interop/qemu-qmp-ref.info docs/interop/qemu-ga-ref.info
@@ -1110,7 +1110,8 @@ qemu-doc.html qemu-doc.info qemu-doc.pdf qemu-doc.txt: \ qemu-tech.texi qemu-option-trace.texi \ qemu-deprecated.texi qemu-monitor.texi \ qemu-monitor-info.texi \ - docs/qemu-cpu-models.texi docs/security.texi + docs/system/cpu-models-x86.texi docs/system/cpu-models-mips.texi \ + docs/security.texi docs/interop/qemu-ga-ref.dvi docs/interop/qemu-ga-ref.html \ docs/interop/qemu-ga-ref.info docs/interop/qemu-ga-ref.pdf \
docs/system/cpu-models-mips.texi new file +200 -0
200 lines not on this page · raw message
docs/system/cpu-models-x86.texi renamed from docs/qemu-cpu-models.texi +0 -232
244 lines not on this page · raw message
docs/system/qemu-cpu-models.texi new file +28 -0
@@ -0,0 +1,28 @@ +@c man begin SYNOPSIS +QEMU / KVM CPU model configuration +@c man end + +@set qemu_system_x86 qemu-system-x86_64 + +@c man begin DESCRIPTION + +@include cpu-models-x86.texi +@include cpu-models-mips.texi + +@c man end + +@ignore + +@setfilename qemu-cpu-models +@settitle QEMU / KVM CPU model configuration + +@c man begin SEEALSO +The HTML documentation of QEMU for more precise information and Linux +user mode emulator invocation. +@c man end + +@c man begin AUTHOR +Daniel P. Berrange +@c man end + +@end ignore
qemu-doc.texi +4 -4
@@ -615,10 +615,7 @@ The monitor understands integers expressions for every integer argument. You can use register names to get the value of specifics CPU registers by prefixing them with @emph{$}. -@node cpu_models -@section CPU models - -@include docs/qemu-cpu-models.texi +@include docs/system/cpu-models-x86.texi @node disk_images @section Disk Images
@@ -1865,6 +1862,7 @@ Set the emulated machine type. The default is sun4u. @cindex system emulation (MIPS) @menu +* recommendations_cpu_models_MIPS:: Supported CPU model configurations on MIPS hosts * nanoMIPS System emulator :: @end menu
@@ -1981,6 +1979,8 @@ PC style serial port MIPSnet network emulation @end itemize +@include docs/system/cpu-models-mips.texi + @node nanoMIPS System emulator @subsection nanoMIPS System emulator @cindex system emulation (nanoMIPS)
Signature · 1 line
2.21.1
PATCH 3/4 docs: split qemu-doc.texi in multiple files
In reply to Paolo BonziniIn order to facilitate the reorganization of qemu-doc.texi content, as well as the conversion to rST/Sphinx, split it in multiple .texi files that are included from docs/system.
--- docs/system/gdb.texi | 71 ++ docs/system/images.texi | 88 +++ docs/system/invocation.texi | 240 ++++++ docs/system/ivshmem.texi | 60 ++ docs/system/keys.texi | 53 ++ docs/system/linuxboot.texi | 27 + docs/system/monitor.texi | 35 + docs/system/mux-chardev.texi | 51 ++ docs/system/net.texi | 96 +++ docs/system/quickstart.texi | 13 + docs/system/tls.texi | 329 ++++++++ docs/system/usb.texi | 115 +++ docs/system/vnc-security.texi | 196 +++++ qemu-doc.texi | 1390 +-------------------------------- 14 files changed, 1387 insertions(+), 1377 deletions(-) create mode 100644 docs/system/gdb.texi create mode 100644 docs/system/images.texi create mode 100644 docs/system/invocation.texi create mode 100644 docs/system/ivshmem.texi create mode 100644 docs/system/keys.texi create mode 100644 docs/system/linuxboot.texi create mode 100644 docs/system/monitor.texi create mode 100644 docs/system/mux-chardev.texi create mode 100644 docs/system/net.texi create mode 100644 docs/system/quickstart.texi create mode 100644 docs/system/tls.texi create mode 100644 docs/system/usb.texi create mode 100644 docs/system/vnc-security.texi
docs/system/gdb.texi new file +71 -0
@@ -0,0 +1,71 @@ +@node gdb_usage +@section GDB usage + +QEMU has a primitive support to work with gdb, so that you can do +'Ctrl-C' while the virtual machine is running and inspect its state. + +In order to use gdb, launch QEMU with the '-s' option. It will wait for a +gdb connection: +@example +@value{qemu_system} -s -kernel bzImage -hda rootdisk.img -append "root=/dev/hda" +Connected to host network interface: tun0 +Waiting gdb connection on port 1234 +@end example + +Then launch gdb on the 'vmlinux' executable: +@example +> gdb vmlinux +@end example + +In gdb, connect to QEMU: +@example +(gdb) target remote localhost:1234 +@end example + +Then you can use gdb normally. For example, type 'c' to launch the kernel: +@example +(gdb) c +@end example + +Here are some useful tips in order to use gdb on system code: + +@enumerate +@item +Use @code{info reg} to display all the CPU registers. +@item +Use @code{x/10i $eip} to display the code at the PC position. +@item +Use @code{set architecture i8086} to dump 16 bit code. Then use +@code{x/10i $cs*16+$eip} to dump the code at the PC position. +@end enumerate + +Advanced debugging options: + +The default single stepping behavior is step with the IRQs and timer service routines off. It is set this way because when gdb executes a single step it expects to advance beyond the current instruction. With the IRQs and timer service routines on, a single step might jump into the one of the interrupt or exception vectors instead of executing the current instruction. This means you may hit the same breakpoint a number of times before executing the instruction gdb wants to have executed. Because there are rare circumstances where you want to single step into an interrupt vector the behavior can be controlled from GDB. There are three commands you can query and set the single step behavior: +@table @code +@item maintenance packet qqemu.sstepbits + +This will display the MASK bits used to control the single stepping IE: +@example +(gdb) maintenance packet qqemu.sstepbits +sending: "qqemu.sstepbits" +received: "ENABLE=1,NOIRQ=2,NOTIMER=4" +@end example +@item maintenance packet qqemu.sstep + +This will display the current value of the mask used when single stepping IE: +@example +(gdb) maintenance packet qqemu.sstep +sending: "qqemu.sstep" +received: "0x7" +@end example +@item maintenance packet Qqemu.sstep=HEX_VALUE + +This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use: +@example +(gdb) maintenance packet Qqemu.sstep=0x5 +sending: "qemu.sstep=0x5" +received: "OK" +@end example +@end table +
docs/system/images.texi new file +88 -0
88 lines not on this page · raw message
docs/system/invocation.texi new file +240 -0
240 lines not on this page · raw message
docs/system/ivshmem.texi new file +60 -0
60 lines not on this page · raw message
docs/system/keys.texi new file +53 -0
53 lines not on this page · raw message
docs/system/linuxboot.texi new file +27 -0
@@ -0,0 +1,27 @@ +@node direct_linux_boot +@section Direct Linux Boot + +This section explains how to launch a Linux kernel inside QEMU without +having to make a full bootable image. It is very useful for fast Linux +kernel testing. + +The syntax is: +@example +@value{qemu_system} -kernel bzImage -hda rootdisk.img -append "root=/dev/hda" +@end example + +Use @option{-kernel} to provide the Linux kernel image and +@option{-append} to give the kernel command line arguments. The +@option{-initrd} option can be used to provide an INITRD image. + +If you do not need graphical output, you can disable it and redirect +the virtual serial port and the QEMU monitor to the console with the +@option{-nographic} option. The typical command line is: +@example +@value{qemu_system} -kernel bzImage -hda rootdisk.img \ + -append "root=/dev/hda console=ttyS0" -nographic +@end example + +Use @key{Ctrl-a c} to switch between the serial console and the +monitor (@pxref{pcsys_keys}). +
docs/system/monitor.texi new file +35 -0
@@ -0,0 +1,35 @@ +@node pcsys_monitor +@section QEMU Monitor +@cindex QEMU monitor + +The QEMU monitor is used to give complex commands to the QEMU +emulator. You can use it to: + +@itemize @minus + +@item +Remove or insert removable media images +(such as CD-ROM or floppies). + +@item +Freeze/unfreeze the Virtual Machine (VM) and save or restore its state +from a disk file. + +@item Inspect the VM state without an external debugger. + +@end itemize + +@subsection Commands + +The following commands are available: + +@include qemu-monitor.texi + +@include qemu-monitor-info.texi + +@subsection Integer expressions + +The monitor understands integers expressions for every integer +argument. You can use register names to get the value of specifics +CPU registers by prefixing them with @emph{$}. +
docs/system/mux-chardev.texi new file +51 -0
51 lines not on this page · raw message
docs/system/net.texi new file +96 -0
96 lines not on this page · raw message
docs/system/quickstart.texi new file +13 -0
@@ -0,0 +1,13 @@ +@node pcsys_quickstart +@section Quick Start +@cindex quick start + +Download and uncompress a hard disk image with Linux installed (e.g. +@file{linux.img}) and type: + +@example +@value{qemu_system} linux.img +@end example + +Linux should boot and give you a prompt. +
docs/system/tls.texi new file +329 -0
329 lines not on this page · raw message
docs/system/usb.texi new file +115 -0
115 lines not on this page · raw message
docs/system/vnc-security.texi new file +196 -0
196 lines not on this page · raw message
qemu-doc.texi +13 -1377
1,397 lines not on this page · raw message
Signature · 1 line
2.21.1
PATCH 4/4 qemu-doc: extract common system emulator documentation from the PC section
In reply to Paolo BonziniMove the section on PC peripherals together with other targets. While some x86-specific information remains in the main system emulation chapter, it can be tackled more easily a section at a time.
--- docs/system/quickstart.texi | 2 +- qemu-doc.texi | 104 +++++++++++++++++++----------------- 2 files changed, 57 insertions(+), 49 deletions(-)
docs/system/quickstart.texi +1 -1
@@ -2,7 +2,7 @@ @section Quick Start @cindex quick start -Download and uncompress a hard disk image with Linux installed (e.g. +Download and uncompress a PC hard disk image with Linux installed (e.g. @file{linux.img}) and type: @example
qemu-doc.texi +56 -48
140 lines not on this page · raw message
Signature · 1 line
2.21.1