Mini Shell

Direktori : /proc/self/root/usr/share/doc/qemu-kvm/interop/
Upload File :
Current File : //proc/self/root/usr/share/doc/qemu-kvm/interop/vhost-user-gpu.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>Vhost-user-gpu Protocol &mdash; QEMU qemu-kvm-6.2.0-53.module_el8.10.0+4110+4a319788.6 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="Vhost-vdpa Protocol" href="vhost-vdpa.html" />
    <link rel="prev" title="Vhost-user Protocol" href="vhost-user.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"><a class="reference internal" href="../user/index.html">User Mode Emulation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Tools</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">System Emulation Management and Interoperability</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="barrier.html">Barrier client protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="bitmaps.html">Dirty Bitmaps and Incremental Backup</a></li>
<li class="toctree-l2"><a class="reference internal" href="dbus.html">D-Bus</a></li>
<li class="toctree-l2"><a class="reference internal" href="dbus-vmstate.html">D-Bus VMState</a></li>
<li class="toctree-l2"><a class="reference internal" href="live-block-operations.html">Live Block Device Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="pr-helper.html">Persistent reservation helper protocol</a></li>
<li class="toctree-l2"><a class="reference internal" href="qemu-ga.html">QEMU Guest Agent</a></li>
<li class="toctree-l2"><a class="reference internal" href="qemu-ga-ref.html">QEMU Guest Agent Protocol Reference</a></li>
<li class="toctree-l2"><a class="reference internal" href="qemu-qmp-ref.html">QEMU QMP Reference Manual</a></li>
<li class="toctree-l2"><a class="reference internal" href="qemu-storage-daemon-qmp-ref.html">QEMU Storage Daemon QMP Reference Manual</a></li>
<li class="toctree-l2"><a class="reference internal" href="vhost-user.html">Vhost-user Protocol</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Vhost-user-gpu Protocol</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#introduction">Introduction</a></li>
<li class="toctree-l3"><a class="reference internal" href="#wire-format">Wire format</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#header">Header</a></li>
<li class="toctree-l4"><a class="reference internal" href="#payload-types">Payload types</a></li>
<li class="toctree-l4"><a class="reference internal" href="#c-structure">C structure</a></li>
<li class="toctree-l4"><a class="reference internal" href="#protocol-features">Protocol features</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#communication">Communication</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#message-types">Message types</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="vhost-vdpa.html">Vhost-vdpa Protocol</a></li>
</ul>
</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> &raquo;</li>
        
          <li><a href="index.html">System Emulation Management and Interoperability</a> &raquo;</li>
        
      <li>Vhost-user-gpu Protocol</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://gitlab.com/qemu-project/qemu/blob/master/docs/interop/vhost-user-gpu.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="vhost-user-gpu-protocol">
<h1><a class="toc-backref" href="#id1">Vhost-user-gpu Protocol</a><a class="headerlink" href="#vhost-user-gpu-protocol" title="Permalink to this headline">¶</a></h1>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#vhost-user-gpu-protocol" id="id1">Vhost-user-gpu Protocol</a><ul>
<li><a class="reference internal" href="#introduction" id="id2">Introduction</a></li>
<li><a class="reference internal" href="#wire-format" id="id3">Wire format</a><ul>
<li><a class="reference internal" href="#header" id="id4">Header</a></li>
<li><a class="reference internal" href="#payload-types" id="id5">Payload types</a><ul>
<li><a class="reference internal" href="#vhostusergpucursorpos" id="id6">VhostUserGpuCursorPos</a></li>
<li><a class="reference internal" href="#vhostusergpucursorupdate" id="id7">VhostUserGpuCursorUpdate</a></li>
<li><a class="reference internal" href="#vhostusergpuscanout" id="id8">VhostUserGpuScanout</a></li>
<li><a class="reference internal" href="#vhostusergpuupdate" id="id9">VhostUserGpuUpdate</a></li>
<li><a class="reference internal" href="#vhostusergpudmabufscanout" id="id10">VhostUserGpuDMABUFScanout</a></li>
</ul>
</li>
<li><a class="reference internal" href="#c-structure" id="id11">C structure</a></li>
<li><a class="reference internal" href="#protocol-features" id="id12">Protocol features</a></li>
</ul>
</li>
<li><a class="reference internal" href="#communication" id="id13">Communication</a><ul>
<li><a class="reference internal" href="#message-types" id="id14">Message types</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id2">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>The vhost-user-gpu protocol is aiming at sharing the rendering result
of a virtio-gpu, done from a vhost-user slave process to a vhost-user
master process (such as QEMU). It bears a resemblance to a display
server protocol, if you consider QEMU as the display server and the
slave as the client, but in a very limited way. Typically, it will
work by setting a scanout/display configuration, before sending flush
events for the display updates. It will also update the cursor shape
and position.</p>
<p>The protocol is sent over a UNIX domain stream socket, since it uses
socket ancillary data to share opened file descriptors (DMABUF fds or
shared memory). The socket is usually obtained via
<code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_SET_SOCKET</span></code>.</p>
<p>Requests are sent by the <em>slave</em>, and the optional replies by the
<em>master</em>.</p>
</div>
<div class="section" id="wire-format">
<h2><a class="toc-backref" href="#id3">Wire format</a><a class="headerlink" href="#wire-format" title="Permalink to this headline">¶</a></h2>
<p>Unless specified differently, numbers are in the machine native byte
order.</p>
<p>A vhost-user-gpu message (request and reply) consists of 3 header
fields and a payload.</p>
<table border="1" class="docutils">
<colgroup>
<col width="29%" />
<col width="23%" />
<col width="19%" />
<col width="29%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>request</td>
<td>flags</td>
<td>size</td>
<td>payload</td>
</tr>
</tbody>
</table>
<div class="section" id="header">
<h3><a class="toc-backref" href="#id4">Header</a><a class="headerlink" href="#header" title="Permalink to this headline">¶</a></h3>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">request:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, type of the request</p>
</td>
</tr>
<tr class="field-even field"><th class="field-name">flags:</th><td class="field-body"><p class="first"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, 32-bit bit field:</p>
<ul class="simple">
<li>Bit 2 is the reply flag - needs to be set on each reply</li>
</ul>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">size:</th><td class="field-body"><p class="first last"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, size of the payload</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="payload-types">
<h3><a class="toc-backref" href="#id5">Payload types</a><a class="headerlink" href="#payload-types" title="Permalink to this headline">¶</a></h3>
<p>Depending on the request type, <strong>payload</strong> can be:</p>
<div class="section" id="vhostusergpucursorpos">
<h4><a class="toc-backref" href="#id6">VhostUserGpuCursorPos</a><a class="headerlink" href="#vhostusergpucursorpos" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="67%" />
<col width="17%" />
<col width="17%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>scanout-id</td>
<td>x</td>
<td>y</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">scanout-id:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout where the cursor is located</td>
</tr>
<tr class="field-even field"><th class="field-name">x/y:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the cursor position</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="vhostusergpucursorupdate">
<h4><a class="toc-backref" href="#id7">VhostUserGpuCursorUpdate</a><a class="headerlink" href="#vhostusergpucursorupdate" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="26%" />
<col width="26%" />
<col width="30%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>pos</td>
<td>hot_x</td>
<td>hot_y</td>
<td>cursor</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">pos:</th><td class="field-body">a <code class="docutils literal notranslate"><span class="pre">VhostUserGpuCursorPos</span></code>, the cursor location</td>
</tr>
<tr class="field-even field"><th class="field-name">hot_x/hot_y:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the cursor hot location</td>
</tr>
<tr class="field-odd field"><th class="field-name">cursor:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">[u32;</span> <span class="pre">64</span> <span class="pre">*</span> <span class="pre">64]</span></code>, 64x64 RGBA cursor data (PIXMAN_a8r8g8b8 format)</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="vhostusergpuscanout">
<h4><a class="toc-backref" href="#id8">VhostUserGpuScanout</a><a class="headerlink" href="#vhostusergpuscanout" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="67%" />
<col width="17%" />
<col width="17%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>scanout-id</td>
<td>w</td>
<td>h</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">scanout-id:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout configuration to set</td>
</tr>
<tr class="field-even field"><th class="field-name">w/h:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout width/height size</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="vhostusergpuupdate">
<h4><a class="toc-backref" href="#id9">VhostUserGpuUpdate</a><a class="headerlink" href="#vhostusergpuupdate" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="40%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="20%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>scanout-id</td>
<td>x</td>
<td>y</td>
<td>w</td>
<td>h</td>
<td>data</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">scanout-id:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout content to update</td>
</tr>
<tr class="field-even field"><th class="field-name">x/y/w/h:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, region of the update</td>
</tr>
<tr class="field-odd field"><th class="field-name">data:</th><td class="field-body">RGB data (PIXMAN_x8r8g8b8 format)</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="vhostusergpudmabufscanout">
<h4><a class="toc-backref" href="#id10">VhostUserGpuDMABUFScanout</a><a class="headerlink" href="#vhostusergpudmabufscanout" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="5%" />
<col width="5%" />
<col width="5%" />
<col width="5%" />
<col width="9%" />
<col width="9%" />
<col width="14%" />
<col width="12%" />
<col width="14%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>scanout-id</td>
<td>x</td>
<td>y</td>
<td>w</td>
<td>h</td>
<td>fdw</td>
<td>fwh</td>
<td>stride</td>
<td>flags</td>
<td>fourcc</td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">scanout-id:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout configuration to set</td>
</tr>
<tr class="field-even field"><th class="field-name">x/y:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the location of the scanout within the DMABUF</td>
</tr>
<tr class="field-odd field"><th class="field-name">w/h:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the scanout width/height size</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">fdw/fdh/stride/flags:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u32</span></code>, the DMABUF width/height/stride/flags</td>
</tr>
<tr class="field-odd field"><th class="field-name">fourcc:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">i32</span></code>, the DMABUF fourcc</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="c-structure">
<h3><a class="toc-backref" href="#id11">C structure</a><a class="headerlink" href="#c-structure" title="Permalink to this headline">¶</a></h3>
<p>In QEMU the vhost-user-gpu message is implemented with the following struct:</p>
<div class="code c highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">typedef</span> <span class="n">struct</span> <span class="n">VhostUserGpuMsg</span> <span class="p">{</span>
    <span class="n">uint32_t</span> <span class="n">request</span><span class="p">;</span> <span class="o">/*</span> <span class="n">VhostUserGpuRequest</span> <span class="o">*/</span>
    <span class="n">uint32_t</span> <span class="n">flags</span><span class="p">;</span>
    <span class="n">uint32_t</span> <span class="n">size</span><span class="p">;</span> <span class="o">/*</span> <span class="n">the</span> <span class="n">following</span> <span class="n">payload</span> <span class="n">size</span> <span class="o">*/</span>
    <span class="n">union</span> <span class="p">{</span>
        <span class="n">VhostUserGpuCursorPos</span> <span class="n">cursor_pos</span><span class="p">;</span>
        <span class="n">VhostUserGpuCursorUpdate</span> <span class="n">cursor_update</span><span class="p">;</span>
        <span class="n">VhostUserGpuScanout</span> <span class="n">scanout</span><span class="p">;</span>
        <span class="n">VhostUserGpuUpdate</span> <span class="n">update</span><span class="p">;</span>
        <span class="n">VhostUserGpuDMABUFScanout</span> <span class="n">dmabuf_scanout</span><span class="p">;</span>
        <span class="n">struct</span> <span class="n">virtio_gpu_resp_display_info</span> <span class="n">display_info</span><span class="p">;</span>
        <span class="n">uint64_t</span> <span class="n">u64</span><span class="p">;</span>
    <span class="p">}</span> <span class="n">payload</span><span class="p">;</span>
<span class="p">}</span> <span class="n">QEMU_PACKED</span> <span class="n">VhostUserGpuMsg</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="protocol-features">
<h3><a class="toc-backref" href="#id12">Protocol features</a><a class="headerlink" href="#protocol-features" title="Permalink to this headline">¶</a></h3>
<p>None yet.</p>
<p>As the protocol may need to evolve, new messages and communication
changes are negotiated thanks to preliminary
<code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_GET_PROTOCOL_FEATURES</span></code> and
<code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_SET_PROTOCOL_FEATURES</span></code> requests.</p>
</div>
</div>
<div class="section" id="communication">
<h2><a class="toc-backref" href="#id13">Communication</a><a class="headerlink" href="#communication" title="Permalink to this headline">¶</a></h2>
<div class="section" id="message-types">
<h3><a class="toc-backref" href="#id14">Message types</a><a class="headerlink" href="#message-types" title="Permalink to this headline">¶</a></h3>
<dl class="docutils">
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_GET_PROTOCOL_FEATURES</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">1</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">N/A</td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u64</span></code></td>
</tr>
</tbody>
</table>
<p class="last">Get the supported protocol features bitmask.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_SET_PROTOCOL_FEATURES</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">2</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">u64</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Enable protocol features using a bitmask.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_GET_DISPLAY_INFO</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">3</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body">N/A</td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">struct</span> <span class="pre">virtio_gpu_resp_display_info</span></code> (from virtio specification)</td>
</tr>
</tbody>
</table>
<p class="last">Get the preferred display configuration.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_CURSOR_POS</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">4</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuCursorPos</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Set/show the cursor position.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_CURSOR_POS_HIDE</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">5</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuCursorPos</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Set/hide the cursor.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_CURSOR_UPDATE</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">6</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuCursorUpdate</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Update the cursor shape and location.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_SCANOUT</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">7</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuScanout</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Set the scanout resolution. To disable a scanout, the dimensions
width/height are set to 0.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_UPDATE</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">8</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuUpdate</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Update the scanout content. The data payload contains the graphical bits.
The display should be flushed and presented.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_DMABUF_SCANOUT</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">9</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuDMABUFScanout</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">N/A</td>
</tr>
</tbody>
</table>
<p class="last">Set the scanout resolution/configuration, and share a DMABUF file
descriptor for the scanout content, which is passed as ancillary
data. To disable a scanout, the dimensions width/height are set
to 0, there is no file descriptor passed.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_DMABUF_UPDATE</span></code></dt>
<dd><table class="first docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">id:</th><td class="field-body">10</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">request payload:</th></tr>
<tr class="field-even field"><td>&#160;</td><td class="field-body"><code class="docutils literal notranslate"><span class="pre">VhostUserGpuUpdate</span></code></td>
</tr>
<tr class="field-odd field"><th class="field-name">reply payload:</th><td class="field-body">empty payload</td>
</tr>
</tbody>
</table>
<p>The display should be flushed and presented according to updated
region from <code class="docutils literal notranslate"><span class="pre">VhostUserGpuUpdate</span></code>.</p>
<p class="last">Note: there is no data payload, since the scanout is shared thanks
to DMABUF, that must have been set previously with
<code class="docutils literal notranslate"><span class="pre">VHOST_USER_GPU_DMABUF_SCANOUT</span></code>.</p>
</dd>
</dl>
</div>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="vhost-vdpa.html" class="btn btn-neutral float-right" title="Vhost-vdpa Protocol" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="vhost-user.html" class="btn btn-neutral" title="Vhost-user Protocol" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; 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+4110+4a319788.6',
            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>