<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1893467663;
        mso-list-type:hybrid;
        mso-list-template-ids:1682242628 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
</head>
<body lang="EN-IN" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Everyone,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We want to add extra options to device xml to skip reattach of pci passthrough devices. Following is xml format for pci passthrough devices added to domain as of now.<o:p></o:p></span></p>
<pre><span style="font-size:11.0pt"><hostdev mode='subsystem' type='pci' managed='yes'><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt">  <source><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt">      <address domain='0x0000' bus='0x00' slot='0x1a' function='0x7'/><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt">  </source><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt"></hostdev><o:p></o:p></span></pre>
<pre><span style="font-size:11.0pt"><o:p> </o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US">When we pass managed=’yes’ flag through xml, libvirt takes responsibility of detaching device on domain(guest VM) start and reattaching on domain shutdown. We observed some issues where guest VM shutdown may take long
 time, blocked for reattach operation on pci passthrough device. As domain lock is held during this time it also makes libvirt mostly inactive as it blocks even basic operations like (virsh list). Reattaching of device to host can block due to reasons like
 buggy driver or initialization of device itself can take long time in some cases.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We want to pass following extra options to resolve this:<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="color:#1D1C1D;margin-left:0cm;mso-list:l0 level1 lfo1">
<b><span style="font-family:"Arial",sans-serif;background:#F8F8F8;mso-fareast-language:EN-GB">skipReAttach</span></b><span style="font-family:"Arial",sans-serif;background:#F8F8F8;mso-fareast-language:EN-GB"> (optional flag)<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB">In some cases we do not need to reattach device to host as it may be reserved only for guests, with this flag we can skip reattach
 operation on host.  We do not want to modify managed flag to avoid regression, so thinking of adding new optional flag.<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="2" type="1">
<li class="MsoListParagraph" style="color:#1D1C1D;margin-left:0cm;mso-list:l0 level1 lfo1">
<b><span style="font-family:"Arial",sans-serif;background:#F8F8F8;mso-fareast-language:EN-GB">reAttachDriverName</span></b><span style="font-family:"Arial",sans-serif;background:#F8F8F8;mso-fareast-language:EN-GB"> (optional flag)<o:p></o:p></span></li></ol>
<p class="MsoListParagraph"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB">Name of driver to which we want to attach instead of default, to avoid reattaching to buggy driver. Currently libvirt asks host
 to auto selects driver for device.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB">Yes we can use managed=’no’ but in that case user has to take responsibility of detaching device before starting domain which we do
 not want. Please let us know your views on this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:#1D1C1D;background:#F8F8F8;mso-fareast-language:EN-GB">Manish Mishra<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>