One Hat Cyber Team
Your IP :
216.73.216.115
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
qemu-kvm
/
user
/
Edit File:
main.html
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>QEMU User space emulator — QEMU qemu-kvm-6.2.0-53.module+el8.10.0+2055+8eb7870b.4 documentation</title> <link rel="shortcut icon" href="../_static/qemu_32x32.png"/> <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Tools" href="../tools/index.html" /> <link rel="prev" title="User Mode Emulation" href="index.html" /> <script src="../_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"> <a href="../index.html" class="icon icon-home"> QEMU <img src="../_static/qemu_128x128.png" class="logo" alt="Logo"/> </a> <div class="version"> 6.2.0 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <p class="caption"><span class="caption-text">Contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../about/index.html">About QEMU</a></li> <li class="toctree-l1"><a class="reference internal" href="../system/index.html">System Emulation</a></li> <li class="toctree-l1 current"><a class="reference internal" href="index.html">User Mode Emulation</a><ul class="current"> <li class="toctree-l2 current"><a class="current reference internal" href="#">QEMU User space emulator</a><ul> <li class="toctree-l3"><a class="reference internal" href="#supported-operating-systems">Supported Operating Systems</a></li> <li class="toctree-l3"><a class="reference internal" href="#features">Features</a></li> <li class="toctree-l3"><a class="reference internal" href="#linux-user-space-emulator">Linux User space emulator</a><ul> <li class="toctree-l4"><a class="reference internal" href="#command-line-options">Command line options</a></li> <li class="toctree-l4"><a class="reference internal" href="#other-binaries">Other binaries</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="#bsd-user-space-emulator">BSD User space emulator</a><ul> <li class="toctree-l4"><a class="reference internal" href="#bsd-status">BSD Status</a></li> <li class="toctree-l4"><a class="reference internal" href="#quick-start">Quick Start</a></li> <li class="toctree-l4"><a class="reference internal" href="#id1">Command line options</a></li> </ul> </li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Tools</a></li> <li class="toctree-l1"><a class="reference internal" href="../interop/index.html">System Emulation Management and Interoperability</a></li> <li class="toctree-l1"><a class="reference internal" href="../specs/index.html">System Emulation Guest Hardware Specifications</a></li> <li class="toctree-l1"><a class="reference internal" href="../devel/index.html">Developer Information</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../index.html">QEMU</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../index.html">Docs</a> »</li> <li><a href="index.html">User Mode Emulation</a> »</li> <li>QEMU User space emulator</li> <li class="wy-breadcrumbs-aside"> <a href="https://gitlab.com/qemu-project/qemu/blob/master/docs/user/main.rst" class="fa fa-gitlab"> Edit on GitLab</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="qemu-user-space-emulator"> <h1>QEMU User space emulator<a class="headerlink" href="#qemu-user-space-emulator" title="Permalink to this headline">¶</a></h1> <div class="section" id="supported-operating-systems"> <h2>Supported Operating Systems<a class="headerlink" href="#supported-operating-systems" title="Permalink to this headline">¶</a></h2> <p>The following OS are supported in user space emulation:</p> <ul class="simple"> <li>Linux (referred as qemu-linux-user)</li> <li>BSD (referred as qemu-bsd-user)</li> </ul> </div> <div class="section" id="features"> <h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2> <p>QEMU user space emulation has the following notable features:</p> <dl class="docutils"> <dt><strong>System call translation:</strong></dt> <dd>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.</dd> <dt><strong>POSIX signal handling:</strong></dt> <dd><p class="first">QEMU can redirect to the running program all signals coming from the host (such as <code class="docutils literal notranslate"><span class="pre">SIGALRM</span></code>), as well as synthesize signals from virtual CPU exceptions (for example <code class="docutils literal notranslate"><span class="pre">SIGFPE</span></code> when the program executes a division by zero).</p> <p class="last">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.</p> </dd> <dt><strong>Threading:</strong></dt> <dd>On Linux, QEMU can emulate the <code class="docutils literal notranslate"><span class="pre">clone</span></code> 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.</dd> </dl> <p>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.</p> </div> <div class="section" id="linux-user-space-emulator"> <h2>Linux User space emulator<a class="headerlink" href="#linux-user-space-emulator" title="Permalink to this headline">¶</a></h2> <div class="section" id="command-line-options"> <h3>Command line options<a class="headerlink" href="#command-line-options" title="Permalink to this headline">¶</a></h3> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">qemu</span><span class="o">-</span><span class="n">i386</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">L</span> <span class="n">path</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">size</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">cpu</span> <span class="n">model</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">g</span> <span class="n">port</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">B</span> <span class="n">offset</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">R</span> <span class="n">size</span><span class="p">]</span> <span class="n">program</span> <span class="p">[</span><span class="n">arguments</span><span class="o">...</span><span class="p">]</span> </pre></div> </div> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">-h</span></code></dt> <dd>Print the help</dd> <dt><code class="docutils literal notranslate"><span class="pre">-L</span> <span class="pre">path</span></code></dt> <dd>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-s</span> <span class="pre">size</span></code></dt> <dd>Set the x86 stack size in bytes (default=524288)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-cpu</span> <span class="pre">model</span></code></dt> <dd>Select CPU model (-cpu help for list and additional feature selection)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-E</span> <span class="pre">var=value</span></code></dt> <dd>Set environment var to value.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-U</span> <span class="pre">var</span></code></dt> <dd>Remove var from the environment.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-B</span> <span class="pre">offset</span></code></dt> <dd>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.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-R</span> <span class="pre">size</span></code></dt> <dd>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.</dd> </dl> <p>Debug options:</p> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">-d</span> <span class="pre">item1,...</span></code></dt> <dd>Activate logging of the specified items (use ‘-d help’ for a list of log items)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">pagesize</span></code></dt> <dd>Act as if the host page size was ‘pagesize’ bytes</dd> <dt><code class="docutils literal notranslate"><span class="pre">-g</span> <span class="pre">port</span></code></dt> <dd>Wait gdb connection to port</dd> <dt><code class="docutils literal notranslate"><span class="pre">-singlestep</span></code></dt> <dd>Run the emulation in single step mode.</dd> </dl> <p>Environment variables:</p> <dl class="docutils"> <dt>QEMU_STRACE</dt> <dd>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.</dd> </dl> </div> <div class="section" id="other-binaries"> <h3>Other binaries<a class="headerlink" href="#other-binaries" title="Permalink to this headline">¶</a></h3> <ul> <li><p class="first">user mode (Alpha)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-alpha</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (Arm)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-armeb</span></code> TODO.</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-arm</span></code> 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.</li> </ul> </li> <li><p class="first">user mode (ColdFire)</p> </li> <li><p class="first">user mode (M68K)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-m68k</span></code> 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.</li> </ul> <p>The binary format is detected automatically.</p> </li> <li><p class="first">user mode (Cris)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-cris</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (i386)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-i386</span></code> TODO.</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-x86_64</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (Microblaze)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-microblaze</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (MIPS)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-mips</span></code> executes 32-bit big endian MIPS binaries (MIPS O32 ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-mipsel</span></code> executes 32-bit little endian MIPS binaries (MIPS O32 ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-mips64</span></code> executes 64-bit big endian MIPS binaries (MIPS N64 ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-mips64el</span></code> executes 64-bit little endian MIPS binaries (MIPS N64 ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-mipsn32</span></code> executes 32-bit big endian MIPS binaries (MIPS N32 ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-mipsn32el</span></code> executes 32-bit little endian MIPS binaries (MIPS N32 ABI).</li> </ul> </li> <li><p class="first">user mode (NiosII)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-nios2</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (PowerPC)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-ppc64abi32</span></code> TODO.</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-ppc64</span></code> TODO.</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-ppc</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (SH4)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-sh4eb</span></code> TODO.</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-sh4</span></code> TODO.</li> </ul> </li> <li><p class="first">user mode (SPARC)</p> <ul class="simple"> <li><code class="docutils literal notranslate"><span class="pre">qemu-sparc</span></code> can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-sparc32plus</span></code> can execute Sparc32 and SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).</li> <li><code class="docutils literal notranslate"><span class="pre">qemu-sparc64</span></code> can execute some Sparc64 (Sparc64 CPU, 64 bit ABI) and SPARC32PLUS binaries (Sparc64 CPU, 32 bit ABI).</li> </ul> </li> </ul> </div> </div> <div class="section" id="bsd-user-space-emulator"> <h2>BSD User space emulator<a class="headerlink" href="#bsd-user-space-emulator" title="Permalink to this headline">¶</a></h2> <div class="section" id="bsd-status"> <h3>BSD Status<a class="headerlink" href="#bsd-status" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li>target Sparc64 on Sparc64: Some trivial programs work.</li> </ul> </div> <div class="section" id="quick-start"> <h3>Quick Start<a class="headerlink" href="#quick-start" title="Permalink to this headline">¶</a></h3> <p>In order to launch a BSD process, QEMU needs the process executable itself and all the target dynamic libraries used by it.</p> <ul> <li><p class="first">On Sparc64, you can just try to launch any process by using the native libraries:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">qemu</span><span class="o">-</span><span class="n">sparc64</span> <span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">ls</span> </pre></div> </div> </li> </ul> </div> <div class="section" id="id1"> <h3>Command line options<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">qemu</span><span class="o">-</span><span class="n">sparc64</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">d</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">L</span> <span class="n">path</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">size</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">bsd</span> <span class="nb">type</span><span class="p">]</span> <span class="n">program</span> <span class="p">[</span><span class="n">arguments</span><span class="o">...</span><span class="p">]</span> </pre></div> </div> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">-h</span></code></dt> <dd>Print the help</dd> <dt><code class="docutils literal notranslate"><span class="pre">-L</span> <span class="pre">path</span></code></dt> <dd>Set the library root path (default=/)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-s</span> <span class="pre">size</span></code></dt> <dd>Set the stack size in bytes (default=524288)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-ignore-environment</span></code></dt> <dd>Start with an empty environment. Without this option, the initial environment is a copy of the caller’s environment.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-E</span> <span class="pre">var=value</span></code></dt> <dd>Set environment var to value.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-U</span> <span class="pre">var</span></code></dt> <dd>Remove var from the environment.</dd> <dt><code class="docutils literal notranslate"><span class="pre">-bsd</span> <span class="pre">type</span></code></dt> <dd>Set the type of the emulated BSD Operating system. Valid values are FreeBSD, NetBSD and OpenBSD (default).</dd> </dl> <p>Debug options:</p> <dl class="docutils"> <dt><code class="docutils literal notranslate"><span class="pre">-d</span> <span class="pre">item1,...</span></code></dt> <dd>Activate logging of the specified items (use ‘-d help’ for a list of log items)</dd> <dt><code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">pagesize</span></code></dt> <dd>Act as if the host page size was ‘pagesize’ bytes</dd> <dt><code class="docutils literal notranslate"><span class="pre">-singlestep</span></code></dt> <dd>Run the emulation in single step mode.</dd> </dl> </div> </div> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="../tools/index.html" class="btn btn-neutral float-right" title="Tools" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="index.html" class="btn btn-neutral" title="User Mode Emulation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> © Copyright 2021, The QEMU Project Developers. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. <!-- Empty para to force a blank line after "Built with Sphinx ..." --> <p></p> <p>This documentation is for QEMU version 6.2.0.</p> <p><a href="../about/license.html">QEMU and this manual are released under the GNU General Public License, version 2.</a></p> </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'qemu-kvm-6.2.0-53.module+el8.10.0+2055+8eb7870b.4', LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: false, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> </body> </html>
Simpan