]> git.proxmox.com Git - qemu.git/blame - qemu-doc.texi
Fix warning on WIN32
[qemu.git] / qemu-doc.texi
CommitLineData
386405f7 1\input texinfo @c -*- texinfo -*-
debc7065
FB
2@c %**start of header
3@setfilename qemu-doc.info
8f40c388 4@settitle QEMU Emulator User Documentation
debc7065
FB
5@exampleindent 0
6@paragraphindent 0
7@c %**end of header
386405f7 8
0806e3f6 9@iftex
386405f7
FB
10@titlepage
11@sp 7
8f40c388 12@center @titlefont{QEMU Emulator}
debc7065
FB
13@sp 1
14@center @titlefont{User Documentation}
386405f7
FB
15@sp 3
16@end titlepage
0806e3f6 17@end iftex
386405f7 18
debc7065
FB
19@ifnottex
20@node Top
21@top
22
23@menu
24* Introduction::
25* Installation::
26* QEMU PC System emulator::
27* QEMU System emulator for non PC targets::
83195237 28* QEMU User space emulator::
debc7065
FB
29* compilation:: Compilation from the sources
30* Index::
31@end menu
32@end ifnottex
33
34@contents
35
36@node Introduction
386405f7
FB
37@chapter Introduction
38
debc7065
FB
39@menu
40* intro_features:: Features
41@end menu
42
43@node intro_features
322d0c66 44@section Features
386405f7 45
1f673135
FB
46QEMU is a FAST! processor emulator using dynamic translation to
47achieve good emulation speed.
1eb20527
FB
48
49QEMU has two operating modes:
0806e3f6
FB
50
51@itemize @minus
52
5fafdf24 53@item
1f673135 54Full system emulation. In this mode, QEMU emulates a full system (for
3f9f3aa1
FB
55example a PC), including one or several processors and various
56peripherals. It can be used to launch different Operating Systems
57without rebooting the PC or to debug system code.
1eb20527 58
5fafdf24 59@item
83195237
FB
60User mode emulation. In this mode, QEMU can launch
61processes compiled for one CPU on another CPU. It can be used to
1f673135
FB
62launch the Wine Windows API emulator (@url{http://www.winehq.org}) or
63to ease cross-compilation and cross-debugging.
1eb20527
FB
64
65@end itemize
66
7c3fc84d 67QEMU can run without an host kernel driver and yet gives acceptable
5fafdf24 68performance.
322d0c66 69
52c00a5f
FB
70For system emulation, the following hardware targets are supported:
71@itemize
9d0a8e6f 72@item PC (x86 or x86_64 processor)
3f9f3aa1 73@item ISA PC (old style PC without PCI bus)
52c00a5f 74@item PREP (PowerPC processor)
d45952a0 75@item G3 Beige PowerMac (PowerPC processor)
9d0a8e6f 76@item Mac99 PowerMac (PowerPC processor, in progress)
ee76f82e 77@item Sun4m/Sun4c/Sun4d (32-bit Sparc processor)
c7ba218d 78@item Sun4u/Sun4v (64-bit Sparc processor, in progress)
d9aedc32 79@item Malta board (32-bit and 64-bit MIPS processors)
88cb0a02 80@item MIPS Magnum (64-bit MIPS processor)
9ee6e8bb
PB
81@item ARM Integrator/CP (ARM)
82@item ARM Versatile baseboard (ARM)
83@item ARM RealView Emulation baseboard (ARM)
ef4c3856 84@item Spitz, Akita, Borzoi, Terrier and Tosa PDAs (PXA270 processor)
9ee6e8bb
PB
85@item Luminary Micro LM3S811EVB (ARM Cortex-M3)
86@item Luminary Micro LM3S6965EVB (ARM Cortex-M3)
707e011b 87@item Freescale MCF5208EVB (ColdFire V2).
209a4e69 88@item Arnewsh MCF5206 evaluation board (ColdFire V2).
02645926 89@item Palm Tungsten|E PDA (OMAP310 processor)
c30bb264 90@item N800 and N810 tablets (OMAP2420 processor)
57cd6e97 91@item MusicPal (MV88W8618 ARM processor)
ef4c3856
AZ
92@item Gumstix "Connex" and "Verdex" motherboards (PXA255/270).
93@item Siemens SX1 smartphone (OMAP310 processor)
52c00a5f 94@end itemize
386405f7 95
d9aedc32 96For user emulation, x86, PowerPC, ARM, 32-bit MIPS, Sparc32/64 and ColdFire(m68k) CPUs are supported.
0806e3f6 97
debc7065 98@node Installation
5b9f457a
FB
99@chapter Installation
100
15a34c63
FB
101If you want to compile QEMU yourself, see @ref{compilation}.
102
debc7065
FB
103@menu
104* install_linux:: Linux
105* install_windows:: Windows
106* install_mac:: Macintosh
107@end menu
108
109@node install_linux
1f673135
FB
110@section Linux
111
7c3fc84d
FB
112If a precompiled package is available for your distribution - you just
113have to install it. Otherwise, see @ref{compilation}.
5b9f457a 114
debc7065 115@node install_windows
1f673135 116@section Windows
8cd0ac2f 117
15a34c63 118Download the experimental binary installer at
debc7065 119@url{http://www.free.oszoo.org/@/download.html}.
d691f669 120
debc7065 121@node install_mac
1f673135 122@section Mac OS X
d691f669 123
15a34c63 124Download the experimental binary installer at
debc7065 125@url{http://www.free.oszoo.org/@/download.html}.
df0f11a0 126
debc7065 127@node QEMU PC System emulator
3f9f3aa1 128@chapter QEMU PC System emulator
1eb20527 129
debc7065
FB
130@menu
131* pcsys_introduction:: Introduction
132* pcsys_quickstart:: Quick Start
133* sec_invocation:: Invocation
134* pcsys_keys:: Keys
135* pcsys_monitor:: QEMU Monitor
136* disk_images:: Disk Images
137* pcsys_network:: Network emulation
138* direct_linux_boot:: Direct Linux Boot
139* pcsys_usb:: USB emulation
f858dcae 140* vnc_security:: VNC security
debc7065
FB
141* gdb_usage:: GDB usage
142* pcsys_os_specific:: Target OS specific information
143@end menu
144
145@node pcsys_introduction
0806e3f6
FB
146@section Introduction
147
148@c man begin DESCRIPTION
149
3f9f3aa1
FB
150The QEMU PC System emulator simulates the
151following peripherals:
0806e3f6
FB
152
153@itemize @minus
5fafdf24 154@item
15a34c63 155i440FX host PCI bridge and PIIX3 PCI to ISA bridge
0806e3f6 156@item
15a34c63
FB
157Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA
158extensions (hardware level, including all non standard modes).
0806e3f6
FB
159@item
160PS/2 mouse and keyboard
5fafdf24 161@item
15a34c63 1622 PCI IDE interfaces with hard disk and CD-ROM support
1f673135
FB
163@item
164Floppy disk
5fafdf24 165@item
c4a7060c 166PCI/ISA PCI network adapters
0806e3f6 167@item
05d5818c
FB
168Serial ports
169@item
c0fe3827
FB
170Creative SoundBlaster 16 sound card
171@item
172ENSONIQ AudioPCI ES1370 sound card
173@item
e5c9a13e
AZ
174Intel 82801AA AC97 Audio compatible sound card
175@item
c0fe3827 176Adlib(OPL2) - Yamaha YM3812 compatible chip
b389dbfb 177@item
26463dbc
AZ
178Gravis Ultrasound GF1 sound card
179@item
cc53d26d 180CS4231A compatible sound card
181@item
b389dbfb 182PCI UHCI USB controller and a virtual USB hub.
0806e3f6
FB
183@end itemize
184
3f9f3aa1
FB
185SMP is supported with up to 255 CPUs.
186
1d1f8c33 187Note that adlib, gus and cs4231a are only available when QEMU was
188configured with --audio-card-list option containing the name(s) of
e5178e8d 189required card(s).
c0fe3827 190
15a34c63
FB
191QEMU uses the PC BIOS from the Bochs project and the Plex86/Bochs LGPL
192VGA BIOS.
193
c0fe3827
FB
194QEMU uses YM3812 emulation by Tatsuyuki Satoh.
195
26463dbc
AZ
196QEMU uses GUS emulation(GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
197by Tibor "TS" Schütz.
423d65f4 198
cc53d26d 199CS4231A is the chip used in Windows Sound System and GUSMAX products
200
0806e3f6
FB
201@c man end
202
debc7065 203@node pcsys_quickstart
1eb20527
FB
204@section Quick Start
205
285dc330 206Download and uncompress the linux image (@file{linux.img}) and type:
0806e3f6
FB
207
208@example
285dc330 209qemu linux.img
0806e3f6
FB
210@end example
211
212Linux should boot and give you a prompt.
213
6cc721cf 214@node sec_invocation
ec410fc9
FB
215@section Invocation
216
217@example
0806e3f6 218@c man begin SYNOPSIS
89dfe898 219usage: qemu [options] [@var{disk_image}]
0806e3f6 220@c man end
ec410fc9
FB
221@end example
222
0806e3f6 223@c man begin OPTIONS
d2c639d6
BS
224@var{disk_image} is a raw hard disk image for IDE hard disk 0. Some
225targets do not need a disk image.
ec410fc9 226
5824d651 227@include qemu-options.texi
ec410fc9 228
3e11db9a
FB
229@c man end
230
debc7065 231@node pcsys_keys
3e11db9a
FB
232@section Keys
233
234@c man begin OPTIONS
235
a1b74fe8
FB
236During the graphical emulation, you can use the following keys:
237@table @key
f9859310 238@item Ctrl-Alt-f
a1b74fe8 239Toggle full screen
a0a821a4 240
f9859310 241@item Ctrl-Alt-n
a0a821a4
FB
242Switch to virtual console 'n'. Standard console mappings are:
243@table @emph
244@item 1
245Target system display
246@item 2
247Monitor
248@item 3
249Serial port
a1b74fe8
FB
250@end table
251
f9859310 252@item Ctrl-Alt
a0a821a4
FB
253Toggle mouse and keyboard grab.
254@end table
255
3e11db9a
FB
256In the virtual consoles, you can use @key{Ctrl-Up}, @key{Ctrl-Down},
257@key{Ctrl-PageUp} and @key{Ctrl-PageDown} to move in the back log.
258
a0a821a4
FB
259During emulation, if you are using the @option{-nographic} option, use
260@key{Ctrl-a h} to get terminal commands:
ec410fc9
FB
261
262@table @key
a1b74fe8 263@item Ctrl-a h
d2c639d6 264@item Ctrl-a ?
ec410fc9 265Print this help
3b46e624 266@item Ctrl-a x
366dfc52 267Exit emulator
3b46e624 268@item Ctrl-a s
1f47a922 269Save disk data back to file (if -snapshot)
20d8a3ed 270@item Ctrl-a t
d2c639d6 271Toggle console timestamps
a1b74fe8 272@item Ctrl-a b
1f673135 273Send break (magic sysrq in Linux)
a1b74fe8 274@item Ctrl-a c
1f673135 275Switch between console and monitor
a1b74fe8
FB
276@item Ctrl-a Ctrl-a
277Send Ctrl-a
ec410fc9 278@end table
0806e3f6
FB
279@c man end
280
281@ignore
282
1f673135
FB
283@c man begin SEEALSO
284The HTML documentation of QEMU for more precise information and Linux
285user mode emulator invocation.
286@c man end
287
288@c man begin AUTHOR
289Fabrice Bellard
290@c man end
291
292@end ignore
293
debc7065 294@node pcsys_monitor
1f673135
FB
295@section QEMU Monitor
296
297The QEMU monitor is used to give complex commands to the QEMU
298emulator. You can use it to:
299
300@itemize @minus
301
302@item
e598752a 303Remove or insert removable media images
89dfe898 304(such as CD-ROM or floppies).
1f673135 305
5fafdf24 306@item
1f673135
FB
307Freeze/unfreeze the Virtual Machine (VM) and save or restore its state
308from a disk file.
309
310@item Inspect the VM state without an external debugger.
311
312@end itemize
313
314@subsection Commands
315
316The following commands are available:
317
318@table @option
319
89dfe898 320@item help or ? [@var{cmd}]
1f673135
FB
321Show the help for all commands or just for command @var{cmd}.
322
3b46e624 323@item commit
89dfe898 324Commit changes to the disk images (if -snapshot is used).
1f673135 325
89dfe898
TS
326@item info @var{subcommand}
327Show various information about the system state.
1f673135
FB
328
329@table @option
d2c639d6
BS
330@item info version
331show the version of QEMU
1f673135 332@item info network
41d03949 333show the various VLANs and the associated devices
d2c639d6
BS
334@item info chardev
335show the character devices
1f673135
FB
336@item info block
337show the block devices
d2c639d6
BS
338@item info block
339show block device statistics
1f673135
FB
340@item info registers
341show the cpu registers
d2c639d6
BS
342@item info cpus
343show infos for each CPU
1f673135
FB
344@item info history
345show the command line history
d2c639d6
BS
346@item info irq
347show the interrupts statistics (if available)
348@item info pic
349show i8259 (PIC) state
b389dbfb 350@item info pci
d2c639d6
BS
351show emulated PCI device info
352@item info tlb
353show virtual to physical memory mappings (i386 only)
354@item info mem
355show the active virtual memory mappings (i386 only)
356@item info hpet
357show state of HPET (i386 only)
358@item info kqemu
359show KQEMU information
360@item info kvm
361show KVM information
b389dbfb
FB
362@item info usb
363show USB devices plugged on the virtual USB hub
364@item info usbhost
365show all USB host devices
d2c639d6
BS
366@item info profile
367show profiling information
a3c25997
FB
368@item info capture
369show information about active capturing
13a2e80f
FB
370@item info snapshots
371show list of VM snapshots
d2c639d6
BS
372@item info status
373show the current VM status (running|paused)
374@item info pcmcia
375show guest PCMCIA status
455204eb
TS
376@item info mice
377show which guest mouse is receiving events
d2c639d6
BS
378@item info vnc
379show the vnc server status
380@item info name
381show the current VM name
382@item info uuid
383show the current VM UUID
384@item info cpustats
385show CPU statistics
386@item info slirp
387show SLIRP statistics (if available)
388@item info migrate
389show migration status
390@item info balloon
391show balloon information
1f673135
FB
392@end table
393
394@item q or quit
395Quit the emulator.
396
89dfe898 397@item eject [-f] @var{device}
e598752a 398Eject a removable medium (use -f to force it).
1f673135 399
89dfe898 400@item change @var{device} @var{setting}
f858dcae 401
89dfe898 402Change the configuration of a device.
f858dcae
TS
403
404@table @option
d2c639d6 405@item change @var{diskdevice} @var{filename} [@var{format}]
f858dcae
TS
406Change the medium for a removable disk device to point to @var{filename}. eg
407
408@example
4bf27c24 409(qemu) change ide1-cd0 /path/to/some.iso
f858dcae
TS
410@end example
411
d2c639d6
BS
412@var{format} is optional.
413
89dfe898 414@item change vnc @var{display},@var{options}
f858dcae
TS
415Change the configuration of the VNC server. The valid syntax for @var{display}
416and @var{options} are described at @ref{sec_invocation}. eg
417
418@example
419(qemu) change vnc localhost:1
420@end example
421
2569da0c 422@item change vnc password [@var{password}]
f858dcae 423
2569da0c
AL
424Change the password associated with the VNC server. If the new password is not
425supplied, the monitor will prompt for it to be entered. VNC passwords are only
426significant up to 8 letters. eg
f858dcae
TS
427
428@example
429(qemu) change vnc password
430Password: ********
431@end example
432
433@end table
1f673135 434
76655d6d
AL
435@item acl @var{subcommand} @var{aclname} @var{match} @var{index}
436
437Manage access control lists for network services. There are currently
438two named access control lists, @var{vnc.x509dname} and @var{vnc.username}
439matching on the x509 client certificate distinguished name, and SASL
440username respectively.
441
442@table @option
443@item acl show <aclname>
444list all the match rules in the access control list, and the default
445policy
446@item acl policy <aclname> @code{allow|deny}
447set the default access control list policy, used in the event that
448none of the explicit rules match. The default policy at startup is
449always @code{deny}
450@item acl allow <aclname> <match> [<index>]
451add a match to the access control list, allowing access. The match will
452normally be an exact username or x509 distinguished name, but can
9e995645 453optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow
76655d6d
AL
454all users in the @code{EXAMPLE.COM} kerberos realm. The match will
455normally be appended to the end of the ACL, but can be inserted
456earlier in the list if the optional @code{index} parameter is supplied.
457@item acl deny <aclname> <match> [<index>]
458add a match to the access control list, denying access. The match will
459normally be an exact username or x509 distinguished name, but can
9e995645 460optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to allow
76655d6d
AL
461all users in the @code{EXAMPLE.COM} kerberos realm. The match will
462normally be appended to the end of the ACL, but can be inserted
463earlier in the list if the optional @code{index} parameter is supplied.
464@item acl remove <aclname> <match>
465remove the specified match rule from the access control list.
466@item acl reset <aclname>
467remove all matches from the access control list, and set the default
468policy back to @code{deny}.
469@end table
470
89dfe898 471@item screendump @var{filename}
1f673135
FB
472Save screen into PPM image @var{filename}.
473
d2c639d6
BS
474@item logfile @var{filename}
475Output logs to @var{filename}.
a3c25997 476
89dfe898 477@item log @var{item1}[,...]
1f673135
FB
478Activate logging of the specified items to @file{/tmp/qemu.log}.
479
89dfe898 480@item savevm [@var{tag}|@var{id}]
13a2e80f
FB
481Create a snapshot of the whole virtual machine. If @var{tag} is
482provided, it is used as human readable identifier. If there is already
483a snapshot with the same tag or ID, it is replaced. More info at
484@ref{vm_snapshots}.
1f673135 485
89dfe898 486@item loadvm @var{tag}|@var{id}
13a2e80f
FB
487Set the whole virtual machine to the snapshot identified by the tag
488@var{tag} or the unique snapshot ID @var{id}.
489
89dfe898 490@item delvm @var{tag}|@var{id}
13a2e80f 491Delete the snapshot identified by @var{tag} or @var{id}.
1f673135 492
1b530a6d
AJ
493@item singlestep [off]
494Run the emulation in single step mode.
495If called with option off, the emulation returns to normal mode.
496
1f673135
FB
497@item stop
498Stop emulation.
499
500@item c or cont
501Resume emulation.
502
89dfe898
TS
503@item gdbserver [@var{port}]
504Start gdbserver session (default @var{port}=1234)
1f673135 505
89dfe898 506@item x/fmt @var{addr}
1f673135
FB
507Virtual memory dump starting at @var{addr}.
508
89dfe898 509@item xp /@var{fmt} @var{addr}
1f673135
FB
510Physical memory dump starting at @var{addr}.
511
512@var{fmt} is a format which tells the command how to format the
513data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
514
515@table @var
5fafdf24 516@item count
1f673135
FB
517is the number of items to be dumped.
518
519@item format
4be456f1 520can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
1f673135
FB
521c (char) or i (asm instruction).
522
523@item size
52c00a5f
FB
524can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
525@code{h} or @code{w} can be specified with the @code{i} format to
526respectively select 16 or 32 bit code instruction size.
1f673135
FB
527
528@end table
529
5fafdf24 530Examples:
1f673135
FB
531@itemize
532@item
533Dump 10 instructions at the current instruction pointer:
5fafdf24 534@example
1f673135
FB
535(qemu) x/10i $eip
5360x90107063: ret
5370x90107064: sti
5380x90107065: lea 0x0(%esi,1),%esi
5390x90107069: lea 0x0(%edi,1),%edi
5400x90107070: ret
5410x90107071: jmp 0x90107080
5420x90107073: nop
5430x90107074: nop
5440x90107075: nop
5450x90107076: nop
546@end example
547
548@item
549Dump 80 16 bit values at the start of the video memory.
5fafdf24 550@smallexample
1f673135
FB
551(qemu) xp/80hx 0xb8000
5520x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
5530x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
5540x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
5550x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
5560x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
5570x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
5580x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5590x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5600x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
5610x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
debc7065 562@end smallexample
1f673135
FB
563@end itemize
564
89dfe898 565@item p or print/@var{fmt} @var{expr}
1f673135
FB
566
567Print expression value. Only the @var{format} part of @var{fmt} is
568used.
0806e3f6 569
89dfe898 570@item sendkey @var{keys}
a3a91a35 571
54ae1fbd
AJ
572Send @var{keys} to the emulator. @var{keys} could be the name of the
573key or @code{#} followed by the raw value in either decimal or hexadecimal
574format. Use @code{-} to press several keys simultaneously. Example:
a3a91a35
FB
575@example
576sendkey ctrl-alt-f1
577@end example
578
579This command is useful to send keys that your graphical user interface
580intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
581
15a34c63
FB
582@item system_reset
583
584Reset the system.
585
d2c639d6 586@item system_powerdown
0ecdffbb 587
d2c639d6 588Power down the system (if supported).
0ecdffbb 589
d2c639d6
BS
590@item sum @var{addr} @var{size}
591
592Compute the checksum of a memory region.
0ecdffbb 593
89dfe898 594@item usb_add @var{devname}
b389dbfb 595
0aff66b5
PB
596Add the USB device @var{devname}. For details of available devices see
597@ref{usb_devices}
b389dbfb 598
89dfe898 599@item usb_del @var{devname}
b389dbfb
FB
600
601Remove the USB device @var{devname} from the QEMU virtual USB
602hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
603command @code{info usb} to see the devices you can remove.
604
d2c639d6
BS
605@item mouse_move @var{dx} @var{dy} [@var{dz}]
606Move the active mouse to the specified coordinates @var{dx} @var{dy}
607with optional scroll axis @var{dz}.
608
609@item mouse_button @var{val}
610Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
611
612@item mouse_set @var{index}
613Set which mouse device receives events at given @var{index}, index
614can be obtained with
615@example
616info mice
617@end example
618
619@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
620Capture audio into @var{filename}. Using sample rate @var{frequency}
621bits per sample @var{bits} and number of channels @var{channels}.
622
623Defaults:
624@itemize @minus
625@item Sample rate = 44100 Hz - CD quality
626@item Bits = 16
627@item Number of channels = 2 - Stereo
628@end itemize
629
630@item stopcapture @var{index}
631Stop capture with a given @var{index}, index can be obtained with
632@example
633info capture
634@end example
635
636@item memsave @var{addr} @var{size} @var{file}
637save to disk virtual memory dump starting at @var{addr} of size @var{size}.
638
639@item pmemsave @var{addr} @var{size} @var{file}
640save to disk physical memory dump starting at @var{addr} of size @var{size}.
641
642@item boot_set @var{bootdevicelist}
643
644Define new values for the boot device list. Those values will override
645the values specified on the command line through the @code{-boot} option.
646
647The values that can be specified here depend on the machine type, but are
648the same that can be specified in the @code{-boot} command line option.
649
650@item nmi @var{cpu}
651Inject an NMI on the given CPU.
652
653@item migrate [-d] @var{uri}
654Migrate to @var{uri} (using -d to not wait for completion).
655
656@item migrate_cancel
657Cancel the current VM migration.
658
659@item migrate_set_speed @var{value}
660Set maximum speed to @var{value} (in bytes) for migrations.
661
662@item balloon @var{value}
663Request VM to change its memory allocation to @var{value} (in MB).
664
665@item set_link @var{name} [up|down]
666Set link @var{name} up or down.
667
1f673135 668@end table
0806e3f6 669
1f673135
FB
670@subsection Integer expressions
671
672The monitor understands integers expressions for every integer
673argument. You can use register names to get the value of specifics
674CPU registers by prefixing them with @emph{$}.
ec410fc9 675
1f47a922
FB
676@node disk_images
677@section Disk Images
678
acd935ef
FB
679Since version 0.6.1, QEMU supports many disk image formats, including
680growable disk images (their size increase as non empty sectors are
13a2e80f
FB
681written), compressed and encrypted disk images. Version 0.8.3 added
682the new qcow2 disk image format which is essential to support VM
683snapshots.
1f47a922 684
debc7065
FB
685@menu
686* disk_images_quickstart:: Quick start for disk image creation
687* disk_images_snapshot_mode:: Snapshot mode
13a2e80f 688* vm_snapshots:: VM snapshots
debc7065 689* qemu_img_invocation:: qemu-img Invocation
975b092b 690* qemu_nbd_invocation:: qemu-nbd Invocation
19cb3738 691* host_drives:: Using host drives
debc7065 692* disk_images_fat_images:: Virtual FAT disk images
75818250 693* disk_images_nbd:: NBD access
debc7065
FB
694@end menu
695
696@node disk_images_quickstart
acd935ef
FB
697@subsection Quick start for disk image creation
698
699You can create a disk image with the command:
1f47a922 700@example
acd935ef 701qemu-img create myimage.img mysize
1f47a922 702@end example
acd935ef
FB
703where @var{myimage.img} is the disk image filename and @var{mysize} is its
704size in kilobytes. You can add an @code{M} suffix to give the size in
705megabytes and a @code{G} suffix for gigabytes.
706
debc7065 707See @ref{qemu_img_invocation} for more information.
1f47a922 708
debc7065 709@node disk_images_snapshot_mode
1f47a922
FB
710@subsection Snapshot mode
711
712If you use the option @option{-snapshot}, all disk images are
713considered as read only. When sectors in written, they are written in
714a temporary file created in @file{/tmp}. You can however force the
acd935ef
FB
715write back to the raw disk images by using the @code{commit} monitor
716command (or @key{C-a s} in the serial console).
1f47a922 717
13a2e80f
FB
718@node vm_snapshots
719@subsection VM snapshots
720
721VM snapshots are snapshots of the complete virtual machine including
722CPU state, RAM, device state and the content of all the writable
723disks. In order to use VM snapshots, you must have at least one non
724removable and writable block device using the @code{qcow2} disk image
725format. Normally this device is the first virtual hard drive.
726
727Use the monitor command @code{savevm} to create a new VM snapshot or
728replace an existing one. A human readable name can be assigned to each
19d36792 729snapshot in addition to its numerical ID.
13a2e80f
FB
730
731Use @code{loadvm} to restore a VM snapshot and @code{delvm} to remove
732a VM snapshot. @code{info snapshots} lists the available snapshots
733with their associated information:
734
735@example
736(qemu) info snapshots
737Snapshot devices: hda
738Snapshot list (from hda):
739ID TAG VM SIZE DATE VM CLOCK
7401 start 41M 2006-08-06 12:38:02 00:00:14.954
7412 40M 2006-08-06 12:43:29 00:00:18.633
7423 msys 40M 2006-08-06 12:44:04 00:00:23.514
743@end example
744
745A VM snapshot is made of a VM state info (its size is shown in
746@code{info snapshots}) and a snapshot of every writable disk image.
747The VM state info is stored in the first @code{qcow2} non removable
748and writable block device. The disk image snapshots are stored in
749every disk image. The size of a snapshot in a disk image is difficult
750to evaluate and is not shown by @code{info snapshots} because the
751associated disk sectors are shared among all the snapshots to save
19d36792
FB
752disk space (otherwise each snapshot would need a full copy of all the
753disk images).
13a2e80f
FB
754
755When using the (unrelated) @code{-snapshot} option
756(@ref{disk_images_snapshot_mode}), you can always make VM snapshots,
757but they are deleted as soon as you exit QEMU.
758
759VM snapshots currently have the following known limitations:
760@itemize
5fafdf24 761@item
13a2e80f
FB
762They cannot cope with removable devices if they are removed or
763inserted after a snapshot is done.
5fafdf24 764@item
13a2e80f
FB
765A few device drivers still have incomplete snapshot support so their
766state is not saved or restored properly (in particular USB).
767@end itemize
768
acd935ef
FB
769@node qemu_img_invocation
770@subsection @code{qemu-img} Invocation
1f47a922 771
acd935ef 772@include qemu-img.texi
05efe46e 773
975b092b
TS
774@node qemu_nbd_invocation
775@subsection @code{qemu-nbd} Invocation
776
777@include qemu-nbd.texi
778
19cb3738
FB
779@node host_drives
780@subsection Using host drives
781
782In addition to disk image files, QEMU can directly access host
783devices. We describe here the usage for QEMU version >= 0.8.3.
784
785@subsubsection Linux
786
787On Linux, you can directly use the host device filename instead of a
4be456f1 788disk image filename provided you have enough privileges to access
19cb3738
FB
789it. For example, use @file{/dev/cdrom} to access to the CDROM or
790@file{/dev/fd0} for the floppy.
791
f542086d 792@table @code
19cb3738
FB
793@item CD
794You can specify a CDROM device even if no CDROM is loaded. QEMU has
795specific code to detect CDROM insertion or removal. CDROM ejection by
796the guest OS is supported. Currently only data CDs are supported.
797@item Floppy
798You can specify a floppy device even if no floppy is loaded. Floppy
799removal is currently not detected accurately (if you change floppy
800without doing floppy access while the floppy is not loaded, the guest
801OS will think that the same floppy is loaded).
802@item Hard disks
803Hard disks can be used. Normally you must specify the whole disk
804(@file{/dev/hdb} instead of @file{/dev/hdb1}) so that the guest OS can
805see it as a partitioned disk. WARNING: unless you know what you do, it
806is better to only make READ-ONLY accesses to the hard disk otherwise
807you may corrupt your host data (use the @option{-snapshot} command
808line option or modify the device permissions accordingly).
809@end table
810
811@subsubsection Windows
812
01781963
FB
813@table @code
814@item CD
4be456f1 815The preferred syntax is the drive letter (e.g. @file{d:}). The
01781963
FB
816alternate syntax @file{\\.\d:} is supported. @file{/dev/cdrom} is
817supported as an alias to the first CDROM drive.
19cb3738 818
e598752a 819Currently there is no specific code to handle removable media, so it
19cb3738
FB
820is better to use the @code{change} or @code{eject} monitor commands to
821change or eject media.
01781963 822@item Hard disks
89dfe898 823Hard disks can be used with the syntax: @file{\\.\PhysicalDrive@var{N}}
01781963
FB
824where @var{N} is the drive number (0 is the first hard disk).
825
826WARNING: unless you know what you do, it is better to only make
827READ-ONLY accesses to the hard disk otherwise you may corrupt your
828host data (use the @option{-snapshot} command line so that the
829modifications are written in a temporary file).
830@end table
831
19cb3738
FB
832
833@subsubsection Mac OS X
834
5fafdf24 835@file{/dev/cdrom} is an alias to the first CDROM.
19cb3738 836
e598752a 837Currently there is no specific code to handle removable media, so it
19cb3738
FB
838is better to use the @code{change} or @code{eject} monitor commands to
839change or eject media.
840
debc7065 841@node disk_images_fat_images
2c6cadd4
FB
842@subsection Virtual FAT disk images
843
844QEMU can automatically create a virtual FAT disk image from a
845directory tree. In order to use it, just type:
846
5fafdf24 847@example
2c6cadd4
FB
848qemu linux.img -hdb fat:/my_directory
849@end example
850
851Then you access access to all the files in the @file{/my_directory}
852directory without having to copy them in a disk image or to export
853them via SAMBA or NFS. The default access is @emph{read-only}.
854
855Floppies can be emulated with the @code{:floppy:} option:
856
5fafdf24 857@example
2c6cadd4
FB
858qemu linux.img -fda fat:floppy:/my_directory
859@end example
860
861A read/write support is available for testing (beta stage) with the
862@code{:rw:} option:
863
5fafdf24 864@example
2c6cadd4
FB
865qemu linux.img -fda fat:floppy:rw:/my_directory
866@end example
867
868What you should @emph{never} do:
869@itemize
870@item use non-ASCII filenames ;
871@item use "-snapshot" together with ":rw:" ;
85b2c688
FB
872@item expect it to work when loadvm'ing ;
873@item write to the FAT directory on the host system while accessing it with the guest system.
2c6cadd4
FB
874@end itemize
875
75818250
TS
876@node disk_images_nbd
877@subsection NBD access
878
879QEMU can access directly to block device exported using the Network Block Device
880protocol.
881
882@example
883qemu linux.img -hdb nbd:my_nbd_server.mydomain.org:1024
884@end example
885
886If the NBD server is located on the same host, you can use an unix socket instead
887of an inet socket:
888
889@example
890qemu linux.img -hdb nbd:unix:/tmp/my_socket
891@end example
892
893In this case, the block device must be exported using qemu-nbd:
894
895@example
896qemu-nbd --socket=/tmp/my_socket my_disk.qcow2
897@end example
898
899The use of qemu-nbd allows to share a disk between several guests:
900@example
901qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2
902@end example
903
904and then you can use it with two guests:
905@example
906qemu linux1.img -hdb nbd:unix:/tmp/my_socket
907qemu linux2.img -hdb nbd:unix:/tmp/my_socket
908@end example
909
debc7065 910@node pcsys_network
9d4fb82e
FB
911@section Network emulation
912
4be456f1 913QEMU can simulate several network cards (PCI or ISA cards on the PC
41d03949
FB
914target) and can connect them to an arbitrary number of Virtual Local
915Area Networks (VLANs). Host TAP devices can be connected to any QEMU
916VLAN. VLAN can be connected between separate instances of QEMU to
4be456f1 917simulate large networks. For simpler usage, a non privileged user mode
41d03949
FB
918network stack can replace the TAP device to have a basic network
919connection.
920
921@subsection VLANs
9d4fb82e 922
41d03949
FB
923QEMU simulates several VLANs. A VLAN can be symbolised as a virtual
924connection between several network devices. These devices can be for
925example QEMU virtual Ethernet cards or virtual Host ethernet devices
926(TAP devices).
9d4fb82e 927
41d03949
FB
928@subsection Using TAP network interfaces
929
930This is the standard way to connect QEMU to a real network. QEMU adds
931a virtual network device on your host (called @code{tapN}), and you
932can then configure it as if it was a real ethernet card.
9d4fb82e 933
8f40c388
FB
934@subsubsection Linux host
935
9d4fb82e
FB
936As an example, you can download the @file{linux-test-xxx.tar.gz}
937archive and copy the script @file{qemu-ifup} in @file{/etc} and
938configure properly @code{sudo} so that the command @code{ifconfig}
939contained in @file{qemu-ifup} can be executed as root. You must verify
41d03949 940that your host kernel supports the TAP network interfaces: the
9d4fb82e
FB
941device @file{/dev/net/tun} must be present.
942
ee0f4751
FB
943See @ref{sec_invocation} to have examples of command lines using the
944TAP network interfaces.
9d4fb82e 945
8f40c388
FB
946@subsubsection Windows host
947
948There is a virtual ethernet driver for Windows 2000/XP systems, called
949TAP-Win32. But it is not included in standard QEMU for Windows,
950so you will need to get it separately. It is part of OpenVPN package,
951so download OpenVPN from : @url{http://openvpn.net/}.
952
9d4fb82e
FB
953@subsection Using the user mode network stack
954
41d03949
FB
955By using the option @option{-net user} (default configuration if no
956@option{-net} option is specified), QEMU uses a completely user mode
4be456f1 957network stack (you don't need root privilege to use the virtual
41d03949 958network). The virtual network configuration is the following:
9d4fb82e
FB
959
960@example
961
41d03949
FB
962 QEMU VLAN <------> Firewall/DHCP server <-----> Internet
963 | (10.0.2.2)
9d4fb82e 964 |
2518bd0d 965 ----> DNS server (10.0.2.3)
3b46e624 966 |
2518bd0d 967 ----> SMB server (10.0.2.4)
9d4fb82e
FB
968@end example
969
970The QEMU VM behaves as if it was behind a firewall which blocks all
971incoming connections. You can use a DHCP client to automatically
41d03949
FB
972configure the network in the QEMU VM. The DHCP server assign addresses
973to the hosts starting from 10.0.2.15.
9d4fb82e
FB
974
975In order to check that the user mode network is working, you can ping
976the address 10.0.2.2 and verify that you got an address in the range
97710.0.2.x from the QEMU virtual DHCP server.
978
b415a407 979Note that @code{ping} is not supported reliably to the internet as it
4be456f1 980would require root privileges. It means you can only ping the local
b415a407
FB
981router (10.0.2.2).
982
9bf05444
FB
983When using the built-in TFTP server, the router is also the TFTP
984server.
985
986When using the @option{-redir} option, TCP or UDP connections can be
987redirected from the host to the guest. It allows for example to
988redirect X11, telnet or SSH connections.
443f1376 989
41d03949
FB
990@subsection Connecting VLANs between QEMU instances
991
992Using the @option{-net socket} option, it is possible to make VLANs
993that span several QEMU instances. See @ref{sec_invocation} to have a
994basic example.
995
9d4fb82e
FB
996@node direct_linux_boot
997@section Direct Linux Boot
1f673135
FB
998
999This section explains how to launch a Linux kernel inside QEMU without
1000having to make a full bootable image. It is very useful for fast Linux
ee0f4751 1001kernel testing.
1f673135 1002
ee0f4751 1003The syntax is:
1f673135 1004@example
ee0f4751 1005qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root=/dev/hda"
1f673135
FB
1006@end example
1007
ee0f4751
FB
1008Use @option{-kernel} to provide the Linux kernel image and
1009@option{-append} to give the kernel command line arguments. The
1010@option{-initrd} option can be used to provide an INITRD image.
1f673135 1011
ee0f4751
FB
1012When using the direct Linux boot, a disk image for the first hard disk
1013@file{hda} is required because its boot sector is used to launch the
1014Linux kernel.
1f673135 1015
ee0f4751
FB
1016If you do not need graphical output, you can disable it and redirect
1017the virtual serial port and the QEMU monitor to the console with the
1018@option{-nographic} option. The typical command line is:
1f673135 1019@example
ee0f4751
FB
1020qemu -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
1021 -append "root=/dev/hda console=ttyS0" -nographic
1f673135
FB
1022@end example
1023
ee0f4751
FB
1024Use @key{Ctrl-a c} to switch between the serial console and the
1025monitor (@pxref{pcsys_keys}).
1f673135 1026
debc7065 1027@node pcsys_usb
b389dbfb
FB
1028@section USB emulation
1029
0aff66b5
PB
1030QEMU emulates a PCI UHCI USB controller. You can virtually plug
1031virtual USB devices or real host USB devices (experimental, works only
1032on Linux hosts). Qemu will automatically create and connect virtual USB hubs
f542086d 1033as necessary to connect multiple USB devices.
b389dbfb 1034
0aff66b5
PB
1035@menu
1036* usb_devices::
1037* host_usb_devices::
1038@end menu
1039@node usb_devices
1040@subsection Connecting USB devices
b389dbfb 1041
0aff66b5
PB
1042USB devices can be connected with the @option{-usbdevice} commandline option
1043or the @code{usb_add} monitor command. Available devices are:
b389dbfb 1044
db380c06
AZ
1045@table @code
1046@item mouse
0aff66b5 1047Virtual Mouse. This will override the PS/2 mouse emulation when activated.
db380c06 1048@item tablet
c6d46c20 1049Pointer device that uses absolute coordinates (like a touchscreen).
0aff66b5
PB
1050This means qemu is able to report the mouse position without having
1051to grab the mouse. Also overrides the PS/2 mouse emulation when activated.
db380c06 1052@item disk:@var{file}
0aff66b5 1053Mass storage device based on @var{file} (@pxref{disk_images})
db380c06 1054@item host:@var{bus.addr}
0aff66b5
PB
1055Pass through the host device identified by @var{bus.addr}
1056(Linux only)
db380c06 1057@item host:@var{vendor_id:product_id}
0aff66b5
PB
1058Pass through the host device identified by @var{vendor_id:product_id}
1059(Linux only)
db380c06 1060@item wacom-tablet
f6d2a316
AZ
1061Virtual Wacom PenPartner tablet. This device is similar to the @code{tablet}
1062above but it can be used with the tslib library because in addition to touch
1063coordinates it reports touch pressure.
db380c06 1064@item keyboard
47b2d338 1065Standard USB keyboard. Will override the PS/2 keyboard (if present).
db380c06
AZ
1066@item serial:[vendorid=@var{vendor_id}][,product_id=@var{product_id}]:@var{dev}
1067Serial converter. This emulates an FTDI FT232BM chip connected to host character
1068device @var{dev}. The available character devices are the same as for the
1069@code{-serial} option. The @code{vendorid} and @code{productid} options can be
a11d070e 1070used to override the default 0403:6001. For instance,
db380c06
AZ
1071@example
1072usb_add serial:productid=FA00:tcp:192.168.0.2:4444
1073@end example
1074will connect to tcp port 4444 of ip 192.168.0.2, and plug that to the virtual
1075serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00).
2e4d9fb1
AJ
1076@item braille
1077Braille device. This will use BrlAPI to display the braille output on a real
1078or fake device.
9ad97e65
AZ
1079@item net:@var{options}
1080Network adapter that supports CDC ethernet and RNDIS protocols. @var{options}
1081specifies NIC options as with @code{-net nic,}@var{options} (see description).
1082For instance, user-mode networking can be used with
6c9f886c 1083@example
9ad97e65 1084qemu [...OPTIONS...] -net user,vlan=0 -usbdevice net:vlan=0
6c9f886c
AZ
1085@end example
1086Currently this cannot be used in machines that support PCI NICs.
2d564691
AZ
1087@item bt[:@var{hci-type}]
1088Bluetooth dongle whose type is specified in the same format as with
1089the @option{-bt hci} option, @pxref{bt-hcis,,allowed HCI types}. If
1090no type is given, the HCI logic corresponds to @code{-bt hci,vlan=0}.
1091This USB device implements the USB Transport Layer of HCI. Example
1092usage:
1093@example
1094qemu [...OPTIONS...] -usbdevice bt:hci,vlan=3 -bt device:keyboard,vlan=3
1095@end example
0aff66b5 1096@end table
b389dbfb 1097
0aff66b5 1098@node host_usb_devices
b389dbfb
FB
1099@subsection Using host USB devices on a Linux host
1100
1101WARNING: this is an experimental feature. QEMU will slow down when
1102using it. USB devices requiring real time streaming (i.e. USB Video
1103Cameras) are not supported yet.
1104
1105@enumerate
5fafdf24 1106@item If you use an early Linux 2.4 kernel, verify that no Linux driver
b389dbfb
FB
1107is actually using the USB device. A simple way to do that is simply to
1108disable the corresponding kernel module by renaming it from @file{mydriver.o}
1109to @file{mydriver.o.disabled}.
1110
1111@item Verify that @file{/proc/bus/usb} is working (most Linux distributions should enable it by default). You should see something like that:
1112@example
1113ls /proc/bus/usb
1114001 devices drivers
1115@end example
1116
1117@item Since only root can access to the USB devices directly, you can either launch QEMU as root or change the permissions of the USB devices you want to use. For testing, the following suffices:
1118@example
1119chown -R myuid /proc/bus/usb
1120@end example
1121
1122@item Launch QEMU and do in the monitor:
5fafdf24 1123@example
b389dbfb
FB
1124info usbhost
1125 Device 1.2, speed 480 Mb/s
1126 Class 00: USB device 1234:5678, USB DISK
1127@end example
1128You should see the list of the devices you can use (Never try to use
1129hubs, it won't work).
1130
1131@item Add the device in QEMU by using:
5fafdf24 1132@example
b389dbfb
FB
1133usb_add host:1234:5678
1134@end example
1135
1136Normally the guest OS should report that a new USB device is
1137plugged. You can use the option @option{-usbdevice} to do the same.
1138
1139@item Now you can try to use the host USB device in QEMU.
1140
1141@end enumerate
1142
1143When relaunching QEMU, you may have to unplug and plug again the USB
1144device to make it work again (this is a bug).
1145
f858dcae
TS
1146@node vnc_security
1147@section VNC security
1148
1149The VNC server capability provides access to the graphical console
1150of the guest VM across the network. This has a number of security
1151considerations depending on the deployment scenarios.
1152
1153@menu
1154* vnc_sec_none::
1155* vnc_sec_password::
1156* vnc_sec_certificate::
1157* vnc_sec_certificate_verify::
1158* vnc_sec_certificate_pw::
2f9606b3
AL
1159* vnc_sec_sasl::
1160* vnc_sec_certificate_sasl::
f858dcae 1161* vnc_generate_cert::
2f9606b3 1162* vnc_setup_sasl::
f858dcae
TS
1163@end menu
1164@node vnc_sec_none
1165@subsection Without passwords
1166
1167The simplest VNC server setup does not include any form of authentication.
1168For this setup it is recommended to restrict it to listen on a UNIX domain
1169socket only. For example
1170
1171@example
1172qemu [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
1173@end example
1174
1175This ensures that only users on local box with read/write access to that
1176path can access the VNC server. To securely access the VNC server from a
1177remote machine, a combination of netcat+ssh can be used to provide a secure
1178tunnel.
1179
1180@node vnc_sec_password
1181@subsection With passwords
1182
1183The VNC protocol has limited support for password based authentication. Since
1184the protocol limits passwords to 8 characters it should not be considered
1185to provide high security. The password can be fairly easily brute-forced by
1186a client making repeat connections. For this reason, a VNC server using password
1187authentication should be restricted to only listen on the loopback interface
34a3d239 1188or UNIX domain sockets. Password authentication is requested with the @code{password}
f858dcae
TS
1189option, and then once QEMU is running the password is set with the monitor. Until
1190the monitor is used to set the password all clients will be rejected.
1191
1192@example
1193qemu [...OPTIONS...] -vnc :1,password -monitor stdio
1194(qemu) change vnc password
1195Password: ********
1196(qemu)
1197@end example
1198
1199@node vnc_sec_certificate
1200@subsection With x509 certificates
1201
1202The QEMU VNC server also implements the VeNCrypt extension allowing use of
1203TLS for encryption of the session, and x509 certificates for authentication.
1204The use of x509 certificates is strongly recommended, because TLS on its
1205own is susceptible to man-in-the-middle attacks. Basic x509 certificate
1206support provides a secure session, but no authentication. This allows any
1207client to connect, and provides an encrypted session.
1208
1209@example
1210qemu [...OPTIONS...] -vnc :1,tls,x509=/etc/pki/qemu -monitor stdio
1211@end example
1212
1213In the above example @code{/etc/pki/qemu} should contain at least three files,
1214@code{ca-cert.pem}, @code{server-cert.pem} and @code{server-key.pem}. Unprivileged
1215users will want to use a private directory, for example @code{$HOME/.pki/qemu}.
1216NB the @code{server-key.pem} file should be protected with file mode 0600 to
1217only be readable by the user owning it.
1218
1219@node vnc_sec_certificate_verify
1220@subsection With x509 certificates and client verification
1221
1222Certificates can also provide a means to authenticate the client connecting.
1223The server will request that the client provide a certificate, which it will
1224then validate against the CA certificate. This is a good choice if deploying
1225in an environment with a private internal certificate authority.
1226
1227@example
1228qemu [...OPTIONS...] -vnc :1,tls,x509verify=/etc/pki/qemu -monitor stdio
1229@end example
1230
1231
1232@node vnc_sec_certificate_pw
1233@subsection With x509 certificates, client verification and passwords
1234
1235Finally, the previous method can be combined with VNC password authentication
1236to provide two layers of authentication for clients.
1237
1238@example
1239qemu [...OPTIONS...] -vnc :1,password,tls,x509verify=/etc/pki/qemu -monitor stdio
1240(qemu) change vnc password
1241Password: ********
1242(qemu)
1243@end example
1244
2f9606b3
AL
1245
1246@node vnc_sec_sasl
1247@subsection With SASL authentication
1248
1249The SASL authentication method is a VNC extension, that provides an
1250easily extendable, pluggable authentication method. This allows for
1251integration with a wide range of authentication mechanisms, such as
1252PAM, GSSAPI/Kerberos, LDAP, SQL databases, one-time keys and more.
1253The strength of the authentication depends on the exact mechanism
1254configured. If the chosen mechanism also provides a SSF layer, then
1255it will encrypt the datastream as well.
1256
1257Refer to the later docs on how to choose the exact SASL mechanism
1258used for authentication, but assuming use of one supporting SSF,
1259then QEMU can be launched with:
1260
1261@example
1262qemu [...OPTIONS...] -vnc :1,sasl -monitor stdio
1263@end example
1264
1265@node vnc_sec_certificate_sasl
1266@subsection With x509 certificates and SASL authentication
1267
1268If the desired SASL authentication mechanism does not supported
1269SSF layers, then it is strongly advised to run it in combination
1270with TLS and x509 certificates. This provides securely encrypted
1271data stream, avoiding risk of compromising of the security
1272credentials. This can be enabled, by combining the 'sasl' option
1273with the aforementioned TLS + x509 options:
1274
1275@example
1276qemu [...OPTIONS...] -vnc :1,tls,x509,sasl -monitor stdio
1277@end example
1278
1279
f858dcae
TS
1280@node vnc_generate_cert
1281@subsection Generating certificates for VNC
1282
1283The GNU TLS packages provides a command called @code{certtool} which can
1284be used to generate certificates and keys in PEM format. At a minimum it
1285is neccessary to setup a certificate authority, and issue certificates to
1286each server. If using certificates for authentication, then each client
1287will also need to be issued a certificate. The recommendation is for the
1288server to keep its certificates in either @code{/etc/pki/qemu} or for
1289unprivileged users in @code{$HOME/.pki/qemu}.
1290
1291@menu
1292* vnc_generate_ca::
1293* vnc_generate_server::
1294* vnc_generate_client::
1295@end menu
1296@node vnc_generate_ca
1297@subsubsection Setup the Certificate Authority
1298
1299This step only needs to be performed once per organization / organizational
1300unit. First the CA needs a private key. This key must be kept VERY secret
1301and secure. If this key is compromised the entire trust chain of the certificates
1302issued with it is lost.
1303
1304@example
1305# certtool --generate-privkey > ca-key.pem
1306@end example
1307
1308A CA needs to have a public certificate. For simplicity it can be a self-signed
1309certificate, or one issue by a commercial certificate issuing authority. To
1310generate a self-signed certificate requires one core piece of information, the
1311name of the organization.
1312
1313@example
1314# cat > ca.info <<EOF
1315cn = Name of your organization
1316ca
1317cert_signing_key
1318EOF
1319# certtool --generate-self-signed \
1320 --load-privkey ca-key.pem
1321 --template ca.info \
1322 --outfile ca-cert.pem
1323@end example
1324
1325The @code{ca-cert.pem} file should be copied to all servers and clients wishing to utilize
1326TLS support in the VNC server. The @code{ca-key.pem} must not be disclosed/copied at all.
1327
1328@node vnc_generate_server
1329@subsubsection Issuing server certificates
1330
1331Each server (or host) needs to be issued with a key and certificate. When connecting
1332the certificate is sent to the client which validates it against the CA certificate.
1333The core piece of information for a server certificate is the hostname. This should
1334be the fully qualified hostname that the client will connect with, since the client
1335will typically also verify the hostname in the certificate. On the host holding the
1336secure CA private key:
1337
1338@example
1339# cat > server.info <<EOF
1340organization = Name of your organization
1341cn = server.foo.example.com
1342tls_www_server
1343encryption_key
1344signing_key
1345EOF
1346# certtool --generate-privkey > server-key.pem
1347# certtool --generate-certificate \
1348 --load-ca-certificate ca-cert.pem \
1349 --load-ca-privkey ca-key.pem \
1350 --load-privkey server server-key.pem \
1351 --template server.info \
1352 --outfile server-cert.pem
1353@end example
1354
1355The @code{server-key.pem} and @code{server-cert.pem} files should now be securely copied
1356to the server for which they were generated. The @code{server-key.pem} is security
1357sensitive and should be kept protected with file mode 0600 to prevent disclosure.
1358
1359@node vnc_generate_client
1360@subsubsection Issuing client certificates
1361
1362If the QEMU VNC server is to use the @code{x509verify} option to validate client
1363certificates as its authentication mechanism, each client also needs to be issued
1364a certificate. The client certificate contains enough metadata to uniquely identify
1365the client, typically organization, state, city, building, etc. On the host holding
1366the secure CA private key:
1367
1368@example
1369# cat > client.info <<EOF
1370country = GB
1371state = London
1372locality = London
1373organiazation = Name of your organization
1374cn = client.foo.example.com
1375tls_www_client
1376encryption_key
1377signing_key
1378EOF
1379# certtool --generate-privkey > client-key.pem
1380# certtool --generate-certificate \
1381 --load-ca-certificate ca-cert.pem \
1382 --load-ca-privkey ca-key.pem \
1383 --load-privkey client-key.pem \
1384 --template client.info \
1385 --outfile client-cert.pem
1386@end example
1387
1388The @code{client-key.pem} and @code{client-cert.pem} files should now be securely
1389copied to the client for which they were generated.
1390
2f9606b3
AL
1391
1392@node vnc_setup_sasl
1393
1394@subsection Configuring SASL mechanisms
1395
1396The following documentation assumes use of the Cyrus SASL implementation on a
1397Linux host, but the principals should apply to any other SASL impl. When SASL
1398is enabled, the mechanism configuration will be loaded from system default
1399SASL service config /etc/sasl2/qemu.conf. If running QEMU as an
1400unprivileged user, an environment variable SASL_CONF_PATH can be used
1401to make it search alternate locations for the service config.
1402
1403The default configuration might contain
1404
1405@example
1406mech_list: digest-md5
1407sasldb_path: /etc/qemu/passwd.db
1408@end example
1409
1410This says to use the 'Digest MD5' mechanism, which is similar to the HTTP
1411Digest-MD5 mechanism. The list of valid usernames & passwords is maintained
1412in the /etc/qemu/passwd.db file, and can be updated using the saslpasswd2
1413command. While this mechanism is easy to configure and use, it is not
1414considered secure by modern standards, so only suitable for developers /
1415ad-hoc testing.
1416
1417A more serious deployment might use Kerberos, which is done with the 'gssapi'
1418mechanism
1419
1420@example
1421mech_list: gssapi
1422keytab: /etc/qemu/krb5.tab
1423@end example
1424
1425For this to work the administrator of your KDC must generate a Kerberos
1426principal for the server, with a name of 'qemu/somehost.example.com@@EXAMPLE.COM'
1427replacing 'somehost.example.com' with the fully qualified host name of the
1428machine running QEMU, and 'EXAMPLE.COM' with the Keberos Realm.
1429
1430Other configurations will be left as an exercise for the reader. It should
1431be noted that only Digest-MD5 and GSSAPI provides a SSF layer for data
1432encryption. For all other mechanisms, VNC should always be configured to
1433use TLS and x509 certificates to protect security credentials from snooping.
1434
0806e3f6 1435@node gdb_usage
da415d54
FB
1436@section GDB usage
1437
1438QEMU has a primitive support to work with gdb, so that you can do
0806e3f6 1439'Ctrl-C' while the virtual machine is running and inspect its state.
da415d54 1440
9d4520d0 1441In order to use gdb, launch qemu with the '-s' option. It will wait for a
da415d54
FB
1442gdb connection:
1443@example
debc7065
FB
1444> qemu -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img \
1445 -append "root=/dev/hda"
da415d54
FB
1446Connected to host network interface: tun0
1447Waiting gdb connection on port 1234
1448@end example
1449
1450Then launch gdb on the 'vmlinux' executable:
1451@example
1452> gdb vmlinux
1453@end example
1454
1455In gdb, connect to QEMU:
1456@example
6c9bf893 1457(gdb) target remote localhost:1234
da415d54
FB
1458@end example
1459
1460Then you can use gdb normally. For example, type 'c' to launch the kernel:
1461@example
1462(gdb) c
1463@end example
1464
0806e3f6
FB
1465Here are some useful tips in order to use gdb on system code:
1466
1467@enumerate
1468@item
1469Use @code{info reg} to display all the CPU registers.
1470@item
1471Use @code{x/10i $eip} to display the code at the PC position.
1472@item
1473Use @code{set architecture i8086} to dump 16 bit code. Then use
294e8637 1474@code{x/10i $cs*16+$eip} to dump the code at the PC position.
0806e3f6
FB
1475@end enumerate
1476
60897d36
EI
1477Advanced debugging options:
1478
1479The 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 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:
94d45e44 1480@table @code
60897d36
EI
1481@item maintenance packet qqemu.sstepbits
1482
1483This will display the MASK bits used to control the single stepping IE:
1484@example
1485(gdb) maintenance packet qqemu.sstepbits
1486sending: "qqemu.sstepbits"
1487received: "ENABLE=1,NOIRQ=2,NOTIMER=4"
1488@end example
1489@item maintenance packet qqemu.sstep
1490
1491This will display the current value of the mask used when single stepping IE:
1492@example
1493(gdb) maintenance packet qqemu.sstep
1494sending: "qqemu.sstep"
1495received: "0x7"
1496@end example
1497@item maintenance packet Qqemu.sstep=HEX_VALUE
1498
1499This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
1500@example
1501(gdb) maintenance packet Qqemu.sstep=0x5
1502sending: "qemu.sstep=0x5"
1503received: "OK"
1504@end example
94d45e44 1505@end table
60897d36 1506
debc7065 1507@node pcsys_os_specific
1a084f3d
FB
1508@section Target OS specific information
1509
1510@subsection Linux
1511
15a34c63
FB
1512To have access to SVGA graphic modes under X11, use the @code{vesa} or
1513the @code{cirrus} X11 driver. For optimal performances, use 16 bit
1514color depth in the guest and the host OS.
1a084f3d 1515
e3371e62
FB
1516When using a 2.6 guest Linux kernel, you should add the option
1517@code{clock=pit} on the kernel command line because the 2.6 Linux
1518kernels make very strict real time clock checks by default that QEMU
1519cannot simulate exactly.
1520
7c3fc84d
FB
1521When using a 2.6 guest Linux kernel, verify that the 4G/4G patch is
1522not activated because QEMU is slower with this patch. The QEMU
1523Accelerator Module is also much slower in this case. Earlier Fedora
4be456f1 1524Core 3 Linux kernel (< 2.6.9-1.724_FC3) were known to incorporate this
7c3fc84d
FB
1525patch by default. Newer kernels don't have it.
1526
1a084f3d
FB
1527@subsection Windows
1528
1529If you have a slow host, using Windows 95 is better as it gives the
1530best speed. Windows 2000 is also a good choice.
1531
e3371e62
FB
1532@subsubsection SVGA graphic modes support
1533
1534QEMU emulates a Cirrus Logic GD5446 Video
15a34c63
FB
1535card. All Windows versions starting from Windows 95 should recognize
1536and use this graphic card. For optimal performances, use 16 bit color
1537depth in the guest and the host OS.
1a084f3d 1538
3cb0853a
FB
1539If you are using Windows XP as guest OS and if you want to use high
1540resolution modes which the Cirrus Logic BIOS does not support (i.e. >=
15411280x1024x16), then you should use the VESA VBE virtual graphic card
1542(option @option{-std-vga}).
1543
e3371e62
FB
1544@subsubsection CPU usage reduction
1545
1546Windows 9x does not correctly use the CPU HLT
15a34c63
FB
1547instruction. The result is that it takes host CPU cycles even when
1548idle. You can install the utility from
1549@url{http://www.user.cityline.ru/~maxamn/amnhltm.zip} to solve this
1550problem. Note that no such tool is needed for NT, 2000 or XP.
1a084f3d 1551
9d0a8e6f 1552@subsubsection Windows 2000 disk full problem
e3371e62 1553
9d0a8e6f
FB
1554Windows 2000 has a bug which gives a disk full problem during its
1555installation. When installing it, use the @option{-win2k-hack} QEMU
1556option to enable a specific workaround. After Windows 2000 is
1557installed, you no longer need this option (this option slows down the
1558IDE transfers).
e3371e62 1559
6cc721cf
FB
1560@subsubsection Windows 2000 shutdown
1561
1562Windows 2000 cannot automatically shutdown in QEMU although Windows 98
1563can. It comes from the fact that Windows 2000 does not automatically
1564use the APM driver provided by the BIOS.
1565
1566In order to correct that, do the following (thanks to Struan
1567Bartlett): go to the Control Panel => Add/Remove Hardware & Next =>
1568Add/Troubleshoot a device => Add a new device & Next => No, select the
1569hardware from a list & Next => NT Apm/Legacy Support & Next => Next
1570(again) a few times. Now the driver is installed and Windows 2000 now
5fafdf24 1571correctly instructs QEMU to shutdown at the appropriate moment.
6cc721cf
FB
1572
1573@subsubsection Share a directory between Unix and Windows
1574
1575See @ref{sec_invocation} about the help of the option @option{-smb}.
1576
2192c332 1577@subsubsection Windows XP security problem
e3371e62
FB
1578
1579Some releases of Windows XP install correctly but give a security
1580error when booting:
1581@example
1582A problem is preventing Windows from accurately checking the
1583license for this computer. Error code: 0x800703e6.
1584@end example
e3371e62 1585
2192c332
FB
1586The workaround is to install a service pack for XP after a boot in safe
1587mode. Then reboot, and the problem should go away. Since there is no
1588network while in safe mode, its recommended to download the full
1589installation of SP1 or SP2 and transfer that via an ISO or using the
1590vvfat block device ("-hdb fat:directory_which_holds_the_SP").
e3371e62 1591
a0a821a4
FB
1592@subsection MS-DOS and FreeDOS
1593
1594@subsubsection CPU usage reduction
1595
1596DOS does not correctly use the CPU HLT instruction. The result is that
1597it takes host CPU cycles even when idle. You can install the utility
1598from @url{http://www.vmware.com/software/dosidle210.zip} to solve this
1599problem.
1600
debc7065 1601@node QEMU System emulator for non PC targets
3f9f3aa1
FB
1602@chapter QEMU System emulator for non PC targets
1603
1604QEMU is a generic emulator and it emulates many non PC
1605machines. Most of the options are similar to the PC emulator. The
4be456f1 1606differences are mentioned in the following sections.
3f9f3aa1 1607
debc7065
FB
1608@menu
1609* QEMU PowerPC System emulator::
24d4de45
TS
1610* Sparc32 System emulator::
1611* Sparc64 System emulator::
1612* MIPS System emulator::
1613* ARM System emulator::
1614* ColdFire System emulator::
debc7065
FB
1615@end menu
1616
1617@node QEMU PowerPC System emulator
3f9f3aa1 1618@section QEMU PowerPC System emulator
1a084f3d 1619
15a34c63
FB
1620Use the executable @file{qemu-system-ppc} to simulate a complete PREP
1621or PowerMac PowerPC system.
1a084f3d 1622
b671f9ed 1623QEMU emulates the following PowerMac peripherals:
1a084f3d 1624
15a34c63 1625@itemize @minus
5fafdf24 1626@item
006f3a48 1627UniNorth or Grackle PCI Bridge
15a34c63
FB
1628@item
1629PCI VGA compatible card with VESA Bochs Extensions
5fafdf24 1630@item
15a34c63 16312 PMAC IDE interfaces with hard disk and CD-ROM support
5fafdf24 1632@item
15a34c63
FB
1633NE2000 PCI adapters
1634@item
1635Non Volatile RAM
1636@item
1637VIA-CUDA with ADB keyboard and mouse.
1a084f3d
FB
1638@end itemize
1639
b671f9ed 1640QEMU emulates the following PREP peripherals:
52c00a5f
FB
1641
1642@itemize @minus
5fafdf24 1643@item
15a34c63
FB
1644PCI Bridge
1645@item
1646PCI VGA compatible card with VESA Bochs Extensions
5fafdf24 1647@item
52c00a5f
FB
16482 IDE interfaces with hard disk and CD-ROM support
1649@item
1650Floppy disk
5fafdf24 1651@item
15a34c63 1652NE2000 network adapters
52c00a5f
FB
1653@item
1654Serial port
1655@item
1656PREP Non Volatile RAM
15a34c63
FB
1657@item
1658PC compatible keyboard and mouse.
52c00a5f
FB
1659@end itemize
1660
15a34c63 1661QEMU uses the Open Hack'Ware Open Firmware Compatible BIOS available at
3f9f3aa1 1662@url{http://perso.magic.fr/l_indien/OpenHackWare/index.htm}.
52c00a5f 1663
992e5acd 1664Since version 0.9.1, QEMU uses OpenBIOS @url{http://www.openbios.org/}
006f3a48
BS
1665for the g3beige and mac99 PowerMac machines. OpenBIOS is a free (GPL
1666v2) portable firmware implementation. The goal is to implement a 100%
1667IEEE 1275-1994 (referred to as Open Firmware) compliant firmware.
992e5acd 1668
15a34c63
FB
1669@c man begin OPTIONS
1670
1671The following options are specific to the PowerPC emulation:
1672
1673@table @option
1674
3b46e624 1675@item -g WxH[xDEPTH]
15a34c63
FB
1676
1677Set the initial VGA graphic mode. The default is 800x600x15.
1678
95efd11c
BS
1679@item -prom-env string
1680
1681Set OpenBIOS variables in NVRAM, for example:
1682
1683@example
1684qemu-system-ppc -prom-env 'auto-boot?=false' \
1685 -prom-env 'boot-device=hd:2,\yaboot' \
1686 -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
1687@end example
1688
1689These variables are not used by Open Hack'Ware.
1690
15a34c63
FB
1691@end table
1692
5fafdf24 1693@c man end
15a34c63
FB
1694
1695
52c00a5f 1696More information is available at
3f9f3aa1 1697@url{http://perso.magic.fr/l_indien/qemu-ppc/}.
52c00a5f 1698
24d4de45
TS
1699@node Sparc32 System emulator
1700@section Sparc32 System emulator
e80cfcfc 1701
34a3d239
BS
1702Use the executable @file{qemu-system-sparc} to simulate the following
1703Sun4m architecture machines:
1704@itemize @minus
1705@item
1706SPARCstation 4
1707@item
1708SPARCstation 5
1709@item
1710SPARCstation 10
1711@item
1712SPARCstation 20
1713@item
1714SPARCserver 600MP
1715@item
1716SPARCstation LX
1717@item
1718SPARCstation Voyager
1719@item
1720SPARCclassic
1721@item
1722SPARCbook
1723@end itemize
1724
1725The emulation is somewhat complete. SMP up to 16 CPUs is supported,
1726but Linux limits the number of usable CPUs to 4.
e80cfcfc 1727
34a3d239
BS
1728It's also possible to simulate a SPARCstation 2 (sun4c architecture),
1729SPARCserver 1000, or SPARCcenter 2000 (sun4d architecture), but these
1730emulators are not usable yet.
1731
1732QEMU emulates the following sun4m/sun4c/sun4d peripherals:
e80cfcfc
FB
1733
1734@itemize @minus
3475187d 1735@item
7d85892b 1736IOMMU or IO-UNITs
e80cfcfc
FB
1737@item
1738TCX Frame buffer
5fafdf24 1739@item
e80cfcfc
FB
1740Lance (Am7990) Ethernet
1741@item
34a3d239 1742Non Volatile RAM M48T02/M48T08
e80cfcfc 1743@item
3475187d
FB
1744Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
1745and power/reset logic
1746@item
1747ESP SCSI controller with hard disk and CD-ROM support
1748@item
6a3b9cc9 1749Floppy drive (not on SS-600MP)
a2502b58
BS
1750@item
1751CS4231 sound device (only on SS-5, not working yet)
e80cfcfc
FB
1752@end itemize
1753
6a3b9cc9
BS
1754The number of peripherals is fixed in the architecture. Maximum
1755memory size depends on the machine type, for SS-5 it is 256MB and for
7d85892b 1756others 2047MB.
3475187d 1757
30a604f3 1758Since version 0.8.2, QEMU uses OpenBIOS
0986ac3b
FB
1759@url{http://www.openbios.org/}. OpenBIOS is a free (GPL v2) portable
1760firmware implementation. The goal is to implement a 100% IEEE
17611275-1994 (referred to as Open Firmware) compliant firmware.
3475187d
FB
1762
1763A sample Linux 2.6 series kernel and ram disk image are available on
34a3d239
BS
1764the QEMU web site. There are still issues with NetBSD and OpenBSD, but
1765some kernel versions work. Please note that currently Solaris kernels
1766don't work probably due to interface issues between OpenBIOS and
1767Solaris.
3475187d
FB
1768
1769@c man begin OPTIONS
1770
a2502b58 1771The following options are specific to the Sparc32 emulation:
3475187d
FB
1772
1773@table @option
1774
a2502b58 1775@item -g WxHx[xDEPTH]
3475187d 1776
a2502b58
BS
1777Set the initial TCX graphic mode. The default is 1024x768x8, currently
1778the only other possible mode is 1024x768x24.
3475187d 1779
66508601
BS
1780@item -prom-env string
1781
1782Set OpenBIOS variables in NVRAM, for example:
1783
1784@example
1785qemu-system-sparc -prom-env 'auto-boot?=false' \
1786 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
1787@end example
1788
34a3d239 1789@item -M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic|SPARCbook|SS-2|SS-1000|SS-2000]
a2502b58
BS
1790
1791Set the emulated machine type. Default is SS-5.
1792
3475187d
FB
1793@end table
1794
5fafdf24 1795@c man end
3475187d 1796
24d4de45
TS
1797@node Sparc64 System emulator
1798@section Sparc64 System emulator
e80cfcfc 1799
34a3d239
BS
1800Use the executable @file{qemu-system-sparc64} to simulate a Sun4u
1801(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
1802Niagara (T1) machine. The emulator is not usable for anything yet, but
1803it can launch some kernels.
b756921a 1804
c7ba218d 1805QEMU emulates the following peripherals:
83469015
FB
1806
1807@itemize @minus
1808@item
5fafdf24 1809UltraSparc IIi APB PCI Bridge
83469015
FB
1810@item
1811PCI VGA compatible card with VESA Bochs Extensions
1812@item
34a3d239
BS
1813PS/2 mouse and keyboard
1814@item
83469015
FB
1815Non Volatile RAM M48T59
1816@item
1817PC-compatible serial ports
c7ba218d
BS
1818@item
18192 PCI IDE interfaces with hard disk and CD-ROM support
34a3d239
BS
1820@item
1821Floppy disk
83469015
FB
1822@end itemize
1823
c7ba218d
BS
1824@c man begin OPTIONS
1825
1826The following options are specific to the Sparc64 emulation:
1827
1828@table @option
1829
34a3d239
BS
1830@item -prom-env string
1831
1832Set OpenBIOS variables in NVRAM, for example:
1833
1834@example
1835qemu-system-sparc64 -prom-env 'auto-boot?=false'
1836@end example
1837
1838@item -M [sun4u|sun4v|Niagara]
c7ba218d
BS
1839
1840Set the emulated machine type. The default is sun4u.
1841
1842@end table
1843
1844@c man end
1845
24d4de45
TS
1846@node MIPS System emulator
1847@section MIPS System emulator
9d0a8e6f 1848
d9aedc32
TS
1849Four executables cover simulation of 32 and 64-bit MIPS systems in
1850both endian options, @file{qemu-system-mips}, @file{qemu-system-mipsel}
1851@file{qemu-system-mips64} and @file{qemu-system-mips64el}.
88cb0a02 1852Five different machine types are emulated:
24d4de45
TS
1853
1854@itemize @minus
1855@item
1856A generic ISA PC-like machine "mips"
1857@item
1858The MIPS Malta prototype board "malta"
1859@item
d9aedc32 1860An ACER Pica "pica61". This machine needs the 64-bit emulator.
6bf5b4e8 1861@item
f0fc6f8f 1862MIPS emulator pseudo board "mipssim"
88cb0a02
AJ
1863@item
1864A MIPS Magnum R4000 machine "magnum". This machine needs the 64-bit emulator.
24d4de45
TS
1865@end itemize
1866
1867The generic emulation is supported by Debian 'Etch' and is able to
1868install Debian into a virtual disk image. The following devices are
1869emulated:
3f9f3aa1
FB
1870
1871@itemize @minus
5fafdf24 1872@item
6bf5b4e8 1873A range of MIPS CPUs, default is the 24Kf
3f9f3aa1
FB
1874@item
1875PC style serial port
1876@item
24d4de45
TS
1877PC style IDE disk
1878@item
3f9f3aa1
FB
1879NE2000 network card
1880@end itemize
1881
24d4de45
TS
1882The Malta emulation supports the following devices:
1883
1884@itemize @minus
1885@item
0b64d008 1886Core board with MIPS 24Kf CPU and Galileo system controller
24d4de45
TS
1887@item
1888PIIX4 PCI/USB/SMbus controller
1889@item
1890The Multi-I/O chip's serial device
1891@item
1892PCnet32 PCI network card
1893@item
1894Malta FPGA serial device
1895@item
1f605a76 1896Cirrus (default) or any other PCI VGA graphics card
24d4de45
TS
1897@end itemize
1898
1899The ACER Pica emulation supports:
1900
1901@itemize @minus
1902@item
1903MIPS R4000 CPU
1904@item
1905PC-style IRQ and DMA controllers
1906@item
1907PC Keyboard
1908@item
1909IDE controller
1910@end itemize
3f9f3aa1 1911
f0fc6f8f
TS
1912The mipssim pseudo board emulation provides an environment similiar
1913to what the proprietary MIPS emulator uses for running Linux.
1914It supports:
6bf5b4e8
TS
1915
1916@itemize @minus
1917@item
1918A range of MIPS CPUs, default is the 24Kf
1919@item
1920PC style serial port
1921@item
1922MIPSnet network emulation
1923@end itemize
1924
88cb0a02
AJ
1925The MIPS Magnum R4000 emulation supports:
1926
1927@itemize @minus
1928@item
1929MIPS R4000 CPU
1930@item
1931PC-style IRQ controller
1932@item
1933PC Keyboard
1934@item
1935SCSI controller
1936@item
1937G364 framebuffer
1938@end itemize
1939
1940
24d4de45
TS
1941@node ARM System emulator
1942@section ARM System emulator
3f9f3aa1
FB
1943
1944Use the executable @file{qemu-system-arm} to simulate a ARM
1945machine. The ARM Integrator/CP board is emulated with the following
1946devices:
1947
1948@itemize @minus
1949@item
9ee6e8bb 1950ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU
3f9f3aa1
FB
1951@item
1952Two PL011 UARTs
5fafdf24 1953@item
3f9f3aa1 1954SMC 91c111 Ethernet adapter
00a9bf19
PB
1955@item
1956PL110 LCD controller
1957@item
1958PL050 KMI with PS/2 keyboard and mouse.
a1bb27b1
PB
1959@item
1960PL181 MultiMedia Card Interface with SD card.
00a9bf19
PB
1961@end itemize
1962
1963The ARM Versatile baseboard is emulated with the following devices:
1964
1965@itemize @minus
1966@item
9ee6e8bb 1967ARM926E, ARM1136 or Cortex-A8 CPU
00a9bf19
PB
1968@item
1969PL190 Vectored Interrupt Controller
1970@item
1971Four PL011 UARTs
5fafdf24 1972@item
00a9bf19
PB
1973SMC 91c111 Ethernet adapter
1974@item
1975PL110 LCD controller
1976@item
1977PL050 KMI with PS/2 keyboard and mouse.
1978@item
1979PCI host bridge. Note the emulated PCI bridge only provides access to
1980PCI memory space. It does not provide access to PCI IO space.
4be456f1
TS
1981This means some devices (eg. ne2k_pci NIC) are not usable, and others
1982(eg. rtl8139 NIC) are only usable when the guest drivers use the memory
00a9bf19 1983mapped control registers.
e6de1bad
PB
1984@item
1985PCI OHCI USB controller.
1986@item
1987LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices.
a1bb27b1
PB
1988@item
1989PL181 MultiMedia Card Interface with SD card.
3f9f3aa1
FB
1990@end itemize
1991
d7739d75
PB
1992The ARM RealView Emulation baseboard is emulated with the following devices:
1993
1994@itemize @minus
1995@item
9ee6e8bb 1996ARM926E, ARM1136, ARM11MPCORE(x4) or Cortex-A8 CPU
d7739d75
PB
1997@item
1998ARM AMBA Generic/Distributed Interrupt Controller
1999@item
2000Four PL011 UARTs
5fafdf24 2001@item
d7739d75
PB
2002SMC 91c111 Ethernet adapter
2003@item
2004PL110 LCD controller
2005@item
2006PL050 KMI with PS/2 keyboard and mouse
2007@item
2008PCI host bridge
2009@item
2010PCI OHCI USB controller
2011@item
2012LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices
a1bb27b1
PB
2013@item
2014PL181 MultiMedia Card Interface with SD card.
d7739d75
PB
2015@end itemize
2016
b00052e4
AZ
2017The XScale-based clamshell PDA models ("Spitz", "Akita", "Borzoi"
2018and "Terrier") emulation includes the following peripherals:
2019
2020@itemize @minus
2021@item
2022Intel PXA270 System-on-chip (ARM V5TE core)
2023@item
2024NAND Flash memory
2025@item
2026IBM/Hitachi DSCM microdrive in a PXA PCMCIA slot - not in "Akita"
2027@item
2028On-chip OHCI USB controller
2029@item
2030On-chip LCD controller
2031@item
2032On-chip Real Time Clock
2033@item
2034TI ADS7846 touchscreen controller on SSP bus
2035@item
2036Maxim MAX1111 analog-digital converter on I@math{^2}C bus
2037@item
2038GPIO-connected keyboard controller and LEDs
2039@item
549444e1 2040Secure Digital card connected to PXA MMC/SD host
b00052e4
AZ
2041@item
2042Three on-chip UARTs
2043@item
2044WM8750 audio CODEC on I@math{^2}C and I@math{^2}S busses
2045@end itemize
2046
02645926
AZ
2047The Palm Tungsten|E PDA (codename "Cheetah") emulation includes the
2048following elements:
2049
2050@itemize @minus
2051@item
2052Texas Instruments OMAP310 System-on-chip (ARM 925T core)
2053@item
2054ROM and RAM memories (ROM firmware image can be loaded with -option-rom)
2055@item
2056On-chip LCD controller
2057@item
2058On-chip Real Time Clock
2059@item
2060TI TSC2102i touchscreen controller / analog-digital converter / Audio
2061CODEC, connected through MicroWire and I@math{^2}S busses
2062@item
2063GPIO-connected matrix keypad
2064@item
2065Secure Digital card connected to OMAP MMC/SD host
2066@item
2067Three on-chip UARTs
2068@end itemize
2069
c30bb264
AZ
2070Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48)
2071emulation supports the following elements:
2072
2073@itemize @minus
2074@item
2075Texas Instruments OMAP2420 System-on-chip (ARM 1136 core)
2076@item
2077RAM and non-volatile OneNAND Flash memories
2078@item
2079Display connected to EPSON remote framebuffer chip and OMAP on-chip
2080display controller and a LS041y3 MIPI DBI-C controller
2081@item
2082TI TSC2301 (in N800) and TI TSC2005 (in N810) touchscreen controllers
2083driven through SPI bus
2084@item
2085National Semiconductor LM8323-controlled qwerty keyboard driven
2086through I@math{^2}C bus
2087@item
2088Secure Digital card connected to OMAP MMC/SD host
2089@item
2090Three OMAP on-chip UARTs and on-chip STI debugging console
2091@item
2d564691
AZ
2092A Bluetooth(R) transciever and HCI connected to an UART
2093@item
c30bb264
AZ
2094Mentor Graphics "Inventra" dual-role USB controller embedded in a TI
2095TUSB6010 chip - only USB host mode is supported
2096@item
2097TI TMP105 temperature sensor driven through I@math{^2}C bus
2098@item
2099TI TWL92230C power management companion with an RTC on I@math{^2}C bus
2100@item
2101Nokia RETU and TAHVO multi-purpose chips with an RTC, connected
2102through CBUS
2103@end itemize
2104
9ee6e8bb
PB
2105The Luminary Micro Stellaris LM3S811EVB emulation includes the following
2106devices:
2107
2108@itemize @minus
2109@item
2110Cortex-M3 CPU core.
2111@item
211264k Flash and 8k SRAM.
2113@item
2114Timers, UARTs, ADC and I@math{^2}C interface.
2115@item
2116OSRAM Pictiva 96x16 OLED with SSD0303 controller on I@math{^2}C bus.
2117@end itemize
2118
2119The Luminary Micro Stellaris LM3S6965EVB emulation includes the following
2120devices:
2121
2122@itemize @minus
2123@item
2124Cortex-M3 CPU core.
2125@item
2126256k Flash and 64k SRAM.
2127@item
2128Timers, UARTs, ADC, I@math{^2}C and SSI interfaces.
2129@item
2130OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI.
2131@end itemize
2132
57cd6e97
AZ
2133The Freecom MusicPal internet radio emulation includes the following
2134elements:
2135
2136@itemize @minus
2137@item
2138Marvell MV88W8618 ARM core.
2139@item
214032 MB RAM, 256 KB SRAM, 8 MB flash.
2141@item
2142Up to 2 16550 UARTs
2143@item
2144MV88W8xx8 Ethernet controller
2145@item
2146MV88W8618 audio controller, WM8750 CODEC and mixer
2147@item
2148