blob: b79f1c340bd2b37d78d20d495bc6be9cf3890bba [file] [log] [blame]
bellard386405f2003-03-23 21:28:45 +00001\input texinfo @c -*- texinfo -*-
bellarddebc7062006-04-30 21:58:41 +00002@c %**start of header
3@setfilename qemu-doc.info
Paolo Bonzini44cb2802017-06-06 16:59:37 +02004@include version.texi
Stefan Weile080e782010-02-05 23:52:00 +01005
6@documentlanguage en
7@documentencoding UTF-8
8
Paolo Bonzini44cb2802017-06-06 16:59:37 +02009@settitle QEMU version @value{VERSION} User Documentation
bellarddebc7062006-04-30 21:58:41 +000010@exampleindent 0
11@paragraphindent 0
12@c %**end of header
bellard386405f2003-03-23 21:28:45 +000013
Thomas Huth664785a2019-07-30 17:08:26 +020014@set qemu_system qemu-system-x86_64
15@set qemu_system_x86 qemu-system-x86_64
16
Stefan Weila1a32b02010-02-05 23:51:59 +010017@ifinfo
18@direntry
19* QEMU: (qemu-doc). The QEMU Emulator User Documentation.
20@end direntry
21@end ifinfo
22
bellard0806e3f2003-10-01 00:15:32 +000023@iftex
bellard386405f2003-03-23 21:28:45 +000024@titlepage
25@sp 7
Paolo Bonzini44cb2802017-06-06 16:59:37 +020026@center @titlefont{QEMU version @value{VERSION}}
bellarddebc7062006-04-30 21:58:41 +000027@sp 1
28@center @titlefont{User Documentation}
bellard386405f2003-03-23 21:28:45 +000029@sp 3
30@end titlepage
bellard0806e3f2003-10-01 00:15:32 +000031@end iftex
bellard386405f2003-03-23 21:28:45 +000032
bellarddebc7062006-04-30 21:58:41 +000033@ifnottex
34@node Top
35@top
36
37@menu
38* Introduction::
bellarddebc7062006-04-30 21:58:41 +000039* QEMU PC System emulator::
40* QEMU System emulator for non PC targets::
bellard83195232007-02-05 19:42:07 +000041* QEMU User space emulator::
Borislav Petkov483c6ad2018-12-20 10:07:32 -020042* System requirements::
Stefan Hajnoczie8412572019-05-09 13:18:20 +010043* Security::
Paolo Bonzini78e87792016-10-06 16:12:11 +020044* Implementation notes::
Daniel P. Berrangeeb22aec2017-07-25 12:36:38 +010045* Deprecated features::
Gerd Hoffmann369e8f52019-10-23 12:19:56 +020046* Recently removed features::
Daniel P. Berrangé45b47132018-05-04 17:00:24 +010047* Supported build platforms::
Stefan Weil7544a042010-02-05 23:52:03 +010048* License::
bellarddebc7062006-04-30 21:58:41 +000049* Index::
50@end menu
51@end ifnottex
52
53@contents
54
55@node Introduction
bellard386405f2003-03-23 21:28:45 +000056@chapter Introduction
57
bellarddebc7062006-04-30 21:58:41 +000058@menu
59* intro_features:: Features
60@end menu
61
62@node intro_features
bellard322d0c62003-06-15 23:29:28 +000063@section Features
bellard386405f2003-03-23 21:28:45 +000064
bellard1f673132004-04-04 15:21:17 +000065QEMU is a FAST! processor emulator using dynamic translation to
66achieve good emulation speed.
bellard1eb20522003-06-25 16:21:49 +000067
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020068@cindex operating modes
bellard1eb20522003-06-25 16:21:49 +000069QEMU has two operating modes:
bellard0806e3f2003-10-01 00:15:32 +000070
Stefan Weild7e5edc2010-02-05 23:52:02 +010071@itemize
Stefan Weil7544a042010-02-05 23:52:03 +010072@cindex system emulation
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020073@item Full system emulation. In this mode, QEMU emulates a full system (for
bellard3f9f3aa2005-12-18 20:11:37 +000074example a PC), including one or several processors and various
75peripherals. It can be used to launch different Operating Systems
76without rebooting the PC or to debug system code.
bellard1eb20522003-06-25 16:21:49 +000077
Stefan Weil7544a042010-02-05 23:52:03 +010078@cindex user mode emulation
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020079@item User mode emulation. In this mode, QEMU can launch
bellard83195232007-02-05 19:42:07 +000080processes compiled for one CPU on another CPU. It can be used to
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +000081launch the Wine Windows API emulator (@url{https://www.winehq.org}) or
bellard1f673132004-04-04 15:21:17 +000082to ease cross-compilation and cross-debugging.
bellard1eb20522003-06-25 16:21:49 +000083
84@end itemize
85
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020086QEMU has the following features:
bellard322d0c62003-06-15 23:29:28 +000087
bellard52c00a52004-04-25 21:27:03 +000088@itemize
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020089@item QEMU can run without a host kernel driver and yet gives acceptable
90performance. It uses dynamic translation to native code for reasonable speed,
91with support for self-modifying code and precise exceptions.
92
93@item It is portable to several operating systems (GNU/Linux, *BSD, Mac OS X,
94Windows) and architectures.
95
96@item It performs accurate software emulation of the FPU.
bellard52c00a52004-04-25 21:27:03 +000097@end itemize
bellard386405f2003-03-23 21:28:45 +000098
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +020099QEMU user mode emulation has the following features:
100@itemize
101@item Generic Linux system call converter, including most ioctls.
102
103@item clone() emulation using native CPU clone() to use Linux scheduler for threads.
104
105@item Accurate signal handling by remapping host signals to target signals.
106@end itemize
107
108QEMU full system emulation has the following features:
109@itemize
110@item
111QEMU uses a full software MMU for maximum portability.
112
113@item
Michael Tokarev326c4c32017-09-26 09:03:31 +0300114QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators
Paolo Bonzini1f3e7e42016-10-06 14:59:26 +0200115execute most of the guest code natively, while
116continuing to emulate the rest of the machine.
117
118@item
119Various hardware devices can be emulated and in some cases, host
120devices (e.g. serial and parallel ports, USB, drives) can be used
121transparently by the guest Operating System. Host device passthrough
122can be used for talking to external physical peripherals (e.g. a
123webcam, modem or tape drive).
124
125@item
126Symmetric multiprocessing (SMP) support. Currently, an in-kernel
127accelerator is required to use more than one host CPU for emulation.
128
129@end itemize
130
bellard0806e3f2003-10-01 00:15:32 +0000131
bellarddebc7062006-04-30 21:58:41 +0000132@node QEMU PC System emulator
bellard3f9f3aa2005-12-18 20:11:37 +0000133@chapter QEMU PC System emulator
Stefan Weil7544a042010-02-05 23:52:03 +0100134@cindex system emulation (PC)
bellard1eb20522003-06-25 16:21:49 +0000135
bellarddebc7062006-04-30 21:58:41 +0000136@menu
137* pcsys_introduction:: Introduction
138* pcsys_quickstart:: Quick Start
139* sec_invocation:: Invocation
Peter Maydella40db1b2016-02-16 17:28:58 +0000140* pcsys_keys:: Keys in the graphical frontends
141* mux_keys:: Keys in the character backend multiplexer
bellarddebc7062006-04-30 21:58:41 +0000142* pcsys_monitor:: QEMU Monitor
Daniel P. Berrangé2544e9e2018-06-27 17:01:03 +0100143* cpu_models:: CPU models
bellarddebc7062006-04-30 21:58:41 +0000144* disk_images:: Disk Images
145* pcsys_network:: Network emulation
Stefan Weil576fd0a2011-01-07 18:59:14 +0100146* pcsys_other_devs:: Other Devices
bellarddebc7062006-04-30 21:58:41 +0000147* direct_linux_boot:: Direct Linux Boot
148* pcsys_usb:: USB emulation
thsf858dca2007-08-25 01:40:37 +0000149* vnc_security:: VNC security
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +0000150* network_tls:: TLS setup for network services
bellarddebc7062006-04-30 21:58:41 +0000151* gdb_usage:: GDB usage
152* pcsys_os_specific:: Target OS specific information
153@end menu
154
155@node pcsys_introduction
bellard0806e3f2003-10-01 00:15:32 +0000156@section Introduction
157
158@c man begin DESCRIPTION
159
bellard3f9f3aa2005-12-18 20:11:37 +0000160The QEMU PC System emulator simulates the
161following peripherals:
bellard0806e3f2003-10-01 00:15:32 +0000162
163@itemize @minus
ths5fafdf22007-09-16 21:08:06 +0000164@item
bellard15a34c62004-07-08 21:26:26 +0000165i440FX host PCI bridge and PIIX3 PCI to ISA bridge
bellard0806e3f2003-10-01 00:15:32 +0000166@item
bellard15a34c62004-07-08 21:26:26 +0000167Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA
168extensions (hardware level, including all non standard modes).
bellard0806e3f2003-10-01 00:15:32 +0000169@item
170PS/2 mouse and keyboard
ths5fafdf22007-09-16 21:08:06 +0000171@item
bellard15a34c62004-07-08 21:26:26 +00001722 PCI IDE interfaces with hard disk and CD-ROM support
bellard1f673132004-04-04 15:21:17 +0000173@item
174Floppy disk
ths5fafdf22007-09-16 21:08:06 +0000175@item
Stefan Weil3a2eeac2009-06-06 18:05:58 +0200176PCI and ISA network adapters
bellard0806e3f2003-10-01 00:15:32 +0000177@item
bellard05d58182004-08-24 21:12:04 +0000178Serial ports
179@item
Corey Minyard23076bb2015-12-17 12:50:04 -0600180IPMI BMC, either and internal or external one
181@item
bellardc0fe3822005-11-05 18:55:28 +0000182Creative SoundBlaster 16 sound card
183@item
184ENSONIQ AudioPCI ES1370 sound card
185@item
balroge5c9a132008-01-14 04:27:55 +0000186Intel 82801AA AC97 Audio compatible sound card
187@item
Gerd Hoffmann7d72e762010-11-01 16:57:48 +0100188Intel HD Audio Controller and HDA codec
189@item
Stefan Weil2d983442011-01-07 18:59:15 +0100190Adlib (OPL2) - Yamaha YM3812 compatible chip
bellardb389dbf2005-11-06 16:49:55 +0000191@item
balrog26463db2008-01-17 21:47:25 +0000192Gravis Ultrasound GF1 sound card
193@item
malccc53d262008-06-13 10:48:22 +0000194CS4231A compatible sound card
195@item
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200196PCI UHCI, OHCI, EHCI or XHCI USB controller and a virtual USB-1.1 hub.
bellard0806e3f2003-10-01 00:15:32 +0000197@end itemize
198
bellard3f9f3aa2005-12-18 20:11:37 +0000199SMP is supported with up to 255 CPUs.
200
Michael Tokareva8ad4152013-06-28 10:08:16 +0400201QEMU uses the PC BIOS from the Seabios project and the Plex86/Bochs LGPL
bellard15a34c62004-07-08 21:26:26 +0000202VGA BIOS.
203
bellardc0fe3822005-11-05 18:55:28 +0000204QEMU uses YM3812 emulation by Tatsuyuki Satoh.
205
Stefan Weil2d983442011-01-07 18:59:15 +0100206QEMU uses GUS emulation (GUSEMU32 @url{http://www.deinmeister.de/gusemu/})
balrog26463db2008-01-17 21:47:25 +0000207by Tibor "TS" Schütz.
balrog423d65f2008-01-14 22:09:11 +0000208
Bernhard Reutner-Fischer1a1a0e22011-10-25 10:22:18 +0200209Note that, by default, GUS shares IRQ(7) with parallel ports and so
Stefan Weilb65ee4f2012-05-11 22:25:50 +0200210QEMU must be told to not have parallel ports to have working GUS.
malc720036a2009-09-10 20:05:59 +0400211
212@example
Thomas Huth664785a2019-07-30 17:08:26 +0200213@value{qemu_system_x86} dos.img -soundhw gus -parallel none
malc720036a2009-09-10 20:05:59 +0400214@end example
215
216Alternatively:
217@example
Thomas Huth664785a2019-07-30 17:08:26 +0200218@value{qemu_system_x86} dos.img -device gus,irq=5
malc720036a2009-09-10 20:05:59 +0400219@end example
220
221Or some other unclaimed IRQ.
222
malccc53d262008-06-13 10:48:22 +0000223CS4231A is the chip used in Windows Sound System and GUSMAX products
224
bellard0806e3f2003-10-01 00:15:32 +0000225@c man end
226
bellarddebc7062006-04-30 21:58:41 +0000227@node pcsys_quickstart
bellard1eb20522003-06-25 16:21:49 +0000228@section Quick Start
Stefan Weil7544a042010-02-05 23:52:03 +0100229@cindex quick start
bellard1eb20522003-06-25 16:21:49 +0000230
Thomas Huth664785a2019-07-30 17:08:26 +0200231Download and uncompress a hard disk image with Linux installed (e.g.
232@file{linux.img}) and type:
bellard0806e3f2003-10-01 00:15:32 +0000233
234@example
Thomas Huth664785a2019-07-30 17:08:26 +0200235@value{qemu_system} linux.img
bellard0806e3f2003-10-01 00:15:32 +0000236@end example
237
238Linux should boot and give you a prompt.
239
bellard6cc721c2005-07-28 22:27:28 +0000240@node sec_invocation
bellard1f673132004-04-04 15:21:17 +0000241@section Invocation
242
243@example
244@c man begin SYNOPSIS
Thomas Huth664785a2019-07-30 17:08:26 +0200245@command{@value{qemu_system}} [@var{options}] [@var{disk_image}]
bellard1f673132004-04-04 15:21:17 +0000246@c man end
247@end example
248
249@c man begin OPTIONS
blueswir1d2c639d2009-01-24 18:19:25 +0000250@var{disk_image} is a raw hard disk image for IDE hard disk 0. Some
251targets do not need a disk image.
bellard1f673132004-04-04 15:21:17 +0000252
blueswir15824d652009-03-28 06:44:27 +0000253@include qemu-options.texi
bellard1f673132004-04-04 15:21:17 +0000254
bellard3e11db92004-07-14 17:47:14 +0000255@c man end
256
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200257@subsection Device URL Syntax
258@c TODO merge this with section Disk Images
259
260@c man begin NOTES
261
262In addition to using normal file images for the emulated storage devices,
263QEMU can also use networked resources such as iSCSI devices. These are
264specified using a special URL syntax.
265
266@table @option
267@item iSCSI
268iSCSI support allows QEMU to access iSCSI resources directly and use as
269images for the guest storage. Both disk and cdrom images are supported.
270
271Syntax for specifying iSCSI LUNs is
272``iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>''
273
274By default qemu will use the iSCSI initiator-name
275'iqn.2008-11.org.linux-kvm[:<name>]' but this can also be set from the command
276line or a configuration file.
277
278Since version Qemu 2.4 it is possible to specify a iSCSI request timeout to detect
279stalled requests and force a reestablishment of the session. The timeout
280is specified in seconds. The default is 0 which means no timeout. Libiscsi
2811.15.0 or greater is required for this feature.
282
283Example (without authentication):
284@example
Thomas Huth664785a2019-07-30 17:08:26 +0200285@value{qemu_system} -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200286 -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \
287 -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
288@end example
289
290Example (CHAP username/password via URL):
291@example
Thomas Huth664785a2019-07-30 17:08:26 +0200292@value{qemu_system} -drive file=iscsi://user%password@@192.0.2.1/iqn.2001-04.com.example/1
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200293@end example
294
295Example (CHAP username/password via environment variables):
296@example
297LIBISCSI_CHAP_USERNAME="user" \
298LIBISCSI_CHAP_PASSWORD="password" \
Thomas Huth664785a2019-07-30 17:08:26 +0200299@value{qemu_system} -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200300@end example
301
302@item NBD
303QEMU supports NBD (Network Block Devices) both using TCP protocol as well
Eric Blake0c61ebb2019-09-03 09:56:34 -0500304as Unix Domain Sockets. With TCP, the default port is 10809.
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200305
Eric Blake0c61ebb2019-09-03 09:56:34 -0500306Syntax for specifying a NBD device using TCP, in preferred URI form:
307``nbd://<server-ip>[:<port>]/[<export>]''
308
309Syntax for specifying a NBD device using Unix Domain Sockets; remember
310that '?' is a shell glob character and may need quoting:
311``nbd+unix:///[<export>]?socket=<domain-socket>''
312
313Older syntax that is also recognized:
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200314``nbd:<server-ip>:<port>[:exportname=<export>]''
315
316Syntax for specifying a NBD device using Unix Domain Sockets
317``nbd:unix:<domain-socket>[:exportname=<export>]''
318
319Example for TCP
320@example
Thomas Huth664785a2019-07-30 17:08:26 +0200321@value{qemu_system} --drive file=nbd:192.0.2.1:30000
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200322@end example
323
324Example for Unix Domain Sockets
325@example
Thomas Huth664785a2019-07-30 17:08:26 +0200326@value{qemu_system} --drive file=nbd:unix:/tmp/nbd-socket
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200327@end example
328
329@item SSH
330QEMU supports SSH (Secure Shell) access to remote disks.
331
332Examples:
333@example
Thomas Huth664785a2019-07-30 17:08:26 +0200334@value{qemu_system} -drive file=ssh://user@@host/path/to/disk.img
335@value{qemu_system} -drive file.driver=ssh,file.user=user,file.host=host,file.port=22,file.path=/path/to/disk.img
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200336@end example
337
338Currently authentication must be done using ssh-agent. Other
339authentication methods may be supported in future.
340
341@item Sheepdog
342Sheepdog is a distributed storage system for QEMU.
343QEMU supports using either local sheepdog devices or remote networked
344devices.
345
346Syntax for specifying a sheepdog device
347@example
348sheepdog[+tcp|+unix]://[host:port]/vdiname[?socket=path][#snapid|#tag]
349@end example
350
351Example
352@example
Thomas Huth664785a2019-07-30 17:08:26 +0200353@value{qemu_system} --drive file=sheepdog://192.0.2.1:30000/MyVirtualMachine
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200354@end example
355
356See also @url{https://sheepdog.github.io/sheepdog/}.
357
358@item GlusterFS
359GlusterFS is a user space distributed file system.
360QEMU supports the use of GlusterFS volumes for hosting VM disk images using
361TCP, Unix Domain Sockets and RDMA transport protocols.
362
363Syntax for specifying a VM disk image on GlusterFS volume is
364@example
365
366URI:
367gluster[+type]://[host[:port]]/volume/path[?socket=...][,debug=N][,logfile=...]
368
369JSON:
370'json:@{"driver":"qcow2","file":@{"driver":"gluster","volume":"testvol","path":"a.img","debug":N,"logfile":"...",
371@ "server":[@{"type":"tcp","host":"...","port":"..."@},
372@ @{"type":"unix","socket":"..."@}]@}@}'
373@end example
374
375
376Example
377@example
378URI:
Thomas Huth664785a2019-07-30 17:08:26 +0200379@value{qemu_system} --drive file=gluster://192.0.2.1/testvol/a.img,
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200380@ file.debug=9,file.logfile=/var/log/qemu-gluster.log
381
382JSON:
Thomas Huth664785a2019-07-30 17:08:26 +0200383@value{qemu_system} 'json:@{"driver":"qcow2",
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200384@ "file":@{"driver":"gluster",
385@ "volume":"testvol","path":"a.img",
386@ "debug":9,"logfile":"/var/log/qemu-gluster.log",
387@ "server":[@{"type":"tcp","host":"1.2.3.4","port":24007@},
388@ @{"type":"unix","socket":"/var/run/glusterd.socket"@}]@}@}'
Thomas Huth664785a2019-07-30 17:08:26 +0200389@value{qemu_system} -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img,
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200390@ file.debug=9,file.logfile=/var/log/qemu-gluster.log,
391@ file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007,
392@ file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket
393@end example
394
395See also @url{http://www.gluster.org}.
396
397@item HTTP/HTTPS/FTP/FTPS
398QEMU supports read-only access to files accessed over http(s) and ftp(s).
399
400Syntax using a single filename:
401@example
402<protocol>://[<username>[:<password>]@@]<host>/<path>
403@end example
404
405where:
406@table @option
407@item protocol
408'http', 'https', 'ftp', or 'ftps'.
409
410@item username
411Optional username for authentication to the remote server.
412
413@item password
414Optional password for authentication to the remote server.
415
416@item host
417Address of the remote server.
418
419@item path
420Path on the remote server, including any query string.
421@end table
422
423The following options are also supported:
424@table @option
425@item url
426The full URL when passing options to the driver explicitly.
427
428@item readahead
429The amount of data to read ahead with each range request to the remote server.
430This value may optionally have the suffix 'T', 'G', 'M', 'K', 'k' or 'b'. If it
431does not have a suffix, it will be assumed to be in bytes. The value must be a
432multiple of 512 bytes. It defaults to 256k.
433
434@item sslverify
435Whether to verify the remote server's certificate when connecting over SSL. It
436can have the value 'on' or 'off'. It defaults to 'on'.
437
438@item cookie
439Send this cookie (it can also be a list of cookies separated by ';') with
440each outgoing request. Only supported when using protocols such as HTTP
441which support cookies, otherwise ignored.
442
443@item timeout
444Set the timeout in seconds of the CURL connection. This timeout is the time
445that CURL waits for a response from the remote server to get the size of the
446image to be downloaded. If not set, the default timeout of 5 seconds is used.
447@end table
448
449Note that when passing options to qemu explicitly, @option{driver} is the value
450of <protocol>.
451
452Example: boot from a remote Fedora 20 live ISO image
453@example
Cleber Rosa93bbbdf2019-09-03 20:52:18 -0400454@value{qemu_system_x86} --drive media=cdrom,file=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200455
Cleber Rosa93bbbdf2019-09-03 20:52:18 -0400456@value{qemu_system_x86} --drive media=cdrom,file.driver=http,file.url=http://archives.fedoraproject.org/pub/fedora/linux/releases/20/Live/x86_64/Fedora-Live-Desktop-x86_64-20-1.iso,readonly
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200457@end example
458
459Example: boot from a remote Fedora 20 cloud image using a local overlay for
460writes, copy-on-read, and a readahead of 64k
461@example
Cleber Rosa93bbbdf2019-09-03 20:52:18 -0400462qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"http",, "file.url":"http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2",, "file.readahead":"64k"@}' /tmp/Fedora-x86_64-20-20131211.1-sda.qcow2
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200463
Thomas Huth664785a2019-07-30 17:08:26 +0200464@value{qemu_system_x86} -drive file=/tmp/Fedora-x86_64-20-20131211.1-sda.qcow2,copy-on-read=on
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200465@end example
466
467Example: boot from an image stored on a VMware vSphere server with a self-signed
468certificate using a local overlay for writes, a readahead of 64k and a timeout
469of 10 seconds.
470@example
471qemu-img create -f qcow2 -o backing_file='json:@{"file.driver":"https",, "file.url":"https://user:password@@vsphere.example.com/folder/test/test-flat.vmdk?dcPath=Datacenter&dsName=datastore1",, "file.sslverify":"off",, "file.readahead":"64k",, "file.timeout":10@}' /tmp/test.qcow2
472
Thomas Huth664785a2019-07-30 17:08:26 +0200473@value{qemu_system_x86} -drive file=/tmp/test.qcow2
Markus Armbrustere896d0f2017-10-02 16:03:02 +0200474@end example
475
476@end table
477
478@c man end
479
bellarddebc7062006-04-30 21:58:41 +0000480@node pcsys_keys
Peter Maydella40db1b2016-02-16 17:28:58 +0000481@section Keys in the graphical frontends
bellard3e11db92004-07-14 17:47:14 +0000482
483@c man begin OPTIONS
484
Brad Hardsde1db2a2011-04-29 21:46:12 +1000485During the graphical emulation, you can use special key combinations to change
486modes. The default key mappings are shown below, but if you use @code{-alt-grab}
487then the modifier is Ctrl-Alt-Shift (instead of Ctrl-Alt) and if you use
488@code{-ctrl-grab} then the modifier is the right Ctrl key (instead of Ctrl-Alt):
489
bellarda1b74fe2004-05-08 13:26:35 +0000490@table @key
bellardf9859312004-10-03 14:33:10 +0000491@item Ctrl-Alt-f
Stefan Weil7544a042010-02-05 23:52:03 +0100492@kindex Ctrl-Alt-f
bellarda1b74fe2004-05-08 13:26:35 +0000493Toggle full screen
bellarda0a821a2004-07-14 17:38:57 +0000494
Jan Kiszkad6a65ba2011-07-30 11:39:16 +0200495@item Ctrl-Alt-+
496@kindex Ctrl-Alt-+
497Enlarge the screen
498
499@item Ctrl-Alt--
500@kindex Ctrl-Alt--
501Shrink the screen
502
malcc4a735f2009-09-10 05:15:07 +0400503@item Ctrl-Alt-u
Stefan Weil7544a042010-02-05 23:52:03 +0100504@kindex Ctrl-Alt-u
malcc4a735f2009-09-10 05:15:07 +0400505Restore the screen's un-scaled dimensions
506
bellardf9859312004-10-03 14:33:10 +0000507@item Ctrl-Alt-n
Stefan Weil7544a042010-02-05 23:52:03 +0100508@kindex Ctrl-Alt-n
bellarda0a821a2004-07-14 17:38:57 +0000509Switch to virtual console 'n'. Standard console mappings are:
510@table @emph
511@item 1
512Target system display
513@item 2
514Monitor
515@item 3
516Serial port
bellarda1b74fe2004-05-08 13:26:35 +0000517@end table
518
bellardf9859312004-10-03 14:33:10 +0000519@item Ctrl-Alt
Stefan Weil7544a042010-02-05 23:52:03 +0100520@kindex Ctrl-Alt
bellarda0a821a2004-07-14 17:38:57 +0000521Toggle mouse and keyboard grab.
522@end table
523
Stefan Weil7544a042010-02-05 23:52:03 +0100524@kindex Ctrl-Up
525@kindex Ctrl-Down
526@kindex Ctrl-PageUp
527@kindex Ctrl-PageDown
bellard3e11db92004-07-14 17:47:14 +0000528In the virtual consoles, you can use @key{Ctrl-Up}, @key{Ctrl-Down},
529@key{Ctrl-PageUp} and @key{Ctrl-PageDown} to move in the back log.
530
Peter Maydella40db1b2016-02-16 17:28:58 +0000531@c man end
532
533@node mux_keys
534@section Keys in the character backend multiplexer
535
536@c man begin OPTIONS
537
538During emulation, if you are using a character backend multiplexer
539(which is the default if you are using @option{-nographic}) then
540several commands are available via an escape sequence. These
541key sequences all start with an escape character, which is @key{Ctrl-a}
542by default, but can be changed with @option{-echr}. The list below assumes
543you're using the default.
bellard1f673132004-04-04 15:21:17 +0000544
545@table @key
bellarda1b74fe2004-05-08 13:26:35 +0000546@item Ctrl-a h
Stefan Weil7544a042010-02-05 23:52:03 +0100547@kindex Ctrl-a h
bellard1f673132004-04-04 15:21:17 +0000548Print this help
ths3b46e622007-09-17 08:09:54 +0000549@item Ctrl-a x
Stefan Weil7544a042010-02-05 23:52:03 +0100550@kindex Ctrl-a x
ths366dfc52006-12-11 18:35:08 +0000551Exit emulator
ths3b46e622007-09-17 08:09:54 +0000552@item Ctrl-a s
Stefan Weil7544a042010-02-05 23:52:03 +0100553@kindex Ctrl-a s
bellard1f673132004-04-04 15:21:17 +0000554Save disk data back to file (if -snapshot)
ths20d8a3e2007-02-18 17:04:49 +0000555@item Ctrl-a t
Stefan Weil7544a042010-02-05 23:52:03 +0100556@kindex Ctrl-a t
blueswir1d2c639d2009-01-24 18:19:25 +0000557Toggle console timestamps
bellarda1b74fe2004-05-08 13:26:35 +0000558@item Ctrl-a b
Stefan Weil7544a042010-02-05 23:52:03 +0100559@kindex Ctrl-a b
bellard1f673132004-04-04 15:21:17 +0000560Send break (magic sysrq in Linux)
bellarda1b74fe2004-05-08 13:26:35 +0000561@item Ctrl-a c
Stefan Weil7544a042010-02-05 23:52:03 +0100562@kindex Ctrl-a c
Peter Maydella40db1b2016-02-16 17:28:58 +0000563Rotate between the frontends connected to the multiplexer (usually
564this switches between the monitor and the console)
bellarda1b74fe2004-05-08 13:26:35 +0000565@item Ctrl-a Ctrl-a
Peter Maydella40db1b2016-02-16 17:28:58 +0000566@kindex Ctrl-a Ctrl-a
567Send the escape character to the frontend
bellard1f673132004-04-04 15:21:17 +0000568@end table
569@c man end
570
571@ignore
572
bellard1f673132004-04-04 15:21:17 +0000573@c man begin SEEALSO
574The HTML documentation of QEMU for more precise information and Linux
575user mode emulator invocation.
576@c man end
577
578@c man begin AUTHOR
579Fabrice Bellard
580@c man end
581
582@end ignore
583
bellarddebc7062006-04-30 21:58:41 +0000584@node pcsys_monitor
bellard1f673132004-04-04 15:21:17 +0000585@section QEMU Monitor
Stefan Weil7544a042010-02-05 23:52:03 +0100586@cindex QEMU monitor
bellard1f673132004-04-04 15:21:17 +0000587
588The QEMU monitor is used to give complex commands to the QEMU
589emulator. You can use it to:
590
591@itemize @minus
592
593@item
thse5987522007-03-30 18:58:01 +0000594Remove or insert removable media images
ths89dfe892007-11-21 22:38:37 +0000595(such as CD-ROM or floppies).
bellard1f673132004-04-04 15:21:17 +0000596
ths5fafdf22007-09-16 21:08:06 +0000597@item
bellard1f673132004-04-04 15:21:17 +0000598Freeze/unfreeze the Virtual Machine (VM) and save or restore its state
599from a disk file.
600
601@item Inspect the VM state without an external debugger.
602
603@end itemize
604
605@subsection Commands
606
607The following commands are available:
608
Blue Swirl23130862009-06-06 08:22:04 +0000609@include qemu-monitor.texi
bellard1f673132004-04-04 15:21:17 +0000610
Pavel Butsykin2cd8af22015-09-10 18:39:01 +0300611@include qemu-monitor-info.texi
612
bellard1f673132004-04-04 15:21:17 +0000613@subsection Integer expressions
614
615The monitor understands integers expressions for every integer
616argument. You can use register names to get the value of specifics
617CPU registers by prefixing them with @emph{$}.
618
Daniel P. Berrangé2544e9e2018-06-27 17:01:03 +0100619@node cpu_models
620@section CPU models
621
622@include docs/qemu-cpu-models.texi
623
bellard1f673132004-04-04 15:21:17 +0000624@node disk_images
625@section Disk Images
626
Paolo Bonziniee29bdb2017-06-06 16:59:55 +0200627QEMU supports many disk image formats, including growable disk images
628(their size increase as non empty sectors are written), compressed and
629encrypted disk images.
bellard1f673132004-04-04 15:21:17 +0000630
bellarddebc7062006-04-30 21:58:41 +0000631@menu
632* disk_images_quickstart:: Quick start for disk image creation
633* disk_images_snapshot_mode:: Snapshot mode
bellard13a2e802006-08-06 14:50:31 +0000634* vm_snapshots:: VM snapshots
bellarddebc7062006-04-30 21:58:41 +0000635* qemu_img_invocation:: qemu-img Invocation
bellarddebc7062006-04-30 21:58:41 +0000636@end menu
637
638@node disk_images_quickstart
bellardacd935e2004-11-15 22:57:26 +0000639@subsection Quick start for disk image creation
640
641You can create a disk image with the command:
bellard1f673132004-04-04 15:21:17 +0000642@example
bellardacd935e2004-11-15 22:57:26 +0000643qemu-img create myimage.img mysize
bellard1f673132004-04-04 15:21:17 +0000644@end example
bellardacd935e2004-11-15 22:57:26 +0000645where @var{myimage.img} is the disk image filename and @var{mysize} is its
646size in kilobytes. You can add an @code{M} suffix to give the size in
647megabytes and a @code{G} suffix for gigabytes.
648
bellarddebc7062006-04-30 21:58:41 +0000649See @ref{qemu_img_invocation} for more information.
bellard1f673132004-04-04 15:21:17 +0000650
bellarddebc7062006-04-30 21:58:41 +0000651@node disk_images_snapshot_mode
bellard1f673132004-04-04 15:21:17 +0000652@subsection Snapshot mode
653
654If you use the option @option{-snapshot}, all disk images are
655considered as read only. When sectors in written, they are written in
656a temporary file created in @file{/tmp}. You can however force the
bellardacd935e2004-11-15 22:57:26 +0000657write back to the raw disk images by using the @code{commit} monitor
658command (or @key{C-a s} in the serial console).
bellard1f673132004-04-04 15:21:17 +0000659
bellard13a2e802006-08-06 14:50:31 +0000660@node vm_snapshots
661@subsection VM snapshots
662
663VM snapshots are snapshots of the complete virtual machine including
664CPU state, RAM, device state and the content of all the writable
665disks. In order to use VM snapshots, you must have at least one non
666removable and writable block device using the @code{qcow2} disk image
667format. Normally this device is the first virtual hard drive.
668
669Use the monitor command @code{savevm} to create a new VM snapshot or
670replace an existing one. A human readable name can be assigned to each
bellard19d36792006-08-07 21:34:34 +0000671snapshot in addition to its numerical ID.
bellard13a2e802006-08-06 14:50:31 +0000672
673Use @code{loadvm} to restore a VM snapshot and @code{delvm} to remove
674a VM snapshot. @code{info snapshots} lists the available snapshots
675with their associated information:
676
677@example
678(qemu) info snapshots
679Snapshot devices: hda
680Snapshot list (from hda):
681ID TAG VM SIZE DATE VM CLOCK
6821 start 41M 2006-08-06 12:38:02 00:00:14.954
6832 40M 2006-08-06 12:43:29 00:00:18.633
6843 msys 40M 2006-08-06 12:44:04 00:00:23.514
685@end example
686
687A VM snapshot is made of a VM state info (its size is shown in
688@code{info snapshots}) and a snapshot of every writable disk image.
689The VM state info is stored in the first @code{qcow2} non removable
690and writable block device. The disk image snapshots are stored in
691every disk image. The size of a snapshot in a disk image is difficult
692to evaluate and is not shown by @code{info snapshots} because the
693associated disk sectors are shared among all the snapshots to save
bellard19d36792006-08-07 21:34:34 +0000694disk space (otherwise each snapshot would need a full copy of all the
695disk images).
bellard13a2e802006-08-06 14:50:31 +0000696
697When using the (unrelated) @code{-snapshot} option
698(@ref{disk_images_snapshot_mode}), you can always make VM snapshots,
699but they are deleted as soon as you exit QEMU.
700
701VM snapshots currently have the following known limitations:
702@itemize
ths5fafdf22007-09-16 21:08:06 +0000703@item
bellard13a2e802006-08-06 14:50:31 +0000704They cannot cope with removable devices if they are removed or
705inserted after a snapshot is done.
ths5fafdf22007-09-16 21:08:06 +0000706@item
bellard13a2e802006-08-06 14:50:31 +0000707A few device drivers still have incomplete snapshot support so their
708state is not saved or restored properly (in particular USB).
709@end itemize
710
bellardacd935e2004-11-15 22:57:26 +0000711@node qemu_img_invocation
712@subsection @code{qemu-img} Invocation
bellard1f673132004-04-04 15:21:17 +0000713
bellardacd935e2004-11-15 22:57:26 +0000714@include qemu-img.texi
bellard05efe462004-06-16 20:34:33 +0000715
bellarddebc7062006-04-30 21:58:41 +0000716@node pcsys_network
bellard9d4fb822004-04-26 20:55:38 +0000717@section Network emulation
718
Thomas Huth0e0266c2018-04-30 20:02:25 +0200719QEMU can simulate several network cards (e.g. PCI or ISA cards on the PC
720target) and can connect them to a network backend on the host or an emulated
721hub. The various host network backends can either be used to connect the NIC of
722the guest to a real network (e.g. by using a TAP devices or the non-privileged
723user mode network stack), or to other guest instances running in another QEMU
724process (e.g. by using the socket host network backend).
bellard41d03942005-11-15 23:02:53 +0000725
726@subsection Using TAP network interfaces
727
728This is the standard way to connect QEMU to a real network. QEMU adds
729a virtual network device on your host (called @code{tapN}), and you
730can then configure it as if it was a real ethernet card.
bellard9d4fb822004-04-26 20:55:38 +0000731
bellard8f40c382006-09-20 20:28:05 +0000732@subsubsection Linux host
733
bellard9d4fb822004-04-26 20:55:38 +0000734As an example, you can download the @file{linux-test-xxx.tar.gz}
735archive and copy the script @file{qemu-ifup} in @file{/etc} and
736configure properly @code{sudo} so that the command @code{ifconfig}
737contained in @file{qemu-ifup} can be executed as root. You must verify
bellard41d03942005-11-15 23:02:53 +0000738that your host kernel supports the TAP network interfaces: the
bellard9d4fb822004-04-26 20:55:38 +0000739device @file{/dev/net/tun} must be present.
740
bellardee0f4752006-08-19 16:56:18 +0000741See @ref{sec_invocation} to have examples of command lines using the
742TAP network interfaces.
bellard9d4fb822004-04-26 20:55:38 +0000743
bellard8f40c382006-09-20 20:28:05 +0000744@subsubsection Windows host
745
746There is a virtual ethernet driver for Windows 2000/XP systems, called
747TAP-Win32. But it is not included in standard QEMU for Windows,
748so you will need to get it separately. It is part of OpenVPN package,
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +0000749so download OpenVPN from : @url{https://openvpn.net/}.
bellard8f40c382006-09-20 20:28:05 +0000750
bellard9d4fb822004-04-26 20:55:38 +0000751@subsection Using the user mode network stack
752
bellard41d03942005-11-15 23:02:53 +0000753By using the option @option{-net user} (default configuration if no
754@option{-net} option is specified), QEMU uses a completely user mode
ths4be456f2007-06-03 13:41:28 +0000755network stack (you don't need root privilege to use the virtual
bellard41d03942005-11-15 23:02:53 +0000756network). The virtual network configuration is the following:
bellard9d4fb822004-04-26 20:55:38 +0000757
758@example
759
Thomas Huth0e0266c2018-04-30 20:02:25 +0200760 guest (10.0.2.15) <------> Firewall/DHCP server <-----> Internet
bellard41d03942005-11-15 23:02:53 +0000761 | (10.0.2.2)
bellard9d4fb822004-04-26 20:55:38 +0000762 |
bellard2518bd02004-09-30 22:35:13 +0000763 ----> DNS server (10.0.2.3)
ths3b46e622007-09-17 08:09:54 +0000764 |
bellard2518bd02004-09-30 22:35:13 +0000765 ----> SMB server (10.0.2.4)
bellard9d4fb822004-04-26 20:55:38 +0000766@end example
767
768The QEMU VM behaves as if it was behind a firewall which blocks all
769incoming connections. You can use a DHCP client to automatically
bellard41d03942005-11-15 23:02:53 +0000770configure the network in the QEMU VM. The DHCP server assign addresses
771to the hosts starting from 10.0.2.15.
bellard9d4fb822004-04-26 20:55:38 +0000772
773In order to check that the user mode network is working, you can ping
774the address 10.0.2.2 and verify that you got an address in the range
77510.0.2.x from the QEMU virtual DHCP server.
776
Gernot Hillier37cbfcc2014-07-10 16:01:25 +0200777Note that ICMP traffic in general does not work with user mode networking.
778@code{ping}, aka. ICMP echo, to the local router (10.0.2.2) shall work,
779however. If you're using QEMU on Linux >= 3.0, it can use unprivileged ICMP
780ping sockets to allow @code{ping} to the Internet. The host admin has to set
781the ping_group_range in order to grant access to those sockets. To allow ping
782for GID 100 (usually users group):
783
784@example
785echo 100 100 > /proc/sys/net/ipv4/ping_group_range
786@end example
bellardb415a402004-05-23 21:04:06 +0000787
bellard9bf05442004-08-25 22:12:49 +0000788When using the built-in TFTP server, the router is also the TFTP
789server.
790
Thomas Huthc8c6afa2016-01-13 09:21:02 +0100791When using the @option{'-netdev user,hostfwd=...'} option, TCP or UDP
792connections can be redirected from the host to the guest. It allows for
793example to redirect X11, telnet or SSH connections.
bellard443f1372004-06-04 11:13:20 +0000794
Thomas Huth0e0266c2018-04-30 20:02:25 +0200795@subsection Hubs
bellard41d03942005-11-15 23:02:53 +0000796
Thomas Huth0e0266c2018-04-30 20:02:25 +0200797QEMU can simulate several hubs. A hub can be thought of as a virtual connection
798between several network devices. These devices can be for example QEMU virtual
799ethernet cards or virtual Host ethernet devices (TAP devices). You can connect
800guest NICs or host network backends to such a hub using the @option{-netdev
801hubport} or @option{-nic hubport} options. The legacy @option{-net} option
802also connects the given device to the emulated hub with ID 0 (i.e. the default
803hub) unless you specify a netdev with @option{-net nic,netdev=xxx} here.
804
805@subsection Connecting emulated networks between QEMU instances
806
807Using the @option{-netdev socket} (or @option{-nic socket} or
808@option{-net socket}) option, it is possible to create emulated
809networks that span several QEMU instances.
810See the description of the @option{-netdev socket} option in the
811@ref{sec_invocation,,Invocation chapter} to have a basic example.
bellard41d03942005-11-15 23:02:53 +0000812
Stefan Weil576fd0a2011-01-07 18:59:14 +0100813@node pcsys_other_devs
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600814@section Other Devices
815
816@subsection Inter-VM Shared Memory device
817
Markus Armbruster5400c022016-03-15 19:34:51 +0100818On Linux hosts, a shared memory device is available. The basic syntax
819is:
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600820
821@example
Thomas Huth664785a2019-07-30 17:08:26 +0200822@value{qemu_system_x86} -device ivshmem-plain,memdev=@var{hostmem}
Markus Armbruster5400c022016-03-15 19:34:51 +0100823@end example
824
825where @var{hostmem} names a host memory backend. For a POSIX shared
826memory backend, use something like
827
828@example
829-object memory-backend-file,size=1M,share,mem-path=/dev/shm/ivshmem,id=@var{hostmem}
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600830@end example
831
832If desired, interrupts can be sent between guest VMs accessing the same shared
833memory region. Interrupt support requires using a shared memory server and
834using a chardev socket to connect to it. The code for the shared memory server
835is qemu.git/contrib/ivshmem-server. An example syntax when using the shared
836memory server is:
837
838@example
David Marchanda75eb032014-09-08 11:17:48 +0200839# First start the ivshmem server once and for all
Markus Armbruster50d34c42015-11-24 18:06:25 +0100840ivshmem-server -p @var{pidfile} -S @var{path} -m @var{shm-name} -l @var{shm-size} -n @var{vectors}
David Marchanda75eb032014-09-08 11:17:48 +0200841
842# Then start your qemu instances with matching arguments
Thomas Huth664785a2019-07-30 17:08:26 +0200843@value{qemu_system_x86} -device ivshmem-doorbell,vectors=@var{vectors},chardev=@var{id}
Markus Armbruster50d34c42015-11-24 18:06:25 +0100844 -chardev socket,path=@var{path},id=@var{id}
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600845@end example
846
847When using the server, the guest will be assigned a VM ID (>=0) that allows guests
848using the same server to communicate via interrupts. Guests can read their
Markus Armbruster1309cf42016-03-15 19:34:41 +0100849VM ID from a device register (see ivshmem-spec.txt).
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600850
Markus Armbruster62a830b2016-03-15 19:34:54 +0100851@subsubsection Migration with ivshmem
852
Markus Armbruster5400c022016-03-15 19:34:51 +0100853With device property @option{master=on}, the guest will copy the shared
854memory on migration to the destination host. With @option{master=off},
855the guest will not be able to migrate with the device attached. In the
856latter case, the device should be detached and then reattached after
857migration using the PCI hotplug support.
Cam Macdonell6cbf4c82010-07-27 10:54:13 -0600858
Markus Armbruster62a830b2016-03-15 19:34:54 +0100859At most one of the devices sharing the same memory can be master. The
860master must complete migration before you plug back the other devices.
861
Marc-André Lureau7d4f4bd2015-10-07 16:31:47 +0200862@subsubsection ivshmem and hugepages
863
864Instead of specifying the <shm size> using POSIX shm, you may specify
865a memory backend that has hugepage support:
866
867@example
Thomas Huth664785a2019-07-30 17:08:26 +0200868@value{qemu_system_x86} -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
Markus Armbruster5400c022016-03-15 19:34:51 +0100869 -device ivshmem-plain,memdev=mb1
Marc-André Lureau7d4f4bd2015-10-07 16:31:47 +0200870@end example
871
872ivshmem-server also supports hugepages mount points with the
873@option{-m} memory path argument.
874
bellard9d4fb822004-04-26 20:55:38 +0000875@node direct_linux_boot
876@section Direct Linux Boot
bellard0806e3f2003-10-01 00:15:32 +0000877
878This section explains how to launch a Linux kernel inside QEMU without
879having to make a full bootable image. It is very useful for fast Linux
bellardee0f4752006-08-19 16:56:18 +0000880kernel testing.
bellard1eb20522003-06-25 16:21:49 +0000881
bellardee0f4752006-08-19 16:56:18 +0000882The syntax is:
bellard1eb20522003-06-25 16:21:49 +0000883@example
Thomas Huth664785a2019-07-30 17:08:26 +0200884@value{qemu_system} -kernel bzImage -hda rootdisk.img -append "root=/dev/hda"
bellard1eb20522003-06-25 16:21:49 +0000885@end example
886
bellardee0f4752006-08-19 16:56:18 +0000887Use @option{-kernel} to provide the Linux kernel image and
888@option{-append} to give the kernel command line arguments. The
889@option{-initrd} option can be used to provide an INITRD image.
890
bellardee0f4752006-08-19 16:56:18 +0000891If you do not need graphical output, you can disable it and redirect
892the virtual serial port and the QEMU monitor to the console with the
893@option{-nographic} option. The typical command line is:
bellard1eb20522003-06-25 16:21:49 +0000894@example
Thomas Huth664785a2019-07-30 17:08:26 +0200895@value{qemu_system} -kernel bzImage -hda rootdisk.img \
Stefan Weil3804da92012-05-11 22:21:50 +0200896 -append "root=/dev/hda console=ttyS0" -nographic
bellard1eb20522003-06-25 16:21:49 +0000897@end example
898
bellardee0f4752006-08-19 16:56:18 +0000899Use @key{Ctrl-a c} to switch between the serial console and the
900monitor (@pxref{pcsys_keys}).
bellardd5a0b502003-06-27 12:02:03 +0000901
bellarddebc7062006-04-30 21:58:41 +0000902@node pcsys_usb
bellardb389dbf2005-11-06 16:49:55 +0000903@section USB emulation
904
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200905QEMU can emulate a PCI UHCI, OHCI, EHCI or XHCI USB controller. You can
906plug virtual USB devices or real host USB devices (only works with certain
907host operating systems). QEMU will automatically create and connect virtual
908USB hubs as necessary to connect multiple USB devices.
bellardb389dbf2005-11-06 16:49:55 +0000909
pbrook0aff66b2006-05-26 00:49:52 +0000910@menu
911* usb_devices::
912* host_usb_devices::
913@end menu
914@node usb_devices
915@subsection Connecting USB devices
bellardb389dbf2005-11-06 16:49:55 +0000916
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200917USB devices can be connected with the @option{-device usb-...} command line
918option or the @code{device_add} monitor command. Available devices are:
bellardb389dbf2005-11-06 16:49:55 +0000919
balrogdb380c02008-01-17 22:22:45 +0000920@table @code
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200921@item usb-mouse
pbrook0aff66b2006-05-26 00:49:52 +0000922Virtual Mouse. This will override the PS/2 mouse emulation when activated.
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200923@item usb-tablet
bellardc6d46c22006-09-03 17:10:41 +0000924Pointer device that uses absolute coordinates (like a touchscreen).
Stefan Weilb65ee4f2012-05-11 22:25:50 +0200925This means QEMU is able to report the mouse position without having
pbrook0aff66b2006-05-26 00:49:52 +0000926to grab the mouse. Also overrides the PS/2 mouse emulation when activated.
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200927@item usb-storage,drive=@var{drive_id}
928Mass storage device backed by @var{drive_id} (@pxref{disk_images})
929@item usb-uas
930USB attached SCSI device, see
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +0000931@url{https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/usb-storage.txt,usb-storage.txt}
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200932for details
933@item usb-bot
934Bulk-only transport storage device, see
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +0000935@url{https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/usb-storage.txt,usb-storage.txt}
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200936for details here, too
Bandan1ee53062018-09-07 18:08:50 -0400937@item usb-mtp,rootdir=@var{dir}
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200938Media transfer protocol device, using @var{dir} as root of the file tree
939that is presented to the guest.
940@item usb-host,hostbus=@var{bus},hostaddr=@var{addr}
941Pass through the host device identified by @var{bus} and @var{addr}
942@item usb-host,vendorid=@var{vendor},productid=@var{product}
943Pass through the host device identified by @var{vendor} and @var{product} ID
944@item usb-wacom-tablet
balrogf6d2a312007-06-10 19:21:04 +0000945Virtual Wacom PenPartner tablet. This device is similar to the @code{tablet}
946above but it can be used with the tslib library because in addition to touch
947coordinates it reports touch pressure.
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200948@item usb-kbd
balrog47b2d332007-06-22 08:16:00 +0000949Standard USB keyboard. Will override the PS/2 keyboard (if present).
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200950@item usb-serial,chardev=@var{id}
balrogdb380c02008-01-17 22:22:45 +0000951Serial converter. This emulates an FTDI FT232BM chip connected to host character
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200952device @var{id}.
953@item usb-braille,chardev=@var{id}
aurel322e4d9fb2008-04-08 06:01:02 +0000954Braille device. This will use BrlAPI to display the braille output on a real
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200955or fake device referenced by @var{id}.
956@item usb-net[,netdev=@var{id}]
957Network adapter that supports CDC ethernet and RNDIS protocols. @var{id}
958specifies a netdev defined with @code{-netdev @dots{},id=@var{id}}.
balrog9ad97e62008-07-29 13:16:31 +0000959For instance, user-mode networking can be used with
balrog6c9f8862008-07-17 20:47:13 +0000960@example
Thomas Huth664785a2019-07-30 17:08:26 +0200961@value{qemu_system} [...] -netdev user,id=net0 -device usb-net,netdev=net0
balrog6c9f8862008-07-17 20:47:13 +0000962@end example
Thomas Hutha92ff8c2017-05-08 17:13:49 +0200963@item usb-ccid
964Smartcard reader device
965@item usb-audio
966USB audio device
pbrook0aff66b2006-05-26 00:49:52 +0000967@end table
bellardb389dbf2005-11-06 16:49:55 +0000968
pbrook0aff66b2006-05-26 00:49:52 +0000969@node host_usb_devices
bellardb389dbf2005-11-06 16:49:55 +0000970@subsection Using host USB devices on a Linux host
971
972WARNING: this is an experimental feature. QEMU will slow down when
973using it. USB devices requiring real time streaming (i.e. USB Video
974Cameras) are not supported yet.
975
976@enumerate
ths5fafdf22007-09-16 21:08:06 +0000977@item If you use an early Linux 2.4 kernel, verify that no Linux driver
bellardb389dbf2005-11-06 16:49:55 +0000978is actually using the USB device. A simple way to do that is simply to
979disable the corresponding kernel module by renaming it from @file{mydriver.o}
980to @file{mydriver.o.disabled}.
981
982@item Verify that @file{/proc/bus/usb} is working (most Linux distributions should enable it by default). You should see something like that:
983@example
984ls /proc/bus/usb
985001 devices drivers
986@end example
987
988@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:
989@example
990chown -R myuid /proc/bus/usb
991@end example
992
993@item Launch QEMU and do in the monitor:
ths5fafdf22007-09-16 21:08:06 +0000994@example
bellardb389dbf2005-11-06 16:49:55 +0000995info usbhost
996 Device 1.2, speed 480 Mb/s
997 Class 00: USB device 1234:5678, USB DISK
998@end example
999You should see the list of the devices you can use (Never try to use
1000hubs, it won't work).
1001
1002@item Add the device in QEMU by using:
ths5fafdf22007-09-16 21:08:06 +00001003@example
Thomas Hutha92ff8c2017-05-08 17:13:49 +02001004device_add usb-host,vendorid=0x1234,productid=0x5678
bellardb389dbf2005-11-06 16:49:55 +00001005@end example
1006
Thomas Hutha92ff8c2017-05-08 17:13:49 +02001007Normally the guest OS should report that a new USB device is plugged.
1008You can use the option @option{-device usb-host,...} to do the same.
bellardb389dbf2005-11-06 16:49:55 +00001009
1010@item Now you can try to use the host USB device in QEMU.
1011
1012@end enumerate
1013
1014When relaunching QEMU, you may have to unplug and plug again the USB
1015device to make it work again (this is a bug).
1016
thsf858dca2007-08-25 01:40:37 +00001017@node vnc_security
1018@section VNC security
1019
1020The VNC server capability provides access to the graphical console
1021of the guest VM across the network. This has a number of security
1022considerations depending on the deployment scenarios.
1023
1024@menu
1025* vnc_sec_none::
1026* vnc_sec_password::
1027* vnc_sec_certificate::
1028* vnc_sec_certificate_verify::
1029* vnc_sec_certificate_pw::
aliguori2f9606b2009-03-06 20:27:28 +00001030* vnc_sec_sasl::
1031* vnc_sec_certificate_sasl::
aliguori2f9606b2009-03-06 20:27:28 +00001032* vnc_setup_sasl::
thsf858dca2007-08-25 01:40:37 +00001033@end menu
1034@node vnc_sec_none
1035@subsection Without passwords
1036
1037The simplest VNC server setup does not include any form of authentication.
1038For this setup it is recommended to restrict it to listen on a UNIX domain
1039socket only. For example
1040
1041@example
Thomas Huth664785a2019-07-30 17:08:26 +02001042@value{qemu_system} [...OPTIONS...] -vnc unix:/home/joebloggs/.qemu-myvm-vnc
thsf858dca2007-08-25 01:40:37 +00001043@end example
1044
1045This ensures that only users on local box with read/write access to that
1046path can access the VNC server. To securely access the VNC server from a
1047remote machine, a combination of netcat+ssh can be used to provide a secure
1048tunnel.
1049
1050@node vnc_sec_password
1051@subsection With passwords
1052
1053The VNC protocol has limited support for password based authentication. Since
1054the protocol limits passwords to 8 characters it should not be considered
1055to provide high security. The password can be fairly easily brute-forced by
1056a client making repeat connections. For this reason, a VNC server using password
1057authentication should be restricted to only listen on the loopback interface
Paul Moore0f669982012-08-03 14:39:21 -04001058or UNIX domain sockets. Password authentication is not supported when operating
1059in FIPS 140-2 compliance mode as it requires the use of the DES cipher. Password
1060authentication is requested with the @code{password} option, and then once QEMU
1061is running the password is set with the monitor. Until the monitor is used to
1062set the password all clients will be rejected.
thsf858dca2007-08-25 01:40:37 +00001063
1064@example
Thomas Huth664785a2019-07-30 17:08:26 +02001065@value{qemu_system} [...OPTIONS...] -vnc :1,password -monitor stdio
thsf858dca2007-08-25 01:40:37 +00001066(qemu) change vnc password
1067Password: ********
1068(qemu)
1069@end example
1070
1071@node vnc_sec_certificate
1072@subsection With x509 certificates
1073
1074The QEMU VNC server also implements the VeNCrypt extension allowing use of
1075TLS for encryption of the session, and x509 certificates for authentication.
1076The use of x509 certificates is strongly recommended, because TLS on its
1077own is susceptible to man-in-the-middle attacks. Basic x509 certificate
1078support provides a secure session, but no authentication. This allows any
1079client to connect, and provides an encrypted session.
1080
1081@example
Thomas Huth664785a2019-07-30 17:08:26 +02001082@value{qemu_system} [...OPTIONS...] \
Daniel P. Berrangé756b9da2018-07-25 10:27:50 +01001083 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=no \
1084 -vnc :1,tls-creds=tls0 -monitor stdio
thsf858dca2007-08-25 01:40:37 +00001085@end example
1086
1087In the above example @code{/etc/pki/qemu} should contain at least three files,
1088@code{ca-cert.pem}, @code{server-cert.pem} and @code{server-key.pem}. Unprivileged
1089users will want to use a private directory, for example @code{$HOME/.pki/qemu}.
1090NB the @code{server-key.pem} file should be protected with file mode 0600 to
1091only be readable by the user owning it.
1092
1093@node vnc_sec_certificate_verify
1094@subsection With x509 certificates and client verification
1095
1096Certificates can also provide a means to authenticate the client connecting.
1097The server will request that the client provide a certificate, which it will
1098then validate against the CA certificate. This is a good choice if deploying
Daniel P. Berrangé756b9da2018-07-25 10:27:50 +01001099in an environment with a private internal certificate authority. It uses the
1100same syntax as previously, but with @code{verify-peer} set to @code{yes}
1101instead.
thsf858dca2007-08-25 01:40:37 +00001102
1103@example
Thomas Huth664785a2019-07-30 17:08:26 +02001104@value{qemu_system} [...OPTIONS...] \
Daniel P. Berrangé756b9da2018-07-25 10:27:50 +01001105 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \
1106 -vnc :1,tls-creds=tls0 -monitor stdio
thsf858dca2007-08-25 01:40:37 +00001107@end example
1108
1109
1110@node vnc_sec_certificate_pw
1111@subsection With x509 certificates, client verification and passwords
1112
1113Finally, the previous method can be combined with VNC password authentication
1114to provide two layers of authentication for clients.
1115
1116@example
Thomas Huth664785a2019-07-30 17:08:26 +02001117@value{qemu_system} [...OPTIONS...] \
Daniel P. Berrangé756b9da2018-07-25 10:27:50 +01001118 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \
1119 -vnc :1,tls-creds=tls0,password -monitor stdio
thsf858dca2007-08-25 01:40:37 +00001120(qemu) change vnc password
1121Password: ********
1122(qemu)
1123@end example
1124
aliguori2f9606b2009-03-06 20:27:28 +00001125
1126@node vnc_sec_sasl
1127@subsection With SASL authentication
1128
1129The SASL authentication method is a VNC extension, that provides an
1130easily extendable, pluggable authentication method. This allows for
1131integration with a wide range of authentication mechanisms, such as
1132PAM, GSSAPI/Kerberos, LDAP, SQL databases, one-time keys and more.
1133The strength of the authentication depends on the exact mechanism
1134configured. If the chosen mechanism also provides a SSF layer, then
1135it will encrypt the datastream as well.
1136
1137Refer to the later docs on how to choose the exact SASL mechanism
1138used for authentication, but assuming use of one supporting SSF,
1139then QEMU can be launched with:
1140
1141@example
Thomas Huth664785a2019-07-30 17:08:26 +02001142@value{qemu_system} [...OPTIONS...] -vnc :1,sasl -monitor stdio
aliguori2f9606b2009-03-06 20:27:28 +00001143@end example
1144
1145@node vnc_sec_certificate_sasl
1146@subsection With x509 certificates and SASL authentication
1147
1148If the desired SASL authentication mechanism does not supported
1149SSF layers, then it is strongly advised to run it in combination
1150with TLS and x509 certificates. This provides securely encrypted
1151data stream, avoiding risk of compromising of the security
1152credentials. This can be enabled, by combining the 'sasl' option
1153with the aforementioned TLS + x509 options:
1154
1155@example
Thomas Huth664785a2019-07-30 17:08:26 +02001156@value{qemu_system} [...OPTIONS...] \
Daniel P. Berrangé756b9da2018-07-25 10:27:50 +01001157 -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \
1158 -vnc :1,tls-creds=tls0,sasl -monitor stdio
aliguori2f9606b2009-03-06 20:27:28 +00001159@end example
1160
aliguori2f9606b2009-03-06 20:27:28 +00001161@node vnc_setup_sasl
1162
1163@subsection Configuring SASL mechanisms
1164
1165The following documentation assumes use of the Cyrus SASL implementation on a
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001166Linux host, but the principles should apply to any other SASL implementation
1167or host. When SASL is enabled, the mechanism configuration will be loaded from
1168system default SASL service config /etc/sasl2/qemu.conf. If running QEMU as an
1169unprivileged user, an environment variable SASL_CONF_PATH can be used to make
1170it search alternate locations for the service config file.
aliguori2f9606b2009-03-06 20:27:28 +00001171
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001172If the TLS option is enabled for VNC, then it will provide session encryption,
1173otherwise the SASL mechanism will have to provide encryption. In the latter
1174case the list of possible plugins that can be used is drastically reduced. In
1175fact only the GSSAPI SASL mechanism provides an acceptable level of security
1176by modern standards. Previous versions of QEMU referred to the DIGEST-MD5
1177mechanism, however, it has multiple serious flaws described in detail in
1178RFC 6331 and thus should never be used any more. The SCRAM-SHA-1 mechanism
1179provides a simple username/password auth facility similar to DIGEST-MD5, but
1180does not support session encryption, so can only be used in combination with
1181TLS.
aliguori2f9606b2009-03-06 20:27:28 +00001182
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001183When not using TLS the recommended configuration is
aliguori2f9606b2009-03-06 20:27:28 +00001184
1185@example
1186mech_list: gssapi
1187keytab: /etc/qemu/krb5.tab
1188@end example
1189
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001190This says to use the 'GSSAPI' mechanism with the Kerberos v5 protocol, with
1191the server principal stored in /etc/qemu/krb5.tab. For this to work the
1192administrator of your KDC must generate a Kerberos principal for the server,
1193with a name of 'qemu/somehost.example.com@@EXAMPLE.COM' replacing
1194'somehost.example.com' with the fully qualified host name of the machine
1195running QEMU, and 'EXAMPLE.COM' with the Kerberos Realm.
aliguori2f9606b2009-03-06 20:27:28 +00001196
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001197When using TLS, if username+password authentication is desired, then a
1198reasonable configuration is
1199
1200@example
1201mech_list: scram-sha-1
1202sasldb_path: /etc/qemu/passwd.db
1203@end example
1204
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001205The @code{saslpasswd2} program can be used to populate the @code{passwd.db}
1206file with accounts.
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001207
1208Other SASL configurations will be left as an exercise for the reader. Note that
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001209all mechanisms, except GSSAPI, should be combined with use of TLS to ensure a
Daniel P. Berrangec6a9a9f2017-03-15 11:53:22 +00001210secure data channel.
aliguori2f9606b2009-03-06 20:27:28 +00001211
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001212
1213@node network_tls
1214@section TLS setup for network services
1215
1216Almost all network services in QEMU have the ability to use TLS for
1217session data encryption, along with x509 certificates for simple
1218client authentication. What follows is a description of how to
1219generate certificates suitable for usage with QEMU, and applies to
1220the VNC server, character devices with the TCP backend, NBD server
1221and client, and migration server and client.
1222
1223At a high level, QEMU requires certificates and private keys to be
1224provided in PEM format. Aside from the core fields, the certificates
1225should include various extension data sets, including v3 basic
1226constraints data, key purpose, key usage and subject alt name.
1227
1228The GnuTLS package includes a command called @code{certtool} which can
1229be used to easily generate certificates and keys in the required format
1230with expected data present. Alternatively a certificate management
1231service may be used.
1232
1233At a minimum it is necessary to setup a certificate authority, and
1234issue certificates to each server. If using x509 certificates for
1235authentication, then each client will also need to be issued a
1236certificate.
1237
1238Assuming that the QEMU network services will only ever be exposed to
1239clients on a private intranet, there is no need to use a commercial
1240certificate authority to create certificates. A self-signed CA is
1241sufficient, and in fact likely to be more secure since it removes
1242the ability of malicious 3rd parties to trick the CA into mis-issuing
1243certs for impersonating your services. The only likely exception
1244where a commercial CA might be desirable is if enabling the VNC
1245websockets server and exposing it directly to remote browser clients.
1246In such a case it might be useful to use a commercial CA to avoid
1247needing to install custom CA certs in the web browsers.
1248
1249The recommendation is for the server to keep its certificates in either
1250@code{/etc/pki/qemu} or for unprivileged users in @code{$HOME/.pki/qemu}.
1251
1252@menu
1253* tls_generate_ca::
1254* tls_generate_server::
1255* tls_generate_client::
1256* tls_creds_setup::
Richard W.M. Jonese1a6dc92018-07-03 09:03:03 +01001257* tls_psk::
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001258@end menu
1259@node tls_generate_ca
1260@subsection Setup the Certificate Authority
1261
1262This step only needs to be performed once per organization / organizational
1263unit. First the CA needs a private key. This key must be kept VERY secret
1264and secure. If this key is compromised the entire trust chain of the certificates
1265issued with it is lost.
1266
1267@example
1268# certtool --generate-privkey > ca-key.pem
1269@end example
1270
1271To generate a self-signed certificate requires one core piece of information,
1272the name of the organization. A template file @code{ca.info} should be
1273populated with the desired data to avoid having to deal with interactive
1274prompts from certtool:
1275@example
1276# cat > ca.info <<EOF
1277cn = Name of your organization
1278ca
1279cert_signing_key
1280EOF
1281# certtool --generate-self-signed \
1282 --load-privkey ca-key.pem
1283 --template ca.info \
1284 --outfile ca-cert.pem
1285@end example
1286
1287The @code{ca} keyword in the template sets the v3 basic constraints extension
1288to indicate this certificate is for a CA, while @code{cert_signing_key} sets
1289the key usage extension to indicate this will be used for signing other keys.
1290The generated @code{ca-cert.pem} file should be copied to all servers and
1291clients wishing to utilize TLS support in the VNC server. The @code{ca-key.pem}
1292must not be disclosed/copied anywhere except the host responsible for issuing
1293certificates.
1294
1295@node tls_generate_server
1296@subsection Issuing server certificates
1297
1298Each server (or host) needs to be issued with a key and certificate. When connecting
1299the certificate is sent to the client which validates it against the CA certificate.
1300The core pieces of information for a server certificate are the hostnames and/or IP
1301addresses that will be used by clients when connecting. The hostname / IP address
1302that the client specifies when connecting will be validated against the hostname(s)
1303and IP address(es) recorded in the server certificate, and if no match is found
1304the client will close the connection.
1305
1306Thus it is recommended that the server certificate include both the fully qualified
1307and unqualified hostnames. If the server will have permanently assigned IP address(es),
1308and clients are likely to use them when connecting, they may also be included in the
1309certificate. Both IPv4 and IPv6 addresses are supported. Historically certificates
1310only included 1 hostname in the @code{CN} field, however, usage of this field for
1311validation is now deprecated. Instead modern TLS clients will validate against the
1312Subject Alt Name extension data, which allows for multiple entries. In the future
1313usage of the @code{CN} field may be discontinued entirely, so providing SAN
1314extension data is strongly recommended.
1315
1316On the host holding the CA, create template files containing the information
1317for each server, and use it to issue server certificates.
1318
1319@example
1320# cat > server-hostNNN.info <<EOF
1321organization = Name of your organization
1322cn = hostNNN.foo.example.com
1323dns_name = hostNNN
1324dns_name = hostNNN.foo.example.com
1325ip_address = 10.0.1.87
1326ip_address = 192.8.0.92
1327ip_address = 2620:0:cafe::87
1328ip_address = 2001:24::92
1329tls_www_server
1330encryption_key
1331signing_key
1332EOF
1333# certtool --generate-privkey > server-hostNNN-key.pem
1334# certtool --generate-certificate \
1335 --load-ca-certificate ca-cert.pem \
1336 --load-ca-privkey ca-key.pem \
1337 --load-privkey server-hostNNN-key.pem \
1338 --template server-hostNNN.info \
1339 --outfile server-hostNNN-cert.pem
1340@end example
1341
1342The @code{dns_name} and @code{ip_address} fields in the template are setting
1343the subject alt name extension data. The @code{tls_www_server} keyword is the
1344key purpose extension to indicate this certificate is intended for usage in
1345a web server. Although QEMU network services are not in fact HTTP servers
1346(except for VNC websockets), setting this key purpose is still recommended.
1347The @code{encryption_key} and @code{signing_key} keyword is the key usage
1348extension to indicate this certificate is intended for usage in the data
1349session.
1350
1351The @code{server-hostNNN-key.pem} and @code{server-hostNNN-cert.pem} files
1352should now be securely copied to the server for which they were generated,
1353and renamed to @code{server-key.pem} and @code{server-cert.pem} when added
1354to the @code{/etc/pki/qemu} directory on the target host. The @code{server-key.pem}
1355file is security sensitive and should be kept protected with file mode 0600
1356to prevent disclosure.
1357
1358@node tls_generate_client
1359@subsection Issuing client certificates
1360
1361The QEMU x509 TLS credential setup defaults to enabling client verification
1362using certificates, providing a simple authentication mechanism. If this
1363default is used, each client also needs to be issued a certificate. The client
1364certificate contains enough metadata to uniquely identify the client with the
1365scope of the certificate authority. The client certificate would typically
1366include fields for organization, state, city, building, etc.
1367
1368Once again on the host holding the CA, create template files containing the
1369information for each client, and use it to issue client certificates.
1370
1371
1372@example
1373# cat > client-hostNNN.info <<EOF
1374country = GB
1375state = London
1376locality = City Of London
1377organization = Name of your organization
1378cn = hostNNN.foo.example.com
1379tls_www_client
1380encryption_key
1381signing_key
1382EOF
1383# certtool --generate-privkey > client-hostNNN-key.pem
1384# certtool --generate-certificate \
1385 --load-ca-certificate ca-cert.pem \
1386 --load-ca-privkey ca-key.pem \
1387 --load-privkey client-hostNNN-key.pem \
1388 --template client-hostNNN.info \
1389 --outfile client-hostNNN-cert.pem
1390@end example
1391
1392The subject alt name extension data is not required for clients, so the
1393the @code{dns_name} and @code{ip_address} fields are not included.
1394The @code{tls_www_client} keyword is the key purpose extension to indicate
1395this certificate is intended for usage in a web client. Although QEMU
1396network clients are not in fact HTTP clients, setting this key purpose is
1397still recommended. The @code{encryption_key} and @code{signing_key} keyword
1398is the key usage extension to indicate this certificate is intended for
1399usage in the data session.
1400
1401The @code{client-hostNNN-key.pem} and @code{client-hostNNN-cert.pem} files
1402should now be securely copied to the client for which they were generated,
1403and renamed to @code{client-key.pem} and @code{client-cert.pem} when added
1404to the @code{/etc/pki/qemu} directory on the target host. The @code{client-key.pem}
1405file is security sensitive and should be kept protected with file mode 0600
1406to prevent disclosure.
1407
1408If a single host is going to be using TLS in both a client and server
1409role, it is possible to create a single certificate to cover both roles.
1410This would be quite common for the migration and NBD services, where a
1411QEMU process will be started by accepting a TLS protected incoming migration,
1412and later itself be migrated out to another host. To generate a single
1413certificate, simply include the template data from both the client and server
1414instructions in one.
1415
1416@example
1417# cat > both-hostNNN.info <<EOF
1418country = GB
1419state = London
1420locality = City Of London
1421organization = Name of your organization
1422cn = hostNNN.foo.example.com
1423dns_name = hostNNN
1424dns_name = hostNNN.foo.example.com
1425ip_address = 10.0.1.87
1426ip_address = 192.8.0.92
1427ip_address = 2620:0:cafe::87
1428ip_address = 2001:24::92
1429tls_www_server
1430tls_www_client
1431encryption_key
1432signing_key
1433EOF
1434# certtool --generate-privkey > both-hostNNN-key.pem
1435# certtool --generate-certificate \
1436 --load-ca-certificate ca-cert.pem \
1437 --load-ca-privkey ca-key.pem \
1438 --load-privkey both-hostNNN-key.pem \
1439 --template both-hostNNN.info \
1440 --outfile both-hostNNN-cert.pem
1441@end example
1442
1443When copying the PEM files to the target host, save them twice,
1444once as @code{server-cert.pem} and @code{server-key.pem}, and
1445again as @code{client-cert.pem} and @code{client-key.pem}.
1446
1447@node tls_creds_setup
1448@subsection TLS x509 credential configuration
1449
1450QEMU has a standard mechanism for loading x509 credentials that will be
1451used for network services and clients. It requires specifying the
1452@code{tls-creds-x509} class name to the @code{--object} command line
1453argument for the system emulators. Each set of credentials loaded should
1454be given a unique string identifier via the @code{id} parameter. A single
1455set of TLS credentials can be used for multiple network backends, so VNC,
1456migration, NBD, character devices can all share the same credentials. Note,
1457however, that credentials for use in a client endpoint must be loaded
1458separately from those used in a server endpoint.
1459
1460When specifying the object, the @code{dir} parameters specifies which
1461directory contains the credential files. This directory is expected to
1462contain files with the names mentioned previously, @code{ca-cert.pem},
1463@code{server-key.pem}, @code{server-cert.pem}, @code{client-key.pem}
1464and @code{client-cert.pem} as appropriate. It is also possible to
1465include a set of pre-generated Diffie-Hellman (DH) parameters in a file
1466@code{dh-params.pem}, which can be created using the
1467@code{certtool --generate-dh-params} command. If omitted, QEMU will
1468dynamically generate DH parameters when loading the credentials.
1469
1470The @code{endpoint} parameter indicates whether the credentials will
1471be used for a network client or server, and determines which PEM
1472files are loaded.
1473
1474The @code{verify} parameter determines whether x509 certificate
1475validation should be performed. This defaults to enabled, meaning
1476clients will always validate the server hostname against the
1477certificate subject alt name fields and/or CN field. It also
1478means that servers will request that clients provide a certificate
1479and validate them. Verification should never be turned off for
1480client endpoints, however, it may be turned off for server endpoints
1481if an alternative mechanism is used to authenticate clients. For
1482example, the VNC server can use SASL to authenticate clients
1483instead.
1484
1485To load server credentials with client certificate validation
1486enabled
1487
1488@example
Thomas Huth664785a2019-07-30 17:08:26 +02001489@value{qemu_system} -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001490@end example
1491
1492while to load client credentials use
1493
1494@example
Thomas Huth664785a2019-07-30 17:08:26 +02001495@value{qemu_system} -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=client
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001496@end example
1497
1498Network services which support TLS will all have a @code{tls-creds}
1499parameter which expects the ID of the TLS credentials object. For
1500example with VNC:
1501
1502@example
Thomas Huth664785a2019-07-30 17:08:26 +02001503@value{qemu_system} -vnc 0.0.0.0:0,tls-creds=tls0
Daniel P. Berrange5d19a6e2017-12-08 11:28:55 +00001504@end example
1505
Richard W.M. Jonese1a6dc92018-07-03 09:03:03 +01001506@node tls_psk
1507@subsection TLS Pre-Shared Keys (PSK)
1508
1509Instead of using certificates, you may also use TLS Pre-Shared Keys
1510(TLS-PSK). This can be simpler to set up than certificates but is
1511less scalable.
1512
1513Use the GnuTLS @code{psktool} program to generate a @code{keys.psk}
1514file containing one or more usernames and random keys:
1515
1516@example
1517mkdir -m 0700 /tmp/keys
1518psktool -u rich -p /tmp/keys/keys.psk
1519@end example
1520
1521TLS-enabled servers such as qemu-nbd can use this directory like so:
1522
1523@example
1524qemu-nbd \
1525 -t -x / \
1526 --object tls-creds-psk,id=tls0,endpoint=server,dir=/tmp/keys \
1527 --tls-creds tls0 \
1528 image.qcow2
1529@end example
1530
1531When connecting from a qemu-based client you must specify the
1532directory containing @code{keys.psk} and an optional @var{username}
1533(defaults to ``qemu''):
1534
1535@example
1536qemu-img info \
1537 --object tls-creds-psk,id=tls0,dir=/tmp/keys,username=rich,endpoint=client \
1538 --image-opts \
1539 file.driver=nbd,file.host=localhost,file.port=10809,file.tls-creds=tls0,file.export=/
1540@end example
1541
bellard0806e3f2003-10-01 00:15:32 +00001542@node gdb_usage
bellardda415d52003-06-27 18:50:50 +00001543@section GDB usage
1544
1545QEMU has a primitive support to work with gdb, so that you can do
bellard0806e3f2003-10-01 00:15:32 +00001546'Ctrl-C' while the virtual machine is running and inspect its state.
bellardda415d52003-06-27 18:50:50 +00001547
Stefan Weilb65ee4f2012-05-11 22:25:50 +02001548In order to use gdb, launch QEMU with the '-s' option. It will wait for a
bellardda415d52003-06-27 18:50:50 +00001549gdb connection:
1550@example
Thomas Huth664785a2019-07-30 17:08:26 +02001551@value{qemu_system} -s -kernel bzImage -hda rootdisk.img -append "root=/dev/hda"
bellardda415d52003-06-27 18:50:50 +00001552Connected to host network interface: tun0
1553Waiting gdb connection on port 1234
1554@end example
1555
1556Then launch gdb on the 'vmlinux' executable:
1557@example
1558> gdb vmlinux
1559@end example
1560
1561In gdb, connect to QEMU:
1562@example
bellard6c9bf892004-01-24 13:46:56 +00001563(gdb) target remote localhost:1234
bellardda415d52003-06-27 18:50:50 +00001564@end example
1565
1566Then you can use gdb normally. For example, type 'c' to launch the kernel:
1567@example
1568(gdb) c
1569@end example
1570
bellard0806e3f2003-10-01 00:15:32 +00001571Here are some useful tips in order to use gdb on system code:
1572
1573@enumerate
1574@item
1575Use @code{info reg} to display all the CPU registers.
1576@item
1577Use @code{x/10i $eip} to display the code at the PC position.
1578@item
1579Use @code{set architecture i8086} to dump 16 bit code. Then use
bellard294e8632006-05-06 14:23:06 +00001580@code{x/10i $cs*16+$eip} to dump the code at the PC position.
bellard0806e3f2003-10-01 00:15:32 +00001581@end enumerate
1582
edgar_igl60897d32008-05-09 08:25:14 +00001583Advanced debugging options:
1584
Daniel P. Berrangeb6af0972015-08-26 12:17:13 +01001585The 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:
edgar_igl94d45e42008-05-10 19:37:44 +00001586@table @code
edgar_igl60897d32008-05-09 08:25:14 +00001587@item maintenance packet qqemu.sstepbits
1588
1589This will display the MASK bits used to control the single stepping IE:
1590@example
1591(gdb) maintenance packet qqemu.sstepbits
1592sending: "qqemu.sstepbits"
1593received: "ENABLE=1,NOIRQ=2,NOTIMER=4"
1594@end example
1595@item maintenance packet qqemu.sstep
1596
1597This will display the current value of the mask used when single stepping IE:
1598@example
1599(gdb) maintenance packet qqemu.sstep
1600sending: "qqemu.sstep"
1601received: "0x7"
1602@end example
1603@item maintenance packet Qqemu.sstep=HEX_VALUE
1604
1605This will change the single step mask, so if wanted to enable IRQs on the single step, but not timers, you would use:
1606@example
1607(gdb) maintenance packet Qqemu.sstep=0x5
1608sending: "qemu.sstep=0x5"
1609received: "OK"
1610@end example
edgar_igl94d45e42008-05-10 19:37:44 +00001611@end table
edgar_igl60897d32008-05-09 08:25:14 +00001612
bellarddebc7062006-04-30 21:58:41 +00001613@node pcsys_os_specific
bellard1a084f32004-05-13 22:34:49 +00001614@section Target OS specific information
1615
1616@subsection Linux
1617
bellard15a34c62004-07-08 21:26:26 +00001618To have access to SVGA graphic modes under X11, use the @code{vesa} or
1619the @code{cirrus} X11 driver. For optimal performances, use 16 bit
1620color depth in the guest and the host OS.
bellard1a084f32004-05-13 22:34:49 +00001621
bellarde3371e62004-07-10 16:26:02 +00001622When using a 2.6 guest Linux kernel, you should add the option
1623@code{clock=pit} on the kernel command line because the 2.6 Linux
1624kernels make very strict real time clock checks by default that QEMU
1625cannot simulate exactly.
1626
bellard7c3fc842005-02-10 21:46:47 +00001627When using a 2.6 guest Linux kernel, verify that the 4G/4G patch is
1628not activated because QEMU is slower with this patch. The QEMU
1629Accelerator Module is also much slower in this case. Earlier Fedora
ths4be456f2007-06-03 13:41:28 +00001630Core 3 Linux kernel (< 2.6.9-1.724_FC3) were known to incorporate this
bellard7c3fc842005-02-10 21:46:47 +00001631patch by default. Newer kernels don't have it.
1632
bellard1a084f32004-05-13 22:34:49 +00001633@subsection Windows
1634
1635If you have a slow host, using Windows 95 is better as it gives the
1636best speed. Windows 2000 is also a good choice.
1637
bellarde3371e62004-07-10 16:26:02 +00001638@subsubsection SVGA graphic modes support
1639
1640QEMU emulates a Cirrus Logic GD5446 Video
bellard15a34c62004-07-08 21:26:26 +00001641card. All Windows versions starting from Windows 95 should recognize
1642and use this graphic card. For optimal performances, use 16 bit color
1643depth in the guest and the host OS.
bellard1a084f32004-05-13 22:34:49 +00001644
bellard3cb08532006-06-21 21:19:50 +00001645If you are using Windows XP as guest OS and if you want to use high
1646resolution modes which the Cirrus Logic BIOS does not support (i.e. >=
16471280x1024x16), then you should use the VESA VBE virtual graphic card
1648(option @option{-std-vga}).
1649
bellarde3371e62004-07-10 16:26:02 +00001650@subsubsection CPU usage reduction
1651
1652Windows 9x does not correctly use the CPU HLT
bellard15a34c62004-07-08 21:26:26 +00001653instruction. The result is that it takes host CPU cycles even when
1654idle. You can install the utility from
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +00001655@url{https://web.archive.org/web/20060212132151/http://www.user.cityline.ru/~maxamn/amnhltm.zip}
Thomas Huth3ba34a72017-03-08 13:13:25 +01001656to solve this problem. Note that no such tool is needed for NT, 2000 or XP.
bellard1a084f32004-05-13 22:34:49 +00001657
bellard9d0a8e62005-07-03 17:34:05 +00001658@subsubsection Windows 2000 disk full problem
bellarde3371e62004-07-10 16:26:02 +00001659
bellard9d0a8e62005-07-03 17:34:05 +00001660Windows 2000 has a bug which gives a disk full problem during its
1661installation. When installing it, use the @option{-win2k-hack} QEMU
1662option to enable a specific workaround. After Windows 2000 is
1663installed, you no longer need this option (this option slows down the
1664IDE transfers).
bellarde3371e62004-07-10 16:26:02 +00001665
bellard6cc721c2005-07-28 22:27:28 +00001666@subsubsection Windows 2000 shutdown
1667
1668Windows 2000 cannot automatically shutdown in QEMU although Windows 98
1669can. It comes from the fact that Windows 2000 does not automatically
1670use the APM driver provided by the BIOS.
1671
1672In order to correct that, do the following (thanks to Struan
1673Bartlett): go to the Control Panel => Add/Remove Hardware & Next =>
1674Add/Troubleshoot a device => Add a new device & Next => No, select the
1675hardware from a list & Next => NT Apm/Legacy Support & Next => Next
1676(again) a few times. Now the driver is installed and Windows 2000 now
ths5fafdf22007-09-16 21:08:06 +00001677correctly instructs QEMU to shutdown at the appropriate moment.
bellard6cc721c2005-07-28 22:27:28 +00001678
1679@subsubsection Share a directory between Unix and Windows
1680
Thomas Huthc8c6afa2016-01-13 09:21:02 +01001681See @ref{sec_invocation} about the help of the option
1682@option{'-netdev user,smb=...'}.
bellard6cc721c2005-07-28 22:27:28 +00001683
bellard2192c332006-08-21 20:28:18 +00001684@subsubsection Windows XP security problem
bellarde3371e62004-07-10 16:26:02 +00001685
1686Some releases of Windows XP install correctly but give a security
1687error when booting:
1688@example
1689A problem is preventing Windows from accurately checking the
1690license for this computer. Error code: 0x800703e6.
1691@end example
bellarde3371e62004-07-10 16:26:02 +00001692
bellard2192c332006-08-21 20:28:18 +00001693The workaround is to install a service pack for XP after a boot in safe
1694mode. Then reboot, and the problem should go away. Since there is no
1695network while in safe mode, its recommended to download the full
1696installation of SP1 or SP2 and transfer that via an ISO or using the
1697vvfat block device ("-hdb fat:directory_which_holds_the_SP").
bellarde3371e62004-07-10 16:26:02 +00001698
bellarda0a821a2004-07-14 17:38:57 +00001699@subsection MS-DOS and FreeDOS
1700
1701@subsubsection CPU usage reduction
1702
1703DOS does not correctly use the CPU HLT instruction. The result is that
Thomas Huth3ba34a72017-03-08 13:13:25 +01001704it takes host CPU cycles even when idle. You can install the utility from
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +00001705@url{https://web.archive.org/web/20051222085335/http://www.vmware.com/software/dosidle210.zip}
Thomas Huth3ba34a72017-03-08 13:13:25 +01001706to solve this problem.
bellarda0a821a2004-07-14 17:38:57 +00001707
bellarddebc7062006-04-30 21:58:41 +00001708@node QEMU System emulator for non PC targets
bellard3f9f3aa2005-12-18 20:11:37 +00001709@chapter QEMU System emulator for non PC targets
1710
1711QEMU is a generic emulator and it emulates many non PC
1712machines. Most of the options are similar to the PC emulator. The
ths4be456f2007-06-03 13:41:28 +00001713differences are mentioned in the following sections.
bellard3f9f3aa2005-12-18 20:11:37 +00001714
bellarddebc7062006-04-30 21:58:41 +00001715@menu
Stefan Weil7544a042010-02-05 23:52:03 +01001716* PowerPC System emulator::
ths24d4de42007-07-11 10:24:28 +00001717* Sparc32 System emulator::
1718* Sparc64 System emulator::
1719* MIPS System emulator::
1720* ARM System emulator::
1721* ColdFire System emulator::
Stefan Weil7544a042010-02-05 23:52:03 +01001722* Cris System emulator::
1723* Microblaze System emulator::
1724* SH4 System emulator::
Max Filippov3aeaea62011-10-10 14:48:23 +04001725* Xtensa System emulator::
bellarddebc7062006-04-30 21:58:41 +00001726@end menu
1727
Stefan Weil7544a042010-02-05 23:52:03 +01001728@node PowerPC System emulator
1729@section PowerPC System emulator
1730@cindex system emulation (PowerPC)
bellard52c00a52004-04-25 21:27:03 +00001731
Thomas Huthb2ce76a2020-01-14 12:46:17 +01001732Use the executable @file{qemu-system-ppc} to simulate a complete 40P (PREP)
bellard15a34c62004-07-08 21:26:26 +00001733or PowerMac PowerPC system.
1734
bellardb671f9e2005-04-30 15:08:33 +00001735QEMU emulates the following PowerMac peripherals:
bellard15a34c62004-07-08 21:26:26 +00001736
1737@itemize @minus
ths5fafdf22007-09-16 21:08:06 +00001738@item
blueswir1006f3a42009-02-08 15:59:36 +00001739UniNorth or Grackle PCI Bridge
bellard15a34c62004-07-08 21:26:26 +00001740@item
1741PCI VGA compatible card with VESA Bochs Extensions
ths5fafdf22007-09-16 21:08:06 +00001742@item
bellard15a34c62004-07-08 21:26:26 +000017432 PMAC IDE interfaces with hard disk and CD-ROM support
ths5fafdf22007-09-16 21:08:06 +00001744@item
bellard15a34c62004-07-08 21:26:26 +00001745NE2000 PCI adapters
1746@item
1747Non Volatile RAM
1748@item
1749VIA-CUDA with ADB keyboard and mouse.
1750@end itemize
bellard52c00a52004-04-25 21:27:03 +00001751
Thomas Huthb2ce76a2020-01-14 12:46:17 +01001752QEMU emulates the following 40P (PREP) peripherals:
bellard52c00a52004-04-25 21:27:03 +00001753
1754@itemize @minus
ths5fafdf22007-09-16 21:08:06 +00001755@item
bellard15a34c62004-07-08 21:26:26 +00001756PCI Bridge
1757@item
1758PCI VGA compatible card with VESA Bochs Extensions
ths5fafdf22007-09-16 21:08:06 +00001759@item
bellard52c00a52004-04-25 21:27:03 +000017602 IDE interfaces with hard disk and CD-ROM support
1761@item
1762Floppy disk
ths5fafdf22007-09-16 21:08:06 +00001763@item
Thomas Huthb2ce76a2020-01-14 12:46:17 +01001764PCnet network adapters
bellard52c00a52004-04-25 21:27:03 +00001765@item
1766Serial port
1767@item
1768PREP Non Volatile RAM
bellard15a34c62004-07-08 21:26:26 +00001769@item
1770PC compatible keyboard and mouse.
bellard52c00a52004-04-25 21:27:03 +00001771@end itemize
1772
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +00001773Since version 0.9.1, QEMU uses OpenBIOS @url{https://www.openbios.org/}
Thomas Huthb2ce76a2020-01-14 12:46:17 +01001774for the g3beige and mac99 PowerMac and the 40p machines. OpenBIOS is a free
1775(GPL v2) portable firmware implementation. The goal is to implement a 100%
blueswir1006f3a42009-02-08 15:59:36 +00001776IEEE 1275-1994 (referred to as Open Firmware) compliant firmware.
blueswir1992e5ac2008-12-24 20:23:51 +00001777
bellard15a34c62004-07-08 21:26:26 +00001778@c man begin OPTIONS
1779
1780The following options are specific to the PowerPC emulation:
1781
1782@table @option
1783
Kevin Wolf4e257e52009-10-09 10:58:36 +02001784@item -g @var{W}x@var{H}[x@var{DEPTH}]
bellard15a34c62004-07-08 21:26:26 +00001785
Mark Cave-Ayland340fb412014-03-17 21:46:26 +00001786Set the initial VGA graphic mode. The default is 800x600x32.
bellard15a34c62004-07-08 21:26:26 +00001787
Kevin Wolf4e257e52009-10-09 10:58:36 +02001788@item -prom-env @var{string}
blueswir195efd112008-12-24 20:26:14 +00001789
1790Set OpenBIOS variables in NVRAM, for example:
1791
1792@example
1793qemu-system-ppc -prom-env 'auto-boot?=false' \
1794 -prom-env 'boot-device=hd:2,\yaboot' \
1795 -prom-env 'boot-args=conf=hd:2,\yaboot.conf'
1796@end example
1797
bellard15a34c62004-07-08 21:26:26 +00001798@end table
1799
ths5fafdf22007-09-16 21:08:06 +00001800@c man end
bellard15a34c62004-07-08 21:26:26 +00001801
1802
bellard52c00a52004-04-25 21:27:03 +00001803More information is available at
bellard3f9f3aa2005-12-18 20:11:37 +00001804@url{http://perso.magic.fr/l_indien/qemu-ppc/}.
bellard52c00a52004-04-25 21:27:03 +00001805
ths24d4de42007-07-11 10:24:28 +00001806@node Sparc32 System emulator
1807@section Sparc32 System emulator
Stefan Weil7544a042010-02-05 23:52:03 +01001808@cindex system emulation (Sparc32)
bellarde80cfcf2004-12-19 23:18:01 +00001809
blueswir134a3d232008-10-04 20:43:39 +00001810Use the executable @file{qemu-system-sparc} to simulate the following
1811Sun4m architecture machines:
1812@itemize @minus
1813@item
1814SPARCstation 4
1815@item
1816SPARCstation 5
1817@item
1818SPARCstation 10
1819@item
1820SPARCstation 20
1821@item
1822SPARCserver 600MP
1823@item
1824SPARCstation LX
1825@item
1826SPARCstation Voyager
1827@item
1828SPARCclassic
1829@item
1830SPARCbook
1831@end itemize
bellarde80cfcf2004-12-19 23:18:01 +00001832
blueswir134a3d232008-10-04 20:43:39 +00001833The emulation is somewhat complete. SMP up to 16 CPUs is supported,
1834but Linux limits the number of usable CPUs to 4.
1835
Blue Swirl6a4e1772013-04-14 18:10:28 +00001836QEMU emulates the following sun4m peripherals:
bellarde80cfcf2004-12-19 23:18:01 +00001837
1838@itemize @minus
bellard34751872005-07-02 14:31:34 +00001839@item
Blue Swirl6a4e1772013-04-14 18:10:28 +00001840IOMMU
bellarde80cfcf2004-12-19 23:18:01 +00001841@item
Mark Cave-Ayland33632782014-03-17 21:46:25 +00001842TCX or cgthree Frame buffer
ths5fafdf22007-09-16 21:08:06 +00001843@item
bellarde80cfcf2004-12-19 23:18:01 +00001844Lance (Am7990) Ethernet
1845@item
blueswir134a3d232008-10-04 20:43:39 +00001846Non Volatile RAM M48T02/M48T08
bellarde80cfcf2004-12-19 23:18:01 +00001847@item
bellard34751872005-07-02 14:31:34 +00001848Slave I/O: timers, interrupt controllers, Zilog serial ports, keyboard
1849and power/reset logic
1850@item
1851ESP SCSI controller with hard disk and CD-ROM support
1852@item
blueswir16a3b9cc2007-11-11 17:56:38 +00001853Floppy drive (not on SS-600MP)
blueswir1a2502b52007-06-10 17:01:00 +00001854@item
1855CS4231 sound device (only on SS-5, not working yet)
bellarde80cfcf2004-12-19 23:18:01 +00001856@end itemize
1857
blueswir16a3b9cc2007-11-11 17:56:38 +00001858The number of peripherals is fixed in the architecture. Maximum
1859memory size depends on the machine type, for SS-5 it is 256MB and for
blueswir17d858922007-12-28 20:57:43 +00001860others 2047MB.
bellarde80cfcf2004-12-19 23:18:01 +00001861
bellard30a604f2006-06-14 18:35:18 +00001862Since version 0.8.2, QEMU uses OpenBIOS
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +00001863@url{https://www.openbios.org/}. OpenBIOS is a free (GPL v2) portable
bellard0986ac32006-06-14 12:36:32 +00001864firmware implementation. The goal is to implement a 100% IEEE
18651275-1994 (referred to as Open Firmware) compliant firmware.
bellard34751872005-07-02 14:31:34 +00001866
1867A sample Linux 2.6 series kernel and ram disk image are available on
blueswir134a3d232008-10-04 20:43:39 +00001868the QEMU web site. There are still issues with NetBSD and OpenBSD, but
Mark Cave-Ayland9bb9f212015-03-02 22:23:27 +00001869most kernel versions work. Please note that currently older Solaris kernels
blueswir134a3d232008-10-04 20:43:39 +00001870don't work probably due to interface issues between OpenBIOS and
1871Solaris.
bellard34751872005-07-02 14:31:34 +00001872
1873@c man begin OPTIONS
1874
blueswir1a2502b52007-06-10 17:01:00 +00001875The following options are specific to the Sparc32 emulation:
bellard34751872005-07-02 14:31:34 +00001876
1877@table @option
1878
Kevin Wolf4e257e52009-10-09 10:58:36 +02001879@item -g @var{W}x@var{H}x[x@var{DEPTH}]
bellard34751872005-07-02 14:31:34 +00001880
Mark Cave-Ayland33632782014-03-17 21:46:25 +00001881Set the initial graphics mode. For TCX, the default is 1024x768x8 with the
1882option of 1024x768x24. For cgthree, the default is 1024x768x8 with the option
1883of 1152x900x8 for people who wish to use OBP.
bellard34751872005-07-02 14:31:34 +00001884
Kevin Wolf4e257e52009-10-09 10:58:36 +02001885@item -prom-env @var{string}
blueswir166508602007-05-01 14:16:52 +00001886
1887Set OpenBIOS variables in NVRAM, for example:
1888
1889@example
1890qemu-system-sparc -prom-env 'auto-boot?=false' \
1891 -prom-env 'boot-device=sd(0,2,0):d' -prom-env 'boot-args=linux single'
1892@end example
1893
Blue Swirl6a4e1772013-04-14 18:10:28 +00001894@item -M [SS-4|SS-5|SS-10|SS-20|SS-600MP|LX|Voyager|SPARCClassic] [|SPARCbook]
blueswir1a2502b52007-06-10 17:01:00 +00001895
1896Set the emulated machine type. Default is SS-5.
1897
bellard34751872005-07-02 14:31:34 +00001898@end table
1899
ths5fafdf22007-09-16 21:08:06 +00001900@c man end
bellard34751872005-07-02 14:31:34 +00001901
ths24d4de42007-07-11 10:24:28 +00001902@node Sparc64 System emulator
1903@section Sparc64 System emulator
Stefan Weil7544a042010-02-05 23:52:03 +01001904@cindex system emulation (Sparc64)
bellard34751872005-07-02 14:31:34 +00001905
blueswir134a3d232008-10-04 20:43:39 +00001906Use the executable @file{qemu-system-sparc64} to simulate a Sun4u
1907(UltraSPARC PC-like machine), Sun4v (T1 PC-like machine), or generic
Mark Cave-Ayland9bb9f212015-03-02 22:23:27 +00001908Niagara (T1) machine. The Sun4u emulator is mostly complete, being
1909able to run Linux, NetBSD and OpenBSD in headless (-nographic) mode. The
Artyom Tarasenkoa2664ca2016-09-29 14:46:45 +02001910Sun4v emulator is still a work in progress.
1911
1912The Niagara T1 emulator makes use of firmware and OS binaries supplied in the S10image/ directory
1913of the OpenSPARC T1 project @url{http://download.oracle.com/technetwork/systems/opensparc/OpenSPARCT1_Arch.1.5.tar.bz2}
1914and is able to boot the disk.s10hw2 Solaris image.
1915@example
1916qemu-system-sparc64 -M niagara -L /path-to/S10image/ \
1917 -nographic -m 256 \
1918 -drive if=pflash,readonly=on,file=/S10image/disk.s10hw2
1919@end example
1920
bellardb7569212005-03-13 09:43:05 +00001921
blueswir1c7ba2182008-07-22 07:07:34 +00001922QEMU emulates the following peripherals:
bellard83469012005-07-23 14:27:54 +00001923
1924@itemize @minus
1925@item
ths5fafdf22007-09-16 21:08:06 +00001926UltraSparc IIi APB PCI Bridge
bellard83469012005-07-23 14:27:54 +00001927@item
1928PCI VGA compatible card with VESA Bochs Extensions
1929@item
blueswir134a3d232008-10-04 20:43:39 +00001930PS/2 mouse and keyboard
1931@item
bellard83469012005-07-23 14:27:54 +00001932Non Volatile RAM M48T59
1933@item
1934PC-compatible serial ports
blueswir1c7ba2182008-07-22 07:07:34 +00001935@item
19362 PCI IDE interfaces with hard disk and CD-ROM support
blueswir134a3d232008-10-04 20:43:39 +00001937@item
1938Floppy disk
bellard83469012005-07-23 14:27:54 +00001939@end itemize
1940
blueswir1c7ba2182008-07-22 07:07:34 +00001941@c man begin OPTIONS
1942
1943The following options are specific to the Sparc64 emulation:
1944
1945@table @option
1946
Kevin Wolf4e257e52009-10-09 10:58:36 +02001947@item -prom-env @var{string}
blueswir134a3d232008-10-04 20:43:39 +00001948
1949Set OpenBIOS variables in NVRAM, for example:
1950
1951@example
1952qemu-system-sparc64 -prom-env 'auto-boot?=false'
1953@end example
1954
Artyom Tarasenkoa2664ca2016-09-29 14:46:45 +02001955@item -M [sun4u|sun4v|niagara]
blueswir1c7ba2182008-07-22 07:07:34 +00001956
1957Set the emulated machine type. The default is sun4u.
1958
1959@end table
1960
1961@c man end
1962
ths24d4de42007-07-11 10:24:28 +00001963@node MIPS System emulator
1964@section MIPS System emulator
Stefan Weil7544a042010-02-05 23:52:03 +01001965@cindex system emulation (MIPS)
bellard9d0a8e62005-07-03 17:34:05 +00001966
Stefan Markovicf7d257c2019-01-24 16:53:55 +01001967@menu
1968* nanoMIPS System emulator ::
1969@end menu
1970
thsd9aedc32007-12-17 03:47:55 +00001971Four executables cover simulation of 32 and 64-bit MIPS systems in
1972both endian options, @file{qemu-system-mips}, @file{qemu-system-mipsel}
1973@file{qemu-system-mips64} and @file{qemu-system-mips64el}.
aurel3288cb0a02008-04-08 05:57:37 +00001974Five different machine types are emulated:
ths24d4de42007-07-11 10:24:28 +00001975
1976@itemize @minus
1977@item
1978A generic ISA PC-like machine "mips"
1979@item
1980The MIPS Malta prototype board "malta"
1981@item
thsd9aedc32007-12-17 03:47:55 +00001982An ACER Pica "pica61". This machine needs the 64-bit emulator.
ths6bf5b4e2007-10-17 13:08:32 +00001983@item
thsf0fc6f82007-10-17 13:39:42 +00001984MIPS emulator pseudo board "mipssim"
aurel3288cb0a02008-04-08 05:57:37 +00001985@item
1986A MIPS Magnum R4000 machine "magnum". This machine needs the 64-bit emulator.
ths24d4de42007-07-11 10:24:28 +00001987@end itemize
1988
1989The generic emulation is supported by Debian 'Etch' and is able to
1990install Debian into a virtual disk image. The following devices are
1991emulated:
bellard9d0a8e62005-07-03 17:34:05 +00001992
bellard3f9f3aa2005-12-18 20:11:37 +00001993@itemize @minus
ths5fafdf22007-09-16 21:08:06 +00001994@item
ths6bf5b4e2007-10-17 13:08:32 +00001995A range of MIPS CPUs, default is the 24Kf
bellard3f9f3aa2005-12-18 20:11:37 +00001996@item
1997PC style serial port
1998@item
ths24d4de42007-07-11 10:24:28 +00001999PC style IDE disk
2000@item
bellard3f9f3aa2005-12-18 20:11:37 +00002001NE2000 network card
2002@end itemize
2003
ths24d4de42007-07-11 10:24:28 +00002004The Malta emulation supports the following devices:
bellard3f9f3aa2005-12-18 20:11:37 +00002005
ths24d4de42007-07-11 10:24:28 +00002006@itemize @minus
2007@item
ths0b64d002007-07-11 21:43:14 +00002008Core board with MIPS 24Kf CPU and Galileo system controller
ths24d4de42007-07-11 10:24:28 +00002009@item
2010PIIX4 PCI/USB/SMbus controller
2011@item
2012The Multi-I/O chip's serial device
2013@item
Stefan Weil3a2eeac2009-06-06 18:05:58 +02002014PCI network cards (PCnet32 and others)
ths24d4de42007-07-11 10:24:28 +00002015@item
2016Malta FPGA serial device
2017@item
aurel321f605a72009-02-08 14:51:19 +00002018Cirrus (default) or any other PCI VGA graphics card
ths24d4de42007-07-11 10:24:28 +00002019@end itemize
2020
Aleksandar Markovicba182a12019-02-26 13:55:31 +01002021The Boston board emulation supports the following devices:
2022
2023@itemize @minus
2024@item
2025Xilinx FPGA, which includes a PCIe root port and an UART
2026@item
2027Intel EG20T PCH connects the I/O peripherals, but only the SATA bus is emulated
2028@end itemize
2029
ths24d4de42007-07-11 10:24:28 +00002030The ACER Pica emulation supports:
2031
2032@itemize @minus
2033@item
2034MIPS R4000 CPU
2035@item
2036PC-style IRQ and DMA controllers
2037@item
2038PC Keyboard
2039@item
2040IDE controller
2041@end itemize
2042
aurel3288cb0a02008-04-08 05:57:37 +00002043The MIPS Magnum R4000 emulation supports:
2044
2045@itemize @minus
2046@item
2047MIPS R4000 CPU
2048@item
2049PC-style IRQ controller
2050@item
2051PC Keyboard
2052@item
2053SCSI controller
2054@item
2055G364 framebuffer
2056@end itemize
2057
Aleksandar Markovic3a1b94d2019-02-26 13:55:30 +01002058The Fulong 2E emulation supports:
2059
2060@itemize @minus
2061@item
2062Loongson 2E CPU
2063@item
2064Bonito64 system controller as North Bridge
2065@item
2066VT82C686 chipset as South Bridge
2067@item
2068RTL8139D as a network card chipset
2069@end itemize
2070
Aleksandar Markovic53d21e72019-02-26 13:55:29 +01002071The mipssim pseudo board emulation provides an environment similar
2072to what the proprietary MIPS emulator uses for running Linux.
2073It supports:
2074
2075@itemize @minus
2076@item
2077A range of MIPS CPUs, default is the 24Kf
2078@item
2079PC style serial port
2080@item
2081MIPSnet network emulation
2082@end itemize
2083
Stefan Markovicf7d257c2019-01-24 16:53:55 +01002084@node nanoMIPS System emulator
2085@subsection nanoMIPS System emulator
2086@cindex system emulation (nanoMIPS)
2087
2088Executable @file{qemu-system-mipsel} also covers simulation of
208932-bit nanoMIPS system in little endian mode:
2090
2091@itemize @minus
2092@item
2093nanoMIPS I7200 CPU
2094@end itemize
2095
2096Example of @file{qemu-system-mipsel} usage for nanoMIPS is shown below:
2097
2098Download @code{<disk_image_file>} from @url{https://mipsdistros.mips.com/LinuxDistro/nanomips/buildroot/index.html}.
2099
2100Download @code{<kernel_image_file>} from @url{https://mipsdistros.mips.com/LinuxDistro/nanomips/kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/index.html}.
2101
2102Start system emulation of Malta board with nanoMIPS I7200 CPU:
2103@example
2104qemu-system-mipsel -cpu I7200 -kernel @code{<kernel_image_file>} \
2105 -M malta -serial stdio -m @code{<memory_size>} -hda @code{<disk_image_file>} \
2106 -append "mem=256m@@0x0 rw console=ttyS0 vga=cirrus vesa=0x111 root=/dev/sda"
2107@end example
2108
aurel3288cb0a02008-04-08 05:57:37 +00002109
ths24d4de42007-07-11 10:24:28 +00002110@node ARM System emulator
2111@section ARM System emulator
Stefan Weil7544a042010-02-05 23:52:03 +01002112@cindex system emulation (ARM)
bellard3f9f3aa2005-12-18 20:11:37 +00002113
2114Use the executable @file{qemu-system-arm} to simulate a ARM
2115machine. The ARM Integrator/CP board is emulated with the following
2116devices:
2117
2118@itemize @minus
2119@item
pbrook9ee6e8b2007-11-11 00:04:49 +00002120ARM926E, ARM1026E, ARM946E, ARM1136 or Cortex-A8 CPU
bellard3f9f3aa2005-12-18 20:11:37 +00002121@item
2122Two PL011 UARTs
ths5fafdf22007-09-16 21:08:06 +00002123@item
bellard3f9f3aa2005-12-18 20:11:37 +00002124SMC 91c111 Ethernet adapter
pbrook00a9bf12006-05-13 16:55:46 +00002125@item
2126PL110 LCD controller
2127@item
2128PL050 KMI with PS/2 keyboard and mouse.
pbrooka1bb27b2007-04-06 16:49:48 +00002129@item
2130PL181 MultiMedia Card Interface with SD card.
pbrook00a9bf12006-05-13 16:55:46 +00002131@end itemize
2132
2133The ARM Versatile baseboard is emulated with the following devices:
2134
2135@itemize @minus
2136@item
pbrook9ee6e8b2007-11-11 00:04:49 +00002137ARM926E, ARM1136 or Cortex-A8 CPU
pbrook00a9bf12006-05-13 16:55:46 +00002138@item
2139PL190 Vectored Interrupt Controller
2140@item
2141Four PL011 UARTs
ths5fafdf22007-09-16 21:08:06 +00002142@item
pbrook00a9bf12006-05-13 16:55:46 +00002143SMC 91c111 Ethernet adapter
2144@item
2145PL110 LCD controller
2146@item
2147PL050 KMI with PS/2 keyboard and mouse.
2148@item
2149PCI host bridge. Note the emulated PCI bridge only provides access to
2150PCI memory space. It does not provide access to PCI IO space.
ths4be456f2007-06-03 13:41:28 +00002151This means some devices (eg. ne2k_pci NIC) are not usable, and others
2152(eg. rtl8139 NIC) are only usable when the guest drivers use the memory
pbrook00a9bf12006-05-13 16:55:46 +00002153mapped control registers.
pbrooke6de1ba2006-06-16 21:48:48 +00002154@item
2155PCI OHCI USB controller.
2156@item
2157LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices.
pbrooka1bb27b2007-04-06 16:49:48 +00002158@item
2159PL181 MultiMedia Card Interface with SD card.
bellard3f9f3aa2005-12-18 20:11:37 +00002160@end itemize
2161
Paul Brook21a88942009-12-21 20:19:12 +00002162Several variants of the ARM RealView baseboard are emulated,
2163including the EB, PB-A8 and PBX-A9. Due to interactions with the
2164bootloader, only certain Linux kernel configurations work out
2165of the box on these boards.
2166
2167Kernels for the PB-A8 board should have CONFIG_REALVIEW_HIGH_PHYS_OFFSET
2168enabled in the kernel, and expect 512M RAM. Kernels for The PBX-A9 board
2169should have CONFIG_SPARSEMEM enabled, CONFIG_REALVIEW_HIGH_PHYS_OFFSET
2170disabled and expect 1024M RAM.
2171
Stefan Weil40c5c6c2011-01-07 18:59:16 +01002172The following devices are emulated:
pbrookd7739d72007-02-28 16:25:17 +00002173
2174@itemize @minus
2175@item
Paul Brookf7c70322009-11-19 16:45:21 +00002176ARM926E, ARM1136, ARM11MPCore, Cortex-A8 or Cortex-A9 MPCore CPU
pbrookd7739d72007-02-28 16:25:17 +00002177@item
2178ARM AMBA Generic/Distributed Interrupt Controller
2179@item
2180Four PL011 UARTs
ths5fafdf22007-09-16 21:08:06 +00002181@item
Paul Brook0ef849d2009-11-16 17:06:43 +00002182SMC 91c111 or SMSC LAN9118 Ethernet adapter
pbrookd7739d72007-02-28 16:25:17 +00002183@item
2184PL110 LCD controller
2185@item
2186PL050 KMI with PS/2 keyboard and mouse
2187@item
2188PCI host bridge
2189@item
2190PCI OHCI USB controller
2191@item
2192LSI53C895A PCI SCSI Host Bus Adapter with hard disk and CD-ROM devices
pbrooka1bb27b2007-04-06 16:49:48 +00002193@item
2194PL181 MultiMedia Card Interface with SD card.
pbrookd7739d72007-02-28 16:25:17 +00002195@end itemize
2196
balrogb00052e2007-04-30 02:22:06 +00002197The XScale-based clamshell PDA models ("Spitz", "Akita", "Borzoi"
2198and "Terrier") emulation includes the following peripherals:
2199
2200@itemize @minus
2201@item
2202Intel PXA270 System-on-chip (ARM V5TE core)
2203@item
2204NAND Flash memory
2205@item
2206IBM/Hitachi DSCM microdrive in a PXA PCMCIA slot - not in "Akita"
2207@item
2208On-chip OHCI USB controller
2209@item
2210On-chip LCD controller
2211@item
2212On-chip Real Time Clock
2213@item
2214TI ADS7846 touchscreen controller on SSP bus
2215@item
2216Maxim MAX1111 analog-digital converter on I@math{^2}C bus
2217@item
2218GPIO-connected keyboard controller and LEDs
2219@item
balrog549444e2007-05-01 17:53:37 +00002220Secure Digital card connected to PXA MMC/SD host
balrogb00052e2007-04-30 02:22:06 +00002221@item
2222Three on-chip UARTs
2223@item
2224WM8750 audio CODEC on I@math{^2}C and I@math{^2}S busses
2225@end itemize
2226
balrog02645922007-11-03 12:50:46 +00002227The Palm Tungsten|E PDA (codename "Cheetah") emulation includes the
2228following elements:
2229
2230@itemize @minus
2231@item
2232Texas Instruments OMAP310 System-on-chip (ARM 925T core)
2233@item
2234ROM and RAM memories (ROM firmware image can be loaded with -option-rom)
2235@item
2236On-chip LCD controller
2237@item
2238On-chip Real Time Clock
2239@item
2240TI TSC2102i touchscreen controller / analog-digital converter / Audio
2241CODEC, connected through MicroWire and I@math{^2}S busses
2242@item
2243GPIO-connected matrix keypad
2244@item
2245Secure Digital card connected to OMAP MMC/SD host
2246@item
2247Three on-chip UARTs
2248@end itemize
2249
balrogc30bb262008-05-18 13:01:40 +00002250Nokia N800 and N810 internet tablets (known also as RX-34 and RX-44 / 48)
2251emulation supports the following elements:
2252
2253@itemize @minus
2254@item
2255Texas Instruments OMAP2420 System-on-chip (ARM 1136 core)
2256@item
2257RAM and non-volatile OneNAND Flash memories
2258@item
2259Display connected to EPSON remote framebuffer chip and OMAP on-chip
2260display controller and a LS041y3 MIPI DBI-C controller
2261@item
2262TI TSC2301 (in N800) and TI TSC2005 (in N810) touchscreen controllers
2263driven through SPI bus
2264@item
2265National Semiconductor LM8323-controlled qwerty keyboard driven
2266through I@math{^2}C bus
2267@item
2268Secure Digital card connected to OMAP MMC/SD host
2269@item
2270Three OMAP on-chip UARTs and on-chip STI debugging console
2271@item
2272Mentor Graphics "Inventra" dual-role USB controller embedded in a TI
2273TUSB6010 chip - only USB host mode is supported
2274@item
2275TI TMP105 temperature sensor driven through I@math{^2}C bus
2276@item
2277TI TWL92230C power management companion with an RTC on I@math{^2}C bus
2278@item
2279Nokia RETU and TAHVO multi-purpose chips with an RTC, connected
2280through CBUS
2281@end itemize
2282
pbrook9ee6e8b2007-11-11 00:04:49 +00002283The Luminary Micro Stellaris LM3S811EVB emulation includes the following
2284devices:
2285
2286@itemize @minus
2287@item
2288Cortex-M3 CPU core.
2289@item
229064k Flash and 8k SRAM.
2291@item
2292Timers, UARTs, ADC and I@math{^2}C interface.
2293@item
2294OSRAM Pictiva 96x16 OLED with SSD0303 controller on I@math{^2}C bus.
2295@end itemize
2296
2297The Luminary Micro Stellaris LM3S6965EVB emulation includes the following
2298devices:
2299
2300@itemize @minus
2301@item
2302Cortex-M3 CPU core.
2303@item
2304256k Flash and 64k SRAM.
2305@item
2306Timers, UARTs, ADC, I@math{^2}C and SSI interfaces.
2307@item
2308OSRAM Pictiva 128x64 OLED with SSD0323 controller connected via SSI.
2309@end itemize
2310
balrog57cd6e92008-05-07 12:23:32 +00002311The Freecom MusicPal internet radio emulation includes the following
2312elements:
2313
2314@itemize @minus
2315@item
2316Marvell MV88W8618 ARM core.
2317@item
231832 MB RAM, 256 KB SRAM, 8 MB flash.
2319@item
2320Up to 2 16550 UARTs
2321@item
2322MV88W8xx8 Ethernet controller
2323@item
2324MV88W8618 audio controller, WM8750 CODEC and mixer
2325@item
Stefan Weile080e782010-02-05 23:52:00 +01002326128×64 display with brightness control
balrog57cd6e92008-05-07 12:23:32 +00002327@item
23282 buttons, 2 navigation wheels with button function
2329@end itemize
2330
balrog997641a2008-12-15 02:05:00 +00002331The Siemens SX1 models v1 and v2 (default) basic emulation.
Stefan Weil40c5c6c2011-01-07 18:59:16 +01002332The emulation includes the following elements:
balrog997641a2008-12-15 02:05:00 +00002333
2334@itemize @minus
2335@item
2336Texas Instruments OMAP310 System-on-chip (ARM 925T core)
2337@item
2338ROM and RAM memories (ROM firmware image can be loaded with -pflash)
2339V1
23401 Flash of 16MB and 1 Flash of 8MB
2341V2
23421 Flash of 32MB
2343@item
2344On-chip LCD controller
2345@item
2346On-chip Real Time Clock
2347@item
2348Secure Digital card connected to OMAP MMC/SD host
2349@item
2350Three on-chip UARTs
2351@end itemize
2352
bellard3f9f3aa2005-12-18 20:11:37 +00002353A Linux 2.6 test image is available on the QEMU web site. More
2354information is available in the QEMU mailing-list archive.
2355
blueswir1d2c639d2009-01-24 18:19:25 +00002356@c man begin OPTIONS
2357
2358The following options are specific to the ARM emulation:
2359
2360@table @option
2361
2362@item -semihosting
2363Enable semihosting syscall emulation.
2364
2365On ARM this implements the "Angel" interface.
2366
2367Note that this allows guest direct access to the host filesystem,
2368so should only be used with trusted guest OS.
2369
2370@end table
2371
Thomas Huthabc67eb2017-06-19 11:16:11 +02002372@c man end
2373
ths24d4de42007-07-11 10:24:28 +00002374@node ColdFire System emulator
2375@section ColdFire System emulator
Stefan Weil7544a042010-02-05 23:52:03 +01002376@cindex system emulation (ColdFire)
2377@cindex system emulation (M68K)
pbrook209a4e62007-05-23 20:16:15 +00002378
2379Use the executable @file{qemu-system-m68k} to simulate a ColdFire machine.
2380The emulator is able to boot a uClinux kernel.
pbrook707e0112007-06-04 00:50:06 +00002381
2382The M5208EVB emulation includes the following devices:
2383
2384@itemize @minus
ths5fafdf22007-09-16 21:08:06 +00002385@item
pbrook707e0112007-06-04 00:50:06 +00002386MCF5208 ColdFire V2 Microprocessor (ISA A+ with EMAC).
2387@item
2388Three Two on-chip UARTs.
2389@item
2390Fast Ethernet Controller (FEC)
2391@end itemize
2392
2393The AN5206 emulation includes the following devices:
pbrook209a4e62007-05-23 20:16:15 +00002394
2395@itemize @minus
ths5fafdf22007-09-16 21:08:06 +00002396@item
pbrook209a4e62007-05-23 20:16:15 +00002397MCF5206 ColdFire V2 Microprocessor.
2398@item
2399Two on-chip UARTs.
2400@end itemize
2401
blueswir1d2c639d2009-01-24 18:19:25 +00002402@c man begin OPTIONS
2403
Stefan Weil7544a042010-02-05 23:52:03 +01002404The following options are specific to the ColdFire emulation:
blueswir1d2c639d2009-01-24 18:19:25 +00002405
2406@table @option
2407
2408@item -semihosting
2409Enable semihosting syscall emulation.
2410
2411On M68K this implements the "ColdFire GDB" interface used by libgloss.
2412
2413Note that this allows guest direct access to the host filesystem,
2414so should only be used with trusted guest OS.
2415
2416@end table
2417
Thomas Huthabc67eb2017-06-19 11:16:11 +02002418@c man end
2419
Stefan Weil7544a042010-02-05 23:52:03 +01002420@node Cris System emulator
2421@section Cris System emulator
2422@cindex system emulation (Cris)
2423
2424TODO
2425
2426@node Microblaze System emulator
2427@section Microblaze System emulator
2428@cindex system emulation (Microblaze)
2429
2430TODO
2431
2432@node SH4 System emulator
2433@section SH4 System emulator
2434@cindex system emulation (SH4)
2435
2436TODO
2437
Max Filippov3aeaea62011-10-10 14:48:23 +04002438@node Xtensa System emulator
2439@section Xtensa System emulator
2440@cindex system emulation (Xtensa)
2441
2442Two executables cover simulation of both Xtensa endian options,
2443@file{qemu-system-xtensa} and @file{qemu-system-xtensaeb}.
2444Two different machine types are emulated:
2445
2446@itemize @minus
2447@item
2448Xtensa emulator pseudo board "sim"
2449@item
2450Avnet LX60/LX110/LX200 board
2451@end itemize
2452
Stefan Weilb5e49462011-11-13 22:24:26 +01002453The sim pseudo board emulation provides an environment similar
Max Filippov3aeaea62011-10-10 14:48:23 +04002454to one provided by the proprietary Tensilica ISS.
2455It supports:
2456
2457@itemize @minus
2458@item
2459A range of Xtensa CPUs, default is the DC232B
2460@item
2461Console and filesystem access via semihosting calls
2462@end itemize
2463
2464The Avnet LX60/LX110/LX200 emulation supports:
2465
2466@itemize @minus
2467@item
2468A range of Xtensa CPUs, default is the DC232B
2469@item
247016550 UART
2471@item
2472OpenCores 10/100 Mbps Ethernet MAC
2473@end itemize
2474
2475@c man begin OPTIONS
2476
2477The following options are specific to the Xtensa emulation:
2478
2479@table @option
2480
2481@item -semihosting
2482Enable semihosting syscall emulation.
2483
2484Xtensa semihosting provides basic file IO calls, such as open/read/write/seek/select.
2485Tensilica baremetal libc for ISS and linux platform "sim" use this interface.
2486
2487Note that this allows guest direct access to the host filesystem,
2488so should only be used with trusted guest OS.
2489
2490@end table
Thomas Huth3f2ce722017-05-22 22:53:29 +02002491
Thomas Huthabc67eb2017-06-19 11:16:11 +02002492@c man end
2493
ths5fafdf22007-09-16 21:08:06 +00002494@node QEMU User space emulator
2495@chapter QEMU User space emulator
bellard83195232007-02-05 19:42:07 +00002496
2497@menu
2498* Supported Operating Systems ::
Paolo Bonzini0722cc42016-10-06 15:22:05 +02002499* Features::
bellard83195232007-02-05 19:42:07 +00002500* Linux User space emulator::
blueswir184778502008-10-26 20:33:16 +00002501* BSD User space emulator ::
bellard83195232007-02-05 19:42:07 +00002502@end menu
2503
2504@node Supported Operating Systems
2505@section Supported Operating Systems
2506
2507The following OS are supported in user space emulation:
2508
2509@itemize @minus
2510@item
ths4be456f2007-06-03 13:41:28 +00002511Linux (referred as qemu-linux-user)
bellard83195232007-02-05 19:42:07 +00002512@item
blueswir184778502008-10-26 20:33:16 +00002513BSD (referred as qemu-bsd-user)
bellard83195232007-02-05 19:42:07 +00002514@end itemize
2515
Paolo Bonzini0722cc42016-10-06 15:22:05 +02002516@node Features
2517@section Features
2518
2519QEMU user space emulation has the following notable features:
2520
2521@table @strong
2522@item System call translation:
2523QEMU includes a generic system call translator. This means that
2524the parameters of the system calls can be converted to fix
2525endianness and 32/64-bit mismatches between hosts and targets.
2526IOCTLs can be converted too.
2527
2528@item POSIX signal handling:
2529QEMU can redirect to the running program all signals coming from
2530the host (such as @code{SIGALRM}), as well as synthesize signals from
2531virtual CPU exceptions (for example @code{SIGFPE} when the program
2532executes a division by zero).
2533
2534QEMU relies on the host kernel to emulate most signal system
2535calls, for example to emulate the signal mask. On Linux, QEMU
2536supports both normal and real-time signals.
2537
2538@item Threading:
2539On Linux, QEMU can emulate the @code{clone} syscall and create a real
2540host thread (with a separate virtual CPU) for each emulated thread.
2541Note that not all targets currently emulate atomic operations correctly.
2542x86 and ARM use a global lock in order to preserve their semantics.
2543@end table
2544
2545QEMU was conceived so that ultimately it can emulate itself. Although
2546it is not very useful, it is an important test to show the power of the
2547emulator.
2548
bellard83195232007-02-05 19:42:07 +00002549@node Linux User space emulator
2550@section Linux User space emulator
bellard386405f2003-03-23 21:28:45 +00002551
bellarddebc7062006-04-30 21:58:41 +00002552@menu
2553* Quick Start::
2554* Wine launch::
2555* Command line options::
pbrook79737e42006-06-11 16:28:41 +00002556* Other binaries::
bellarddebc7062006-04-30 21:58:41 +00002557@end menu
2558
2559@node Quick Start
bellard83195232007-02-05 19:42:07 +00002560@subsection Quick Start
bellard386405f2003-03-23 21:28:45 +00002561
bellard1f673132004-04-04 15:21:17 +00002562In order to launch a Linux process, QEMU needs the process executable
ths5fafdf22007-09-16 21:08:06 +00002563itself and all the target (x86) dynamic libraries used by it.
bellard386405f2003-03-23 21:28:45 +00002564
bellard1f673132004-04-04 15:21:17 +00002565@itemize
bellard386405f2003-03-23 21:28:45 +00002566
bellard1f673132004-04-04 15:21:17 +00002567@item On x86, you can just try to launch any process by using the native
2568libraries:
bellard386405f2003-03-23 21:28:45 +00002569
ths5fafdf22007-09-16 21:08:06 +00002570@example
bellard1f673132004-04-04 15:21:17 +00002571qemu-i386 -L / /bin/ls
2572@end example
bellardfd429f22003-03-30 20:59:46 +00002573
bellard1f673132004-04-04 15:21:17 +00002574@code{-L /} tells that the x86 dynamic linker must be searched with a
2575@file{/} prefix.
bellard1eb20522003-06-25 16:21:49 +00002576
Stefan Weilb65ee4f2012-05-11 22:25:50 +02002577@item Since QEMU is also a linux process, you can launch QEMU with
2578QEMU (NOTE: you can only do that if you compiled QEMU from the sources):
bellard1eb20522003-06-25 16:21:49 +00002579
ths5fafdf22007-09-16 21:08:06 +00002580@example
bellard1f673132004-04-04 15:21:17 +00002581qemu-i386 -L / qemu-i386 -L / /bin/ls
2582@end example
bellard386405f2003-03-23 21:28:45 +00002583
bellard1f673132004-04-04 15:21:17 +00002584@item On non x86 CPUs, you need first to download at least an x86 glibc
2585(@file{qemu-runtime-i386-XXX-.tar.gz} on the QEMU web page). Ensure that
2586@code{LD_LIBRARY_PATH} is not set:
bellard386405f2003-03-23 21:28:45 +00002587
bellard1f673132004-04-04 15:21:17 +00002588@example
ths5fafdf22007-09-16 21:08:06 +00002589unset LD_LIBRARY_PATH
bellard1f673132004-04-04 15:21:17 +00002590@end example
bellard386405f2003-03-23 21:28:45 +00002591
bellard1f673132004-04-04 15:21:17 +00002592Then you can launch the precompiled @file{ls} x86 executable:
bellard386405f2003-03-23 21:28:45 +00002593
bellard1f673132004-04-04 15:21:17 +00002594@example
2595qemu-i386 tests/i386/ls
2596@end example
Blue Swirl4c3b5a42011-01-20 20:54:21 +00002597You can look at @file{scripts/qemu-binfmt-conf.sh} so that
bellard1f673132004-04-04 15:21:17 +00002598QEMU is automatically launched by the Linux kernel when you try to
2599launch x86 executables. It requires the @code{binfmt_misc} module in the
2600Linux kernel.
bellard386405f2003-03-23 21:28:45 +00002601
bellard1f673132004-04-04 15:21:17 +00002602@item The x86 version of QEMU is also included. You can try weird things such as:
2603@example
bellarddebc7062006-04-30 21:58:41 +00002604qemu-i386 /usr/local/qemu-i386/bin/qemu-i386 \
2605 /usr/local/qemu-i386/bin/ls-i386
bellard1f673132004-04-04 15:21:17 +00002606@end example
bellard386405f2003-03-23 21:28:45 +00002607
bellard1f673132004-04-04 15:21:17 +00002608@end itemize
bellard386405f2003-03-23 21:28:45 +00002609
bellarddebc7062006-04-30 21:58:41 +00002610@node Wine launch
bellard83195232007-02-05 19:42:07 +00002611@subsection Wine launch
bellard386405f2003-03-23 21:28:45 +00002612
bellard1f673132004-04-04 15:21:17 +00002613@itemize
bellard386405f2003-03-23 21:28:45 +00002614
bellard1f673132004-04-04 15:21:17 +00002615@item Ensure that you have a working QEMU with the x86 glibc
2616distribution (see previous section). In order to verify it, you must be
2617able to do:
bellard386405f2003-03-23 21:28:45 +00002618
bellard1f673132004-04-04 15:21:17 +00002619@example
2620qemu-i386 /usr/local/qemu-i386/bin/ls-i386
2621@end example
bellard386405f2003-03-23 21:28:45 +00002622
bellard1f673132004-04-04 15:21:17 +00002623@item Download the binary x86 Wine install
ths5fafdf22007-09-16 21:08:06 +00002624(@file{qemu-XXX-i386-wine.tar.gz} on the QEMU web page).
bellard386405f2003-03-23 21:28:45 +00002625
bellard1f673132004-04-04 15:21:17 +00002626@item Configure Wine on your account. Look at the provided script
bellarddebc7062006-04-30 21:58:41 +00002627@file{/usr/local/qemu-i386/@/bin/wine-conf.sh}. Your previous
bellard1f673132004-04-04 15:21:17 +00002628@code{$@{HOME@}/.wine} directory is saved to @code{$@{HOME@}/.wine.org}.
bellard386405f2003-03-23 21:28:45 +00002629
bellard1f673132004-04-04 15:21:17 +00002630@item Then you can try the example @file{putty.exe}:
bellard386405f2003-03-23 21:28:45 +00002631
bellard1f673132004-04-04 15:21:17 +00002632@example
bellarddebc7062006-04-30 21:58:41 +00002633qemu-i386 /usr/local/qemu-i386/wine/bin/wine \
2634 /usr/local/qemu-i386/wine/c/Program\ Files/putty.exe
bellard1f673132004-04-04 15:21:17 +00002635@end example
bellard386405f2003-03-23 21:28:45 +00002636
bellard1f673132004-04-04 15:21:17 +00002637@end itemize
bellard386405f2003-03-23 21:28:45 +00002638
bellarddebc7062006-04-30 21:58:41 +00002639@node Command line options
bellard83195232007-02-05 19:42:07 +00002640@subsection Command line options
bellard386405f2003-03-23 21:28:45 +00002641
bellard1f673132004-04-04 15:21:17 +00002642@example
Sitsofe Wheeler84851402016-01-13 20:50:26 +00002643@command{qemu-i386} [@option{-h]} [@option{-d]} [@option{-L} @var{path}] [@option{-s} @var{size}] [@option{-cpu} @var{model}] [@option{-g} @var{port}] [@option{-B} @var{offset}] [@option{-R} @var{size}] @var{program} [@var{arguments}...]
bellard1f673132004-04-04 15:21:17 +00002644@end example
bellard386405f2003-03-23 21:28:45 +00002645
bellard1f673132004-04-04 15:21:17 +00002646@table @option
2647@item -h
2648Print the help
ths3b46e622007-09-17 08:09:54 +00002649@item -L path
bellard1f673132004-04-04 15:21:17 +00002650Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
2651@item -s size
2652Set the x86 stack size in bytes (default=524288)
blueswir134a3d232008-10-04 20:43:39 +00002653@item -cpu model
Peter Maydellc8057f92012-08-02 13:45:54 +01002654Select CPU model (-cpu help for list and additional feature selection)
Stefan Weilf66724c2010-07-15 22:28:02 +02002655@item -E @var{var}=@var{value}
2656Set environment @var{var} to @var{value}.
2657@item -U @var{var}
2658Remove @var{var} from the environment.
Paul Brook379f6692009-07-17 12:48:08 +01002659@item -B offset
2660Offset guest address by the specified number of bytes. This is useful when
Stefan Weil1f5c3f82010-07-11 18:34:28 +02002661the address region required by guest applications is reserved on the host.
2662This option is currently only supported on some hosts.
Paul Brook68a1c812010-05-29 02:27:35 +01002663@item -R size
2664Pre-allocate a guest virtual address space of the given size (in bytes).
Stefan Weil0d6753e2011-01-07 18:59:13 +01002665"G", "M", and "k" suffixes may be used when specifying the size.
bellard386405f2003-03-23 21:28:45 +00002666@end table
2667
bellard1f673132004-04-04 15:21:17 +00002668Debug options:
bellard386405f2003-03-23 21:28:45 +00002669
bellard1f673132004-04-04 15:21:17 +00002670@table @option
Peter Maydell989b6972013-02-26 17:52:40 +00002671@item -d item1,...
2672Activate logging of the specified items (use '-d help' for a list of log items)
bellard1f673132004-04-04 15:21:17 +00002673@item -p pagesize
2674Act as if the host page size was 'pagesize' bytes
blueswir134a3d232008-10-04 20:43:39 +00002675@item -g port
2676Wait gdb connection to port
aurel321b530a62009-04-05 20:08:59 +00002677@item -singlestep
2678Run the emulation in single step mode.
bellard1f673132004-04-04 15:21:17 +00002679@end table
bellard386405f2003-03-23 21:28:45 +00002680
balrogb01bcae2007-12-16 13:05:59 +00002681Environment variables:
2682
2683@table @env
2684@item QEMU_STRACE
2685Print system calls and arguments similar to the 'strace' program
2686(NOTE: the actual 'strace' program will not work because the user
2687space emulator hasn't implemented ptrace). At the moment this is
2688incomplete. All system calls that don't have a specific argument
2689format are printed with information for six arguments. Many
2690flag-style arguments don't have decoders and will show up as numbers.
ths5cfdf932007-12-17 03:38:26 +00002691@end table
balrogb01bcae2007-12-16 13:05:59 +00002692
pbrook79737e42006-06-11 16:28:41 +00002693@node Other binaries
bellard83195232007-02-05 19:42:07 +00002694@subsection Other binaries
pbrook79737e42006-06-11 16:28:41 +00002695
Stefan Weil7544a042010-02-05 23:52:03 +01002696@cindex user mode (Alpha)
2697@command{qemu-alpha} TODO.
2698
2699@cindex user mode (ARM)
2700@command{qemu-armeb} TODO.
2701
2702@cindex user mode (ARM)
pbrook79737e42006-06-11 16:28:41 +00002703@command{qemu-arm} is also capable of running ARM "Angel" semihosted ELF
2704binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB
2705configurations), and arm-uclinux bFLT format binaries.
2706
Stefan Weil7544a042010-02-05 23:52:03 +01002707@cindex user mode (ColdFire)
2708@cindex user mode (M68K)
pbrooke6e59062006-10-22 00:18:54 +00002709@command{qemu-m68k} is capable of running semihosted binaries using the BDM
2710(m5xxx-ram-hosted.ld) or m68k-sim (sim.ld) syscall interfaces, and
2711coldfire uClinux bFLT format binaries.
2712
pbrook79737e42006-06-11 16:28:41 +00002713The binary format is detected automatically.
2714
Stefan Weil7544a042010-02-05 23:52:03 +01002715@cindex user mode (Cris)
2716@command{qemu-cris} TODO.
2717
2718@cindex user mode (i386)
2719@command{qemu-i386} TODO.
2720@command{qemu-x86_64} TODO.
2721
2722@cindex user mode (Microblaze)
2723@command{qemu-microblaze} TODO.
2724
2725@cindex user mode (MIPS)
Aleksandar Markovic8639c5c2018-08-06 13:25:07 +02002726@command{qemu-mips} executes 32-bit big endian MIPS binaries (MIPS O32 ABI).
2727
2728@command{qemu-mipsel} executes 32-bit little endian MIPS binaries (MIPS O32 ABI).
2729
2730@command{qemu-mips64} executes 64-bit big endian MIPS binaries (MIPS N64 ABI).
2731
2732@command{qemu-mips64el} executes 64-bit little endian MIPS binaries (MIPS N64 ABI).
2733
2734@command{qemu-mipsn32} executes 32-bit big endian MIPS binaries (MIPS N32 ABI).
2735
2736@command{qemu-mipsn32el} executes 32-bit little endian MIPS binaries (MIPS N32 ABI).
Stefan Weil7544a042010-02-05 23:52:03 +01002737
Marek Vasute6717112017-01-18 23:01:46 +01002738@cindex user mode (NiosII)
2739@command{qemu-nios2} TODO.
2740
Stefan Weil7544a042010-02-05 23:52:03 +01002741@cindex user mode (PowerPC)
2742@command{qemu-ppc64abi32} TODO.
2743@command{qemu-ppc64} TODO.
2744@command{qemu-ppc} TODO.
2745
2746@cindex user mode (SH4)
2747@command{qemu-sh4eb} TODO.
2748@command{qemu-sh4} TODO.
2749
2750@cindex user mode (SPARC)
blueswir134a3d232008-10-04 20:43:39 +00002751@command{qemu-sparc} can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).
2752
blueswir1a785e422007-10-20 08:09:05 +00002753@command{qemu-sparc32plus} can execute Sparc32 and SPARC32PLUS binaries
2754(Sparc64 CPU, 32 bit ABI).
2755
2756@command{qemu-sparc64} can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and
2757SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).
2758
blueswir184778502008-10-26 20:33:16 +00002759@node BSD User space emulator
2760@section BSD User space emulator
2761
2762@menu
2763* BSD Status::
2764* BSD Quick Start::
2765* BSD Command line options::
2766@end menu
2767
2768@node BSD Status
2769@subsection BSD Status
2770
2771@itemize @minus
2772@item
2773target Sparc64 on Sparc64: Some trivial programs work.
2774@end itemize
2775
2776@node BSD Quick Start
2777@subsection Quick Start
2778
2779In order to launch a BSD process, QEMU needs the process executable
2780itself and all the target dynamic libraries used by it.
2781
2782@itemize
2783
2784@item On Sparc64, you can just try to launch any process by using the native
2785libraries:
2786
2787@example
2788qemu-sparc64 /bin/ls
2789@end example
2790
2791@end itemize
2792
2793@node BSD Command line options
2794@subsection Command line options
2795
2796@example
Sitsofe Wheeler84851402016-01-13 20:50:26 +00002797@command{qemu-sparc64} [@option{-h]} [@option{-d]} [@option{-L} @var{path}] [@option{-s} @var{size}] [@option{-bsd} @var{type}] @var{program} [@var{arguments}...]
blueswir184778502008-10-26 20:33:16 +00002798@end example
2799
2800@table @option
2801@item -h
2802Print the help
2803@item -L path
2804Set the library root path (default=/)
2805@item -s size
2806Set the stack size in bytes (default=524288)
Stefan Weilf66724c2010-07-15 22:28:02 +02002807@item -ignore-environment
2808Start with an empty environment. Without this option,
Stefan Weil40c5c6c2011-01-07 18:59:16 +01002809the initial environment is a copy of the caller's environment.
Stefan Weilf66724c2010-07-15 22:28:02 +02002810@item -E @var{var}=@var{value}
2811Set environment @var{var} to @var{value}.
2812@item -U @var{var}
2813Remove @var{var} from the environment.
blueswir184778502008-10-26 20:33:16 +00002814@item -bsd type
2815Set the type of the emulated BSD Operating system. Valid values are
2816FreeBSD, NetBSD and OpenBSD (default).
2817@end table
2818
2819Debug options:
2820
2821@table @option
Peter Maydell989b6972013-02-26 17:52:40 +00002822@item -d item1,...
2823Activate logging of the specified items (use '-d help' for a list of log items)
blueswir184778502008-10-26 20:33:16 +00002824@item -p pagesize
2825Act as if the host page size was 'pagesize' bytes
aurel321b530a62009-04-05 20:08:59 +00002826@item -singlestep
2827Run the emulation in single step mode.
blueswir184778502008-10-26 20:33:16 +00002828@end table
2829
Borislav Petkov483c6ad2018-12-20 10:07:32 -02002830@node System requirements
2831@chapter System requirements
2832
2833@section KVM kernel module
2834
2835On x86_64 hosts, the default set of CPU features enabled by the KVM accelerator
2836require the host to be running Linux v4.5 or newer.
2837
2838The OpteronG[345] CPU models require KVM support for RDTSCP, which was
2839added with Linux 4.5 which is supported by the major distros. And even
2840if RHEL7 has kernel 3.10, KVM there has the required functionality there
2841to make it close to a 4.5 or newer kernel.
Stefan Weil47eacb42010-02-05 23:52:01 +01002842
Stefan Hajnoczie8412572019-05-09 13:18:20 +01002843@include docs/security.texi
2844
Paolo Bonzini78e87792016-10-06 16:12:11 +02002845@include qemu-tech.texi
2846
Markus Armbruster44c67842018-07-16 09:32:25 +02002847@include qemu-deprecated.texi
Cédric Le Goaterefe2add2018-06-05 08:56:26 +02002848
Daniel P. Berrangé45b47132018-05-04 17:00:24 +01002849@node Supported build platforms
2850@appendix Supported build platforms
2851
2852QEMU aims to support building and executing on multiple host OS platforms.
2853This appendix outlines which platforms are the major build targets. These
2854platforms are used as the basis for deciding upon the minimum required
2855versions of 3rd party software QEMU depends on. The supported platforms
2856are the targets for automated testing performed by the project when patches
2857are submitted for review, and tested before and after merge.
2858
2859If a platform is not listed here, it does not imply that QEMU won't work.
2860If an unlisted platform has comparable software versions to a listed platform,
2861there is every expectation that it will work. Bug reports are welcome for
2862problems encountered on unlisted platforms unless they are clearly older
2863vintage than what is described here.
2864
2865Note that when considering software versions shipped in distros as support
2866targets, QEMU considers only the version number, and assumes the features in
2867that distro match the upstream release with the same version. In other words,
2868if a distro backports extra features to the software in their distro, QEMU
2869upstream code will not add explicit support for those backports, unless the
2870feature is auto-detectable in a manner that works for the upstream releases
2871too.
2872
2873The Repology site @url{https://repology.org} is a useful resource to identify
2874currently shipped versions of software in various operating systems, though
2875it does not cover all distros listed below.
2876
2877@section Linux OS
2878
2879For distributions with frequent, short-lifetime releases, the project will
2880aim to support all versions that are not end of life by their respective
2881vendors. For the purposes of identifying supported software versions, the
2882project will look at Fedora, Ubuntu, and openSUSE distros. Other short-
2883lifetime distros will be assumed to ship similar software versions.
2884
2885For distributions with long-lifetime releases, the project will aim to support
2886the most recent major version at all times. Support for the previous major
2887version will be dropped 2 years after the new major version is released. For
2888the purposes of identifying supported software versions, the project will look
2889at RHEL, Debian, Ubuntu LTS, and SLES distros. Other long-lifetime distros will
2890be assumed to ship similar software versions.
2891
2892@section Windows
2893
2894The project supports building with current versions of the MinGW toolchain,
2895hosted on Linux.
2896
2897@section macOS
2898
2899The project supports building with the two most recent versions of macOS, with
2900the current homebrew package set available.
2901
2902@section FreeBSD
2903
2904The project aims to support the all the versions which are not end of life.
2905
2906@section NetBSD
2907
2908The project aims to support the most recent major version at all times. Support
2909for the previous major version will be dropped 2 years after the new major
2910version is released.
2911
2912@section OpenBSD
2913
2914The project aims to support the all the versions which are not end of life.
2915
Stefan Weil7544a042010-02-05 23:52:03 +01002916@node License
2917@appendix License
2918
2919QEMU is a trademark of Fabrice Bellard.
2920
Thomas Huth2f8d8f02017-05-22 22:26:45 +02002921QEMU is released under the
2922@url{https://www.gnu.org/licenses/gpl-2.0.txt,GNU General Public License},
2923version 2. Parts of QEMU have specific licenses, see file
Stefan Hajnoczi70b7fba2017-11-21 12:04:35 +00002924@url{https://git.qemu.org/?p=qemu.git;a=blob_plain;f=LICENSE,LICENSE}.
Stefan Weil7544a042010-02-05 23:52:03 +01002925
bellarddebc7062006-04-30 21:58:41 +00002926@node Index
Stefan Weil7544a042010-02-05 23:52:03 +01002927@appendix Index
2928@menu
2929* Concept Index::
2930* Function Index::
2931* Keystroke Index::
2932* Program Index::
2933* Data Type Index::
2934* Variable Index::
2935@end menu
2936
2937@node Concept Index
2938@section Concept Index
2939This is the main index. Should we combine all keywords in one index? TODO
bellarddebc7062006-04-30 21:58:41 +00002940@printindex cp
2941
Stefan Weil7544a042010-02-05 23:52:03 +01002942@node Function Index
2943@section Function Index
2944This index could be used for command line options and monitor functions.
2945@printindex fn
2946
2947@node Keystroke Index
2948@section Keystroke Index
2949
2950This is a list of all keystrokes which have a special function
2951in system emulation.
2952
2953@printindex ky
2954
2955@node Program Index
2956@section Program Index
2957@printindex pg
2958
2959@node Data Type Index
2960@section Data Type Index
2961
2962This index could be used for qdev device names and options.
2963
2964@printindex tp
2965
2966@node Variable Index
2967@section Variable Index
2968@printindex vr
2969
bellarddebc7062006-04-30 21:58:41 +00002970@bye