
* Update to QEMU v9.0.0 --------- Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> Signed-off-by: Ido Plat <ido.plat@ibm.com> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Lorenz Brun <lorenz@brun.one> Signed-off-by: Yao Xingtao <yaoxt.fnst@fujitsu.com> Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr> Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Avihai Horon <avihaih@nvidia.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Joonas Kankaala <joonas.a.kankaala@gmail.com> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Glenn Miles <milesg@linux.ibm.com> Signed-off-by: Oleg Sviridov <oleg.sviridov@red-soft.ru> Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> Signed-off-by: Yajun Wu <yajunw@nvidia.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> Signed-off-by: Lei Wang <lei4.wang@intel.com> Signed-off-by: Wei Wang <wei.w.wang@intel.com> Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Wafer <wafer@jaguarmicro.com> Signed-off-by: Yuxue Liu <yuxue.liu@jaguarmicro.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com> Signed-off-by: Zack Buhman <zack@buhman.org> Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Yuquan Wang wangyuquan1236@phytium.com.cn Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Signed-off-by: Cindy Lu <lulu@redhat.com> Co-authored-by: Peter Maydell <peter.maydell@linaro.org> Co-authored-by: Fabiano Rosas <farosas@suse.de> Co-authored-by: Peter Xu <peterx@redhat.com> Co-authored-by: Thomas Huth <thuth@redhat.com> Co-authored-by: Cédric Le Goater <clg@redhat.com> Co-authored-by: Zheyu Ma <zheyuma97@gmail.com> Co-authored-by: Ido Plat <ido.plat@ibm.com> Co-authored-by: Ilya Leoshkevich <iii@linux.ibm.com> Co-authored-by: Markus Armbruster <armbru@redhat.com> Co-authored-by: Marc-André Lureau <marcandre.lureau@redhat.com> Co-authored-by: Paolo Bonzini <pbonzini@redhat.com> Co-authored-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Co-authored-by: David Hildenbrand <david@redhat.com> Co-authored-by: Kevin Wolf <kwolf@redhat.com> Co-authored-by: Stefan Reiter <s.reiter@proxmox.com> Co-authored-by: Fiona Ebner <f.ebner@proxmox.com> Co-authored-by: Gregory Price <gregory.price@memverge.com> Co-authored-by: Lorenz Brun <lorenz@brun.one> Co-authored-by: Yao Xingtao <yaoxt.fnst@fujitsu.com> Co-authored-by: Philippe Mathieu-Daudé <philmd@linaro.org> Co-authored-by: Arnaud Minier <arnaud.minier@telecom-paris.fr> Co-authored-by: BALATON Zoltan <balaton@eik.bme.hu> Co-authored-by: Igor Mammedov <imammedo@redhat.com> Co-authored-by: Akihiko Odaki <akihiko.odaki@daynix.com> Co-authored-by: Richard Henderson <richard.henderson@linaro.org> Co-authored-by: Sven Schnelle <svens@stackframe.org> Co-authored-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Co-authored-by: Helge Deller <deller@kernel.org> Co-authored-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Co-authored-by: Benjamin Gray <bgray@linux.ibm.com> Co-authored-by: Nicholas Piggin <npiggin@gmail.com> Co-authored-by: Avihai Horon <avihaih@nvidia.com> Co-authored-by: Michael Tokarev <mjt@tls.msk.ru> Co-authored-by: Joonas Kankaala <joonas.a.kankaala@gmail.com> Co-authored-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Co-authored-by: Stefan Weil <sw@weilnetz.de> Co-authored-by: Dayu Liu <liu.dayu@zte.com.cn> Co-authored-by: Zhao Liu <zhao1.liu@intel.com> Co-authored-by: Glenn Miles <milesg@linux.vnet.ibm.com> Co-authored-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> Co-authored-by: Yajun Wu <yajunw@nvidia.com> Co-authored-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Co-authored-by: Pierre-Clément Tosi <ptosi@google.com> Co-authored-by: Wei Wang <wei.w.wang@intel.com> Co-authored-by: Martin Hundebøll <martin@geanix.com> Co-authored-by: Michael S. Tsirkin <mst@redhat.com> Co-authored-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Co-authored-by: Wafer <wafer@jaguarmicro.com> Co-authored-by: lyx634449800 <yuxue.liu@jaguarmicro.com> Co-authored-by: Gerd Hoffmann <kraxel@redhat.com> Co-authored-by: Nguyen Dinh Phi <phind.uet@gmail.com> Co-authored-by: Zack Buhman <zack@buhman.org> Co-authored-by: Keith Packard <keithp@keithp.com> Co-authored-by: Yuquan Wang <wangyuquan1236@phytium.com.cn> Co-authored-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Co-authored-by: Cindy Lu <lulu@redhat.com>
248 lines
6.5 KiB
ReStructuredText
248 lines
6.5 KiB
ReStructuredText
QEMU User space emulator
|
|
========================
|
|
|
|
Supported Operating Systems
|
|
---------------------------
|
|
|
|
The following OS are supported in user space emulation:
|
|
|
|
- Linux (referred as qemu-linux-user)
|
|
|
|
- BSD (referred as qemu-bsd-user)
|
|
|
|
Features
|
|
--------
|
|
|
|
QEMU user space emulation has the following notable features:
|
|
|
|
**System call translation:**
|
|
QEMU includes a generic system call translator. This means that the
|
|
parameters of the system calls can be converted to fix endianness and
|
|
32/64-bit mismatches between hosts and targets. IOCTLs can be
|
|
converted too.
|
|
|
|
**POSIX signal handling:**
|
|
QEMU can redirect to the running program all signals coming from the
|
|
host (such as ``SIGALRM``), as well as synthesize signals from
|
|
virtual CPU exceptions (for example ``SIGFPE`` when the program
|
|
executes a division by zero).
|
|
|
|
QEMU relies on the host kernel to emulate most signal system calls,
|
|
for example to emulate the signal mask. On Linux, QEMU supports both
|
|
normal and real-time signals.
|
|
|
|
**Threading:**
|
|
On Linux, QEMU can emulate the ``clone`` syscall and create a real
|
|
host thread (with a separate virtual CPU) for each emulated thread.
|
|
Note that not all targets currently emulate atomic operations
|
|
correctly. x86 and Arm use a global lock in order to preserve their
|
|
semantics.
|
|
|
|
QEMU was conceived so that ultimately it can emulate itself. Although it
|
|
is not very useful, it is an important test to show the power of the
|
|
emulator.
|
|
|
|
Linux User space emulator
|
|
-------------------------
|
|
|
|
Command line options
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
::
|
|
|
|
qemu-i386 [-h] [-d] [-L path] [-s size] [-cpu model] [-g port] [-B offset] [-R size] program [arguments...]
|
|
|
|
``-h``
|
|
Print the help
|
|
|
|
``-L path``
|
|
Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)
|
|
|
|
``-s size``
|
|
Set the x86 stack size in bytes (default=524288)
|
|
|
|
``-cpu model``
|
|
Select CPU model (-cpu help for list and additional feature
|
|
selection)
|
|
|
|
``-E var=value``
|
|
Set environment var to value.
|
|
|
|
``-U var``
|
|
Remove var from the environment.
|
|
|
|
``-B offset``
|
|
Offset guest address by the specified number of bytes. This is useful
|
|
when the address region required by guest applications is reserved on
|
|
the host. This option is currently only supported on some hosts.
|
|
|
|
``-R size``
|
|
Pre-allocate a guest virtual address space of the given size (in
|
|
bytes). \"G\", \"M\", and \"k\" suffixes may be used when specifying
|
|
the size.
|
|
|
|
Debug options:
|
|
|
|
``-d item1,...``
|
|
Activate logging of the specified items (use '-d help' for a list of
|
|
log items)
|
|
|
|
``-g port``
|
|
Wait gdb connection to port
|
|
|
|
``-one-insn-per-tb``
|
|
Run the emulation with one guest instruction per translation block.
|
|
This slows down emulation a lot, but can be useful in some situations,
|
|
such as when trying to analyse the logs produced by the ``-d`` option.
|
|
|
|
Environment variables:
|
|
|
|
QEMU_STRACE
|
|
Print system calls and arguments similar to the 'strace' program
|
|
(NOTE: the actual 'strace' program will not work because the user
|
|
space emulator hasn't implemented ptrace). At the moment this is
|
|
incomplete. All system calls that don't have a specific argument
|
|
format are printed with information for six arguments. Many
|
|
flag-style arguments don't have decoders and will show up as numbers.
|
|
|
|
Other binaries
|
|
~~~~~~~~~~~~~~
|
|
|
|
- user mode (Alpha)
|
|
|
|
* ``qemu-alpha`` TODO.
|
|
|
|
- user mode (Arm)
|
|
|
|
* ``qemu-armeb`` TODO.
|
|
|
|
* ``qemu-arm`` is also capable of running Arm \"Angel\" semihosted ELF
|
|
binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB
|
|
configurations), and arm-uclinux bFLT format binaries.
|
|
|
|
- user mode (ColdFire)
|
|
|
|
- user mode (M68K)
|
|
|
|
* ``qemu-m68k`` is capable of running semihosted binaries using the BDM
|
|
(m5xxx-ram-hosted.ld) or m68k-sim (sim.ld) syscall interfaces, and
|
|
coldfire uClinux bFLT format binaries.
|
|
|
|
The binary format is detected automatically.
|
|
|
|
- user mode (Cris)
|
|
|
|
* ``qemu-cris`` TODO.
|
|
|
|
- user mode (i386)
|
|
|
|
* ``qemu-i386`` TODO.
|
|
* ``qemu-x86_64`` TODO.
|
|
|
|
- user mode (Microblaze)
|
|
|
|
* ``qemu-microblaze`` TODO.
|
|
|
|
- user mode (MIPS)
|
|
|
|
* ``qemu-mips`` executes 32-bit big endian MIPS binaries (MIPS O32 ABI).
|
|
|
|
* ``qemu-mipsel`` executes 32-bit little endian MIPS binaries (MIPS O32 ABI).
|
|
|
|
* ``qemu-mips64`` executes 64-bit big endian MIPS binaries (MIPS N64 ABI).
|
|
|
|
* ``qemu-mips64el`` executes 64-bit little endian MIPS binaries (MIPS N64
|
|
ABI).
|
|
|
|
* ``qemu-mipsn32`` executes 32-bit big endian MIPS binaries (MIPS N32 ABI).
|
|
|
|
* ``qemu-mipsn32el`` executes 32-bit little endian MIPS binaries (MIPS N32
|
|
ABI).
|
|
|
|
- user mode (NiosII)
|
|
|
|
* ``qemu-nios2`` TODO.
|
|
|
|
- user mode (PowerPC)
|
|
|
|
* ``qemu-ppc64`` TODO.
|
|
* ``qemu-ppc`` TODO.
|
|
|
|
- user mode (SH4)
|
|
|
|
* ``qemu-sh4eb`` TODO.
|
|
* ``qemu-sh4`` TODO.
|
|
|
|
- user mode (SPARC)
|
|
|
|
* ``qemu-sparc`` can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).
|
|
|
|
* ``qemu-sparc32plus`` can execute Sparc32 and SPARC32PLUS binaries
|
|
(Sparc64 CPU, 32 bit ABI).
|
|
|
|
* ``qemu-sparc64`` can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and
|
|
SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).
|
|
|
|
BSD User space emulator
|
|
-----------------------
|
|
|
|
BSD Status
|
|
~~~~~~~~~~
|
|
|
|
- target Sparc64 on Sparc64: Some trivial programs work.
|
|
|
|
Quick Start
|
|
~~~~~~~~~~~
|
|
|
|
In order to launch a BSD process, QEMU needs the process executable
|
|
itself and all the target dynamic libraries used by it.
|
|
|
|
- On Sparc64, you can just try to launch any process by using the
|
|
native libraries::
|
|
|
|
qemu-sparc64 /bin/ls
|
|
|
|
Command line options
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
::
|
|
|
|
qemu-sparc64 [-h] [-d] [-L path] [-s size] [-bsd type] program [arguments...]
|
|
|
|
``-h``
|
|
Print the help
|
|
|
|
``-L path``
|
|
Set the library root path (default=/)
|
|
|
|
``-s size``
|
|
Set the stack size in bytes (default=524288)
|
|
|
|
``-ignore-environment``
|
|
Start with an empty environment. Without this option, the initial
|
|
environment is a copy of the caller's environment.
|
|
|
|
``-E var=value``
|
|
Set environment var to value.
|
|
|
|
``-U var``
|
|
Remove var from the environment.
|
|
|
|
``-bsd type``
|
|
Set the type of the emulated BSD Operating system. Valid values are
|
|
FreeBSD, NetBSD and OpenBSD (default).
|
|
|
|
Debug options:
|
|
|
|
``-d item1,...``
|
|
Activate logging of the specified items (use '-d help' for a list of
|
|
log items)
|
|
|
|
``-p pagesize``
|
|
Act as if the host page size was 'pagesize' bytes
|
|
|
|
``-one-insn-per-tb``
|
|
Run the emulation with one guest instruction per translation block.
|
|
This slows down emulation a lot, but can be useful in some situations,
|
|
such as when trying to analyse the logs produced by the ``-d`` option.
|