summaryrefslogtreecommitdiffstats
path: root/wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html')
-rw-r--r--wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html339
1 files changed, 339 insertions, 0 deletions
diff --git a/wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html b/wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html
new file mode 100644
index 0000000..1e1f677
--- /dev/null
+++ b/wiki/open-iov.org/index.php?title=Mdev-GPU&action=edit.html
@@ -0,0 +1,339 @@
+<!DOCTYPE html>
+<html class="client-nojs" lang="en" dir="ltr">
+<head>
+<meta charset="UTF-8"/>
+<title>View source for Mdev-GPU - Open-IOV</title>
+<script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":!0,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"7212876c9360432053822d84","wgCSPNonce":!1,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"Mdev-GPU","wgTitle":"Mdev-GPU","wgCurRevisionId":23740,"wgRevisionId":0,"wgArticleId":85,"wgIsArticle":!1,"wgIsRedirect":!1,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Mdev-GPU","wgRelevantArticleId":85,"wgIsProbablyEditable":!1,"wgRelevantPageIsProbablyEditable":!1,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},
+"wgEditSubmitButtonLabelPublish":!1};RLSTATE={"site.styles":"ready","noscript":"ready","user.styles":"ready","user":"ready","user.options":"loading","skins.vector.styles.legacy":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready"};RLPAGEMODULES=["mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.legacy.js","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader"];</script>
+<script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@1hzgi",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});
+});});</script>
+<link rel="stylesheet" href="load.php%3Flang=en&amp;modules=ext.visualEditor.desktopArticleTarget.noscript|skins.vector.styles.legacy&amp;only=styles&amp;skin=vector.css"/>
+<script async="" src="load.php%3Flang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector"></script>
+<meta name="generator" content="MediaWiki 1.37.1"/>
+<meta name="robots" content="noindex,nofollow"/>
+<meta name="format-detection" content="telephone=no"/>
+<link rel="shortcut icon" href="favicon.ico.html"/>
+<link rel="search" type="application/opensearchdescription+xml" href="opensearch_desc.php" title="Open-IOV (en)"/>
+<link rel="EditURI" type="application/rsd+xml" href="api.php%3Faction=rsd"/>
+<link rel="alternate" type="application/atom+xml" title="Open-IOV Atom feed" href="./index.php%3Ftitle=Special:RecentChanges&amp;feed=atom"/>
+</head>
+<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Mdev-GPU rootpage-Mdev-GPU skin-vector action-edit skin-vector-legacy"><div id="mw-page-base" class="noprint"></div>
+<div id="mw-head-base" class="noprint"></div>
+<div id="content" class="mw-body" role="main">
+ <a id="top"></a>
+ <div id="siteNotice"></div>
+ <div class="mw-indicators">
+ </div>
+ <h1 id="firstHeading" class="firstHeading" >View source for Mdev-GPU</h1>
+ <div id="bodyContent" class="vector-body">
+
+ <div id="contentSub">← <a href="index.php/Mdev-GPU.html" title="Mdev-GPU">Mdev-GPU</a></div>
+ <div id="contentSub2"></div>
+
+ <div id="jump-to-nav"></div>
+ <a class="mw-jump-link" href="index.php%3Ftitle=Mdev-GPU&amp;action=edit.html#mw-head">Jump to navigation</a>
+ <a class="mw-jump-link" href="index.php%3Ftitle=Mdev-GPU&amp;action=edit.html#searchInput">Jump to search</a>
+ <div id="mw-content-text" class="mw-body-content"><p>You do not have permission to edit this page, for the following reason:
+</p>
+<div class="permissions-errors">
+<p>The action you have requested is limited to users in the group: <a href="https://open-iov.org/index.php?title=Open-IOV:Administrators&amp;action=edit&amp;redlink=1" class="new" title="Open-IOV:Administrators (page does not exist)">Administrators</a>.
+</p>
+</div><hr />
+<p>You can view and copy the source of this page.
+</p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">This page makes use of terms that are defined in the [https://open-iov.org/index.php/Glossary ''Open-IOV Glossary'']. If you're curious what a given term means you can check there for a definition.
+
+
+
+This page will be used to document the '''Mdev-GPU API''' as well as provide an overview of the internals of the Mdev-GPU package.
+
+Mdev-GPU's source code can be found [https://github.com//Mdev-GPU here].
+
+Module docs can be found [ here].&lt;blockquote>An absence of critical technical documentation has historically slowed growth and adoption of developer ecosystems for GPU virtualization.
+
+This [https://creativecommons.org/licenses/by/4.0/ CC-BY-4.0] licensed content can either be used with attribution, or used as inspiration for new documentation, created by GPU vendors for public commercial distribution as developer documentation.
+
+Where possible, this documentation will clearly label dates and versions of observed-but-not-guaranteed behaviour vs. vendor-documented stable interfaces/behaviour with guarantees of forward or backward compatibility.&lt;/blockquote>
+
+=== Compilation ===
+Compiling Mdev-GPU from source is very simple however it can take a long time to complete (10 minutes for existing sources).
+
+If you'd like to compile Mdev-GPU yourself you can do so by cloning [https://github.com//Mdev-GPU the repo] and running the following two commands from within the repository directory:
+
+&lt;code>curl -sSL &lt;nowiki>https://get.haskellstack.org/&lt;/nowiki> | sh&lt;/code>
+
+&lt;code>stack install&lt;/code>
+
+These commands will generate all binaries provided by Mdev-GPU under the path &lt;code>~/.local/bin/&lt;/code>.
+
+If you would prefer not to wait for the program to compile you can find pre-compiled x86_64 binaries under the [https://github.com//Mdev-GPU/releases/tag/0.1.0.0 Releases section of the repository on GitHub].
+
+=== Installation ===
+The binaries compiled on your local machine by Stack in the &lt;code>~/.local/bin/&lt;/code> path or downloaded from [https://github.com//Mdev-GPU/releases Releases on GitHub] should be copied to &lt;code>/usr/bin/&lt;/code>. This can be accomplished both via install script (currently testing in ) or via management layer-agnostic package.
+
+=== Mdev-GPU Configuration ===
+The Mdev-GPU repository provides Systemd service and example configurations for Mdev-CLI in the [https://github.com//Mdev-GPU/tree/master/etc /etc/ folder]. On installation the directories &amp; files contained in the repository's /etc/ folder should be copied to the absolute path &lt;code>/etc/&lt;/code> on the user's computer.
+
+==== Systemd ====
+GVM/Mdev-GPU exposes several of it's functions as Systemd services.
+
+As of the 0.1.0.0 release the following Systemd services are available:
+
+* '''mdev-post.service'''
+
+===== mdev-post.service =====
+As the name would suggest '''[https://github.com//Mdev-GPU/blob/master/etc/systemd/system/mdev-post.service mdev-post.service]''' posts the GPU(s) in a state where they are ready to be virtualized. When the service is invoked the mdev-cli util registers Mdev callbacks and supported mediated device (Mdev) types with the Mediated Core according to the user's specified configuration at '''&lt;code>/etc/gvm/mdev-gpu/generate-vgpu-types.yaml&lt;/code>'''. If you'd like to place your configuration file elsewhere and still have your configuration invoked on boot you can edit the systemd service [https://github.com//Mdev-GPU/blob/9993fd0781ddddfcca2cb9bee6455ea2c024cc23/etc/systemd/system/mdev-post.service#L10 ExecStart= line] to specify an alternative path.
+
+==== Mdev-CLI ====
+Configuration for Mdev-GPU can be found in the path '''&lt;code>/etc/gvm/mdev-gpu/&lt;/code>'''. This path will by default contain several vendor-specific folders which may include configuration examples for various devices/architectures as well as the file &lt;code>'''generate-vgpu-types.yaml'''&lt;/code> which you can configure to specify your desired Virtual GPU (vGPU) / VFIO-Mdev topologies as they are presented in the sysfsdev mdev_bus path and as seen by tools such as [https://github.com/mdevctl/mdevctl mdevctl]. Once you have configured the available types your liking you can refresh the supported types registered with the [https://open-iov.org/index.php/Virtual_IO_Internals#Mediated_Core Mediated Core] by rebooting your machine or reloading the vendor driver kernel module then restarting '''mdev-post.service''' or by invoking '''mdev-cli'''.
+
+
+The available yaml properties which may be specified in '''&lt;code>/etc/gvm/mdev-gpu/generate-vgpu-types.yaml&lt;/code>''' are shown below. Note that fields with the &lt;sup>[required]&lt;/sup> tag must be specified in the yaml file whereas fields with the &lt;sup>[optional]&lt;/sup> tag may be omitted from configuration if you would prefer to rely upon default parameters instead.
+
+===== num =====
+&lt;sup>[required]&lt;/sup>
+
+num refers to the Mediated Device (Mdev) type number. This value specifies the profile's numerical identifier in the sysfsdev mdev_bus path.
+
+===== vDevId =====
+&lt;sup>[optional]&lt;/sup>
+
+The vGPU (Virtual GPU) PCI Device ID which should be presented to the guest.
+
+===== pDevId =====
+&lt;sup>[optional]&lt;/sup>
+
+The pGPU (Physical GPU) PCI Device ID which should be presented to the host.
+
+===== name =====
+&lt;sup>[optional]&lt;/sup>
+
+The GPU name presented to the guest.
+
+===== gpuClass =====
+&lt;sup>[optional]&lt;/sup>
+
+The class of GPU to use.
+
+available strings:
+
+"Compute"
+
+"Graphics"
+
+===== maxInstances =====
+&lt;sup>[required]&lt;/sup>
+
+maxInstances refers to the maximum number of instances available of any given Mediated Device (Mdev) profile. This number can be configured arbitrarily however it should ideally not be set to a value which allows for fbLen/fbRes values that allow a number of Mdev devices to be created which would exceed your device's available VRAM.
+
+===== virtDisplay =====
+&lt;sup>[optional]&lt;/sup>
+
+virtDisplay controls the topologies of virtual displays. virtDisplay exposes the following user configurable properties:
+
+====== numHeads ======
+&lt;sup>[optional]&lt;/sup>
+
+Number of heads [virtual monitors] available for each Mediated Device (Mdev).
+
+====== maxResX ======
+&lt;sup>[optional]&lt;/sup>
+
+Maximum width of the mediated display.
+
+====== maxResY ======
+&lt;sup>[optional]&lt;/sup>
+
+Maximum height of the mediated display.
+
+====== frlConfig ======
+&lt;sup>[optional]&lt;/sup>
+
+Frame rate limiter for the mediated display.
+
+====== frlEnable ======
+&lt;sup>[optional]&lt;/sup>
+
+Do we enable frame rate limiting or not?
+
+===== ecc =====
+&lt;sup>[optional]&lt;/sup>
+
+ecc refers to if error correcting memory should be used.
+
+===== fbLen =====
+&lt;sup>[required]&lt;/sup>
+
+fbLen is the framebuffer length (in megabytes).
+
+===== fbRes =====
+&lt;sup>[required]&lt;/sup>
+
+fbRes is the framebuffer reserved by the hypervisor (in megabytes). In most circumstances this value should scale to around 1/7th the size of your chosen fbLen value.
+
+===== mapVideoSize =====
+&lt;sup>[optional]&lt;/sup>
+
+Mappable video size in MBs, 24 by default.
+
+===== encCap =====
+&lt;sup>[optional]&lt;/sup>
+
+Percentage we use the NvEnc hardware.
+
+===== bar1Len =====
+&lt;sup>[optional]&lt;/sup>
+
+bar1Len refers to the size of the Base Address Registers for BAR1 (MSI) as presented by the [https://open-iov.org/index.php/Virtual_I/O_Internals#VFIO_device_file_descriptor VFIO File Descriptor].
+</textarea><div class="templatesUsed"></div><p id="mw-returnto">Return to <a href="index.php/Mdev-GPU.html" title="Mdev-GPU">Mdev-GPU</a>.</p>
+
+<div class="printfooter">Retrieved from "<a dir="ltr" href="index.php/Mdev-GPU.html">https://open-iov.org/index.php/Mdev-GPU</a>"</div></div>
+ <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div>
+ </div>
+</div>
+
+<div id="mw-navigation">
+ <h2>Navigation menu</h2>
+ <div id="mw-head">
+ <nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" role="navigation"
+ >
+ <h3 id="p-personal-label" class="vector-menu-heading"> <span>Personal tools</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"><li id="pt-login" class="mw-list-item"><a href="https://open-iov.org/index.php?title=Special:UserLogin&amp;returnto=Mdev-GPU&amp;returntoquery=action%3Dedit" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li></ul>
+
+ </div>
+</nav>
+
+ <div id="left-navigation">
+ <nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu vector-menu-tabs" aria-labelledby="p-namespaces-label" role="navigation"
+ >
+ <h3 id="p-namespaces-label" class="vector-menu-heading"> <span>Namespaces</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"><li id="ca-nstab-main" class="selected mw-list-item"><a href="index.php/Mdev-GPU.html" title="View the content page [c]" accesskey="c">Page</a></li><li id="ca-talk" class="mw-list-item"><a href="index.php/Talk:Mdev-GPU.html" rel="discussion" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li></ul>
+
+ </div>
+</nav>
+
+ <nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-variants-label" role="navigation"
+ >
+ <input type="checkbox"
+ id="p-variants-checkbox"
+ role="button"
+ aria-haspopup="true"
+ data-event-name="ui.dropdown-p-variants"
+ class=" vector-menu-checkbox" aria-labelledby="p-variants-label" />
+ <h3 id="p-variants-label" class="vector-menu-heading"> <span>Variants</span>
+ <span class="vector-menu-checkbox-expanded">expanded</span>
+ <span class="vector-menu-checkbox-collapsed">collapsed</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"></ul>
+
+ </div>
+</nav>
+
+ </div>
+ <div id="right-navigation">
+ <nav id="p-views" class="mw-portlet mw-portlet-views vector-menu vector-menu-tabs" aria-labelledby="p-views-label" role="navigation"
+ >
+ <h3 id="p-views-label" class="vector-menu-heading"> <span>Views</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"><li id="ca-view" class="mw-list-item"><a href="index.php/Mdev-GPU.html">Read</a></li><li id="ca-viewsource" class="selected mw-list-item"><a href="index.php%3Ftitle=Mdev-GPU&amp;action=edit.html" title="This page is protected.&#10;You can view its source [e]" accesskey="e">View source</a></li><li id="ca-history" class="mw-list-item"><a href="index.php%3Ftitle=Mdev-GPU&amp;action=history.html" title="Past revisions of this page [h]" accesskey="h">View history</a></li></ul>
+
+ </div>
+</nav>
+
+ <nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown-noicon vector-menu vector-menu-dropdown" aria-labelledby="p-cactions-label" role="navigation" title="More options"
+ >
+ <input type="checkbox"
+ id="p-cactions-checkbox"
+ role="button"
+ aria-haspopup="true"
+ data-event-name="ui.dropdown-p-cactions"
+ class=" vector-menu-checkbox" aria-labelledby="p-cactions-label" />
+ <h3 id="p-cactions-label" class="vector-menu-heading"> <span>More</span>
+ <span class="vector-menu-checkbox-expanded">expanded</span>
+ <span class="vector-menu-checkbox-collapsed">collapsed</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"></ul>
+
+ </div>
+</nav>
+
+ <div id="p-search" role="search" class="vector-search-box">
+ <div>
+ <h3 >
+ <label for="searchInput">Search</label>
+ </h3>
+ <form action="https://open-iov.org/index.php" id="searchform">
+ <div id="simpleSearch" data-search-loc="header-navigation">
+ <input type="search" name="search" placeholder="Search Open-IOV" autocapitalize="sentences" title="Search Open-IOV [f]" accesskey="f" id="searchInput"/>
+ <input type="hidden" name="title" value="Special:Search"/>
+ <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/>
+ <input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton"/>
+ </div>
+ </form>
+ </div>
+</div>
+
+ </div>
+ </div>
+
+<div id="mw-panel">
+ <div id="p-logo" role="banner">
+ <a class="mw-wiki-logo" href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html"
+ title="Visit the main page"></a>
+ </div>
+ <nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu vector-menu-portal portal" aria-labelledby="p-navigation-label" role="navigation"
+ >
+ <h3 id="p-navigation-label" class="vector-menu-heading"> <span>Navigation</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"><li id="n-mainpage-description" class="mw-list-item"><a href="images/archive/c/c3/20221214193624!I915_Scheduling_Events_and_Requests.png.html" title="Visit the main page [z]" accesskey="z">Main page</a></li><li id="n-recentchanges" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li><li id="n-randompage" class="mw-list-item"><a href="index.php/Special:Random.html" title="Load a random page [x]" accesskey="x">Random page</a></li><li id="n-help-mediawiki" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help about MediaWiki</a></li></ul>
+
+ </div>
+</nav>
+
+ <nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu vector-menu-portal portal" aria-labelledby="p-tb-label" role="navigation"
+ >
+ <h3 id="p-tb-label" class="vector-menu-heading"> <span>Tools</span>
+ </h3>
+ <div class="vector-menu-content">
+
+ <ul class="vector-menu-content-list"><li id="t-whatlinkshere" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:WhatLinksHere/Mdev-GPU" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="https://open-iov.org/index.php/Special:RecentChangesLinked/Mdev-GPU" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li id="t-specialpages" class="mw-list-item"><a href="index.php/Special:SpecialPages.html" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li id="t-info" class="mw-list-item"><a href="index.php%3Ftitle=Mdev-GPU&amp;action=info.html" title="More information about this page">Page information</a></li></ul>
+
+ </div>
+</nav>
+
+
+</div>
+
+</div>
+<footer id="footer" class="mw-footer" role="contentinfo" >
+ <ul id="footer-info" >
+</ul>
+
+ <ul id="footer-places" >
+ <li id="footer-places-privacy"><a href="https://open-iov.org/index.php/Open-IOV:Privacy_policy" title="Open-IOV:Privacy policy">Privacy policy</a></li>
+ <li id="footer-places-about"><a href="index.php/Open-IOV:About.html" title="Open-IOV:About">About Open-IOV</a></li>
+ <li id="footer-places-disclaimer"><a href="https://open-iov.org/index.php/Open-IOV:General_disclaimer" title="Open-IOV:General disclaimer">Disclaimers</a></li>
+</ul>
+
+ <ul id="footer-icons" class="noprint">
+ <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/"><img src="resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="resources/assets/poweredby_mediawiki_132x47.png 1.5x, resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31" loading="lazy"/></a></li>
+</ul>
+
+</footer>
+
+
+<script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":72});});</script>
+<script>(function(){function c(){var b=a.contentDocument||(a.contentWindow&&a.contentWindow.document);if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a39969e0ac5539c9',t:'MTc4OTE1ODQ1MQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script></body></html> \ No newline at end of file