1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>intel_vgt_balloon</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux DRM Developer's Guide"><link rel="up" href="drmI915.html#idp1127853244" title="Intel GVT-g Guest Support(vGPU)"><link rel="prev" href="API-intel-vgt-deballoon.html" title="intel_vgt_deballoon"><link rel="next" href="ch04s02.html" title="Display Hardware Handling"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">intel_vgt_balloon</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-intel-vgt-deballoon.html">Prev</a>&#160;</td><th width="60%" align="center">Intel GVT-g Guest Support(vGPU)</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch04s02.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-intel-vgt-balloon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>intel_vgt_balloon &#8212; 
2     balloon out reserved graphics address trunks
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">intel_vgt_balloon </b>(</code></td><td>struct drm_device * <var class="pdparam">dev</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1127875100"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p>
4     drm device
5    </p></dd></dl></div></div><div class="refsect1"><a name="idp1127876692"></a><h2>Description</h2><p>
6   This function is called at the initialization stage, to balloon out the
7   graphic address space allocated to other vGPUs, by marking these spaces as
8   reserved. The ballooning related knowledge(starting address and size of
9   the mappable/unmappable graphic memory) is described in the vgt_if structure
10   in a reserved mmio range.
11   </p><p>
12
13   To give an example, the drawing below depicts one typical scenario after
14   ballooning. Here the vGPU1 has 2 pieces of graphic address spaces ballooned
15   out each for the mappable and the non-mappable part. From the vGPU1 point of
16   view, the total size is the same as the physical one, with the start address
17   of its graphic space being zero. Yet there are some portions ballooned out(
18   the shadow part, which are marked as reserved by drm allocator). From the
19   host point of view, the graphic address space is partitioned by multiple
20   vGPUs in different VMs.
21   </p><p>
22
23   vGPU1 view         Host view
24   0 ------&gt; +-----------+     +-----------+
25   ^       |///////////|     |   vGPU3   |
26   |       |///////////|     +-----------+
27   |       |///////////|     |   vGPU2   |
28   |       +-----------+     +-----------+
29   mappable GM    | available | ==&gt; |   vGPU1   |
30   |       +-----------+     +-----------+
31   |       |///////////|     |           |
32   v       |///////////|     |   Host    |
33   +=======+===========+     +===========+
34   ^       |///////////|     |   vGPU3   |
35   |       |///////////|     +-----------+
36   |       |///////////|     |   vGPU2   |
37   |       +-----------+     +-----------+
38   unmappable GM    | available | ==&gt; |   vGPU1   |
39   |       +-----------+     +-----------+
40   |       |///////////|     |           |
41   |       |///////////|     |   Host    |
42   v       |///////////|     |           |
43   total GM size ------&gt; +-----------+     +-----------+
44</p></div><div class="refsect1"><a name="idp1127880604"></a><h2>Returns</h2><p>
45   zero on success, non-zero if configuration invalid or ballooning failed
46</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-intel-vgt-deballoon.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="drmI915.html#idp1127853244">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch04s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">intel_vgt_deballoon</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Display Hardware Handling</td></tr></table></div></body></html>
47