[vfio-users] [help] 2 identical GPUs in Arch

Ben J btpprograms at gmail.com
Fri Feb 19 22:59:39 UTC 2016


Yeah that script won't work for you with the nvidia driver, it doesn't like
being unbound which is why you have to PCI stub them in the first place. I
just PCI stub both cards and run a script that claims card 2 with vfio and
then claims card 1 with nvidia. You can find the vfio-bind script in all of
the Arch based tutorials, I can link them later if you can't find them. To
convert it into an nvidia-bind script all you have to do is change all of
the "vfio-pci" to "nvidia". It's important to do the vfio one first since
the nvidia driver can block both cards even when it's not bound to both
from my experience. Let me know if you hit any other issues.
On Feb 19, 2016 5:45 PM, "Garland Key" <david.garland.key at gmail.com> wrote:

> Thanks for the reply.  I haven't tried the script yet.  I'm going to work
> on it more later tonight.  I have two Nvidia GTX 970s.
>
> On Fri, Feb 19, 2016, 4:43 PM Ben J <btpprograms at gmail.com> wrote:
>
>> For your latter question, it doesn't seem like you should need to modify
>> it as his original script already generically finds all GPUs. Did it not
>> work when you tried it? Also, what type of cards are you using? If they're
>> NVIDIA with nvidia drivers then I doubt that script will work for you.
>> I'm using the following guide:
>> https://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-3-host.html.
>> I'm having trouble adapting some of the Fedora focused instructions for use
>> in Arch.
>>
>> *1. Dracut*
>> Dracut isn't used in Arch but the mkinitcpio is. You're asked to insert *add_drivers+="vfio
>> vfio_iommu_type1 vfio_pci vfio_virqfd" *in:
>> */etc/dracut.conf.d/local.conf*.  Farther down, I'm supposed to insert *install_items+="/sbin/vfio-pci-override-vga.sh
>> /usr/bin/find /usr/bin/dirname" *in: */etc/dracut.conf.d/local.conf*.
>>
>> Should I instead add these lines to a modprobe.d conf file or should I
>> add it to the modules line in */etc/mkinitcpio.conf*?
>>
>> *2. driver_override*
>> My bash-foo isn't very good and I need to adapt the following script (see
>> below) so that it points to the correct directories. In Arch, the directory
>> for the GPU (02:00.0) and GPU audio (02:00.1) are here:
>> */sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/* &
>> */sys/devices/pci0000:00/0000:00:02.0/0000:02:00.1/*
>>
>>
>>
>>
>>
>>
>>
>> *    #!/bin/sh    DEVS="0000:02:00.0 0000:02:00.1"    for DEV in $DEVS;
>>   do echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override    done
>>   modprobe -i vfio-pci*
>>
>> Hope to hear from you soon!
>>
>> Best,
>> Garland Key
>>
>> _______________________________________________
>> vfio-users mailing list
>> vfio-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/vfio-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20160219/c62f20b8/attachment.htm>


More information about the vfio-users mailing list