PHP WebShell

Текущая директория: /usr/share/doc/qemu-user-static/user

Просмотр файла: main.html

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>QEMU User space emulator &mdash; QEMU Debian 1:6.2+dfsg-2ubuntu6.27 documentation</title>
      <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
      <link rel="stylesheet" href="../_static/theme_overrides.css" type="text/css" />
    <link rel="shortcut icon" href="../_static/qemu_32x32.png"/>
  
        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/underscore.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/custom.js"></script>
    <script src="../_static/js/theme.js"></script>
    <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" /> 
</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"  style="background: #802400" >
            <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="Navigation menu">
              <p class="caption" role="heading"><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="Mobile navigation menu"  style="background: #802400" >
          <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="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
          <li><a href="index.html">User Mode Emulation</a> &raquo;</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">
             
  <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>
<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><p>Linux (referred as qemu-linux-user)</p></li>
<li><p>BSD (referred as qemu-bsd-user)</p></li>
</ul>
</section>
<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>
<dt><strong>System call translation:</strong></dt><dd><p>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.</p>
</dd>
<dt><strong>POSIX signal handling:</strong></dt><dd><p>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>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><p>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.</p>
</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>
</section>
<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>
<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="simple">
<dt><code class="docutils literal notranslate"><span class="pre">-h</span></code></dt><dd><p>Print the help</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-L</span> <span class="pre">path</span></code></dt><dd><p>Set the x86 elf interpreter prefix (default=/usr/local/qemu-i386)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-s</span> <span class="pre">size</span></code></dt><dd><p>Set the x86 stack size in bytes (default=524288)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-cpu</span> <span class="pre">model</span></code></dt><dd><p>Select CPU model (-cpu help for list and additional feature
selection)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-E</span> <span class="pre">var=value</span></code></dt><dd><p>Set environment var to value.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-U</span> <span class="pre">var</span></code></dt><dd><p>Remove var from the environment.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-B</span> <span class="pre">offset</span></code></dt><dd><p>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.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-R</span> <span class="pre">size</span></code></dt><dd><p>Pre-allocate a guest virtual address space of the given size (in
bytes). &quot;G&quot;, &quot;M&quot;, and &quot;k&quot; suffixes may be used when specifying
the size.</p>
</dd>
</dl>
<p>Debug options:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">-d</span> <span class="pre">item1,...</span></code></dt><dd><p>Activate logging of the specified items (use ‘-d help’ for a list of
log items)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">pagesize</span></code></dt><dd><p>Act as if the host page size was ‘pagesize’ bytes</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-g</span> <span class="pre">port</span></code></dt><dd><p>Wait gdb connection to port</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-singlestep</span></code></dt><dd><p>Run the emulation in single step mode.</p>
</dd>
</dl>
<p>Environment variables:</p>
<dl class="simple">
<dt>QEMU_STRACE</dt><dd><p>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.</p>
</dd>
</dl>
</section>
<section id="other-binaries">
<h3>Other binaries<a class="headerlink" href="#other-binaries" title="Permalink to this headline"></a></h3>
<ul>
<li><p>user mode (Alpha)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-alpha</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (Arm)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-armeb</span></code> TODO.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-arm</span></code> is also capable of running Arm &quot;Angel&quot; semihosted ELF
binaries (as implemented by the arm-elf and arm-eabi Newlib/GDB
configurations), and arm-uclinux bFLT format binaries.</p></li>
</ul>
</li>
<li><p>user mode (ColdFire)</p></li>
<li><p>user mode (M68K)</p>
<ul class="simple">
<li><p><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.</p></li>
</ul>
<p>The binary format is detected automatically.</p>
</li>
<li><p>user mode (Cris)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-cris</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (i386)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-i386</span></code> TODO.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-x86_64</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (Microblaze)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-microblaze</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (MIPS)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mips</span></code> executes 32-bit big endian MIPS binaries (MIPS O32 ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mipsel</span></code> executes 32-bit little endian MIPS binaries (MIPS O32 ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mips64</span></code> executes 64-bit big endian MIPS binaries (MIPS N64 ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mips64el</span></code> executes 64-bit little endian MIPS binaries (MIPS N64
ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mipsn32</span></code> executes 32-bit big endian MIPS binaries (MIPS N32 ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-mipsn32el</span></code> executes 32-bit little endian MIPS binaries (MIPS N32
ABI).</p></li>
</ul>
</li>
<li><p>user mode (NiosII)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-nios2</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (PowerPC)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-ppc64abi32</span></code> TODO.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-ppc64</span></code> TODO.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-ppc</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (SH4)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-sh4eb</span></code> TODO.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-sh4</span></code> TODO.</p></li>
</ul>
</li>
<li><p>user mode (SPARC)</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-sparc</span></code> can execute Sparc32 binaries (Sparc32 CPU, 32 bit ABI).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">qemu-sparc32plus</span></code> can execute Sparc32 and SPARC32PLUS binaries
(Sparc64 CPU, 32 bit ABI).</p></li>
<li><p><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).</p></li>
</ul>
</li>
</ul>
</section>
</section>
<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>
<section id="bsd-status">
<h3>BSD Status<a class="headerlink" href="#bsd-status" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p>target Sparc64 on Sparc64: Some trivial programs work.</p></li>
</ul>
</section>
<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>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>
</section>
<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="simple">
<dt><code class="docutils literal notranslate"><span class="pre">-h</span></code></dt><dd><p>Print the help</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-L</span> <span class="pre">path</span></code></dt><dd><p>Set the library root path (default=/)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-s</span> <span class="pre">size</span></code></dt><dd><p>Set the stack size in bytes (default=524288)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-ignore-environment</span></code></dt><dd><p>Start with an empty environment. Without this option, the initial
environment is a copy of the caller’s environment.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-E</span> <span class="pre">var=value</span></code></dt><dd><p>Set environment var to value.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-U</span> <span class="pre">var</span></code></dt><dd><p>Remove var from the environment.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-bsd</span> <span class="pre">type</span></code></dt><dd><p>Set the type of the emulated BSD Operating system. Valid values are
FreeBSD, NetBSD and OpenBSD (default).</p>
</dd>
</dl>
<p>Debug options:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">-d</span> <span class="pre">item1,...</span></code></dt><dd><p>Activate logging of the specified items (use ‘-d help’ for a list of
log items)</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-p</span> <span class="pre">pagesize</span></code></dt><dd><p>Act as if the host page size was ‘pagesize’ bytes</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">-singlestep</span></code></dt><dd><p>Run the emulation in single step mode.</p>
</dd>
</dl>
</section>
</section>
</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="index.html" class="btn btn-neutral float-left" title="User Mode Emulation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <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" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2025, The QEMU Project Developers.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/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>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 

</body>
</html>

Выполнить команду


Для локальной разработки. Не используйте в интернете!