<html xmlns:v="urn:schemas-microsoft-com:vml" 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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I did not have success with adding the modules-load=vfio-pci arguments to the kernel line. Finally I tried a cron script that waits for 20 seconds after boot
 and then starts the guest. So autostart still isn’t working, but I have a workaround.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks again,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Randy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">Randall Pittman<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Faculty Research Assistant
</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> School of Civil and Construction Engineering
</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">|</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Oregon State University<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Location: 006 Covell Hall
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Mailing: 101 Kearney Hall
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Corvallis, OR 97331-2132<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Office: 541-737-2102
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Mobile: 541-286-7896<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Colin Godsey [mailto:crgodsey@gmail.com]
<br>
<b>Sent:</b> Thursday, March 31, 2016 2:19 PM<br>
<b>To:</b> Pittman, Randall; vfio-users@redhat.com<br>
<b>Subject:</b> Re: [vfio-users] PCI passthrough prevents autostart of guest<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">You might have to try and early load the vfio module to head off any other drivers that may try to acquire the device. You should be able to do this with the <span style="font-size:8.5pt;font-family:"Menlo","serif"">rd.modules-load,modules-load</span> kernel
 arguments.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemd-modules-load.service&ampsect=8">http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemd-modules-load.service&ampsect=8</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Mar 31, 2016 at 2:55 PM Pittman, Randall <<a href="mailto:Randall.Pittman@oregonstate.edu">Randall.Pittman@oregonstate.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I have a custom PCI data acquisition card for which I only have Windows XP drivers, so I’m running WinXP in a QEMU-KVM VM under CentOS 7. I have PCI passthrough working fine. (I
 added the PCI card to the VM with virt-manager) However, the VM will not autostart on boot of the host machine. I have the following output in /var/log/libvirt/qemu/win_xp.log:<o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td valign="top" style="border:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.191010Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: vfio: Error: Failed to setup
 INTx fd: Device or resource busy</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.289154Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: Device initialization failed.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.289195Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: Device 'vfio-pci' could not
 be initialized</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Again, this only happens at boot when the VM should be auto-starting. I can start it just fine manually with virsh or virt-manager. Perhaps the issue has to do with libvirtd starting
 too soon? N.b. I’m new to messing with init systems in general, systemd in particular.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any help would be greatly appreciated. I haven’t had any responses from the libvirt-users list, the CentOS forums, or my local university Linux mailing list.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Randy<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Extended info:<o:p></o:p></p>
<p><span style="font-family:Symbol">·</span><span style="font-size:7.0pt">        
</span>win_xp.xml file: <a href="http://pastebin.com/uBSbGDu6" target="_blank">http://pastebin.com/uBSbGDu6</a><o:p></o:p></p>
<p><span style="font-family:Symbol">·</span><span style="font-size:7.0pt">        
</span>Software versions from yum:<o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>CentOS - 7.2.1511<o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>libvirt - 1.2.17-13.el7_2.3<o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>qemu - 2:2.0.0-1.el7.6<o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>qemu-kvm - 10:1.5.3-105.el7_2.3<o:p></o:p></p>
<p><span style="font-family:Symbol">·</span><span style="font-size:7.0pt">        
</span>Hardware: <o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>CPU: Xeon E3-1231 v3, intel_iommu=on set in grub2<o:p></o:p></p>
<p style="margin-left:1.0in"><span style="font-family:"Courier New"">o</span><span style="font-size:7.0pt">  
</span>lspci entry for the custom PCI card:<br>
<span style="font-size:9.0pt;font-family:Consolas">05:00.0 Unassigned class [ff00]: PLX Technology, Inc. PCI9054 32-bit 33MHz PCI <-> IOBus Bridge (rev 0b)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">Randall Pittman</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Faculty Research Assistant
</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> School of Civil and Construction Engineering
</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">|</span></b><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Oregon State University</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Location: 006 Covell Hall
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Mailing: 101 Kearney Hall
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F5770F">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Corvallis, OR 97331-2132</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333">Office: 541-737-2102
</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#F57913">|</span><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#333333"> Mobile: 541-286-7896</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>