<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 18, 2016 at 3:14 PM, Garland Key <span dir="ltr"><<a href="mailto:david.garland.key@gmail.com" target="_blank">david.garland.key@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Please add what to do if you have two identical GPUs.  Here is exactly what is needed to make it work.<br><br>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  <br><i><br><font face="monospace, monospace"><b>/etc/modprobe.d/vfio.conf</b></font></i><br><br><span style="font-family:monospace"><span style="color:rgb(0,0,0)">    install vfio-pci /sbin/vfio-pci-override-vga.sh
</span><br>    options vfio-pci disable_vga=1 allow_unsafe_interrupts=1<br></span></div></blockquote><div><br></div><div>This last options line is not relevant to the specific task you're trying to accomplish here.  Please don't blindly include examples in the wiki that may not be relevant to all users (disable_vga) or may not be advised or even needed for all users (allow_unsafe_interrupts).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-family:monospace"></span>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <span style="font-family:monospace"><br><br></span><span style="color:rgb(0,0,0);font-family:monospace"><b><i>/sbin/vfio-pci-override-vga.sh</i></b><br></span><span style="font-family:monospace"><br>    </span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">#!/bin/sh
</span><br>
    <br>    for i in $(find /sys/devices/pci* -name boot_vga); do
<br>            if [ $(cat $i) -eq 0 ]; then
<br>                    GPU=$(dirname $i)
<br>                    AUDIO=$(echo $GPU | sed -e "s/0$/1/")
<br>                   echo "vfio-pci" > $GPU/driver_override
<br>                    if [ -d $AUDIO ]; then
<br>                            echo "vfio-pci" > $AUDIO/driver_override
<br>                    fi
<br>            fi
<br>    done
<br>
    <br>    modprobe -i vfio-pci<br><br></span>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <span style="font-family:monospace"><br>
<br></span>Add the following to <i><font face="monospace, monospace"><b>/etc/mkinitcpio.</b></font><b style="font-family:monospace,monospace">conf</b></i><font face="arial, helvetica, sans-serif"> and then run </font><b style="font-family:monospace,monospace"><i>mkinitcpio -p linux</i></b><font face="monospace, monospace"><b><br></b></font><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br>    </span></span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">BINARIES="/usr/bin/find /usr/bin/dirname"</span><br></span><span style="color:rgb(0,0,0)"><font face="monospace">    FILES="/sbin/vfio-pci-override-vga.sh"</font></span></div></blockquote><div><br></div><div>mkinitcpio is already including the vfio modules by default?</div></div></div></div>