[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [vfio-users] [FEEDBACK NEEDED] Rewriting the Arch wiki article



On Mon, Apr 18, 2016 at 3:14 PM, Garland Key <david garland key gmail com> wrote:
Please add what to do if you have two identical GPUs.  Here is exactly what is needed to make it work.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  

/etc/modprobe.d/vfio.conf


    install vfio-pci /sbin/vfio-pci-override-vga.sh
    options vfio-pci disable_vga=1 allow_unsafe_interrupts=1

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).
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

/sbin/vfio-pci-override-vga.sh

    
#!/bin/sh
    
    for i in $(find /sys/devices/pci* -name boot_vga); do
            if [ $(cat $i) -eq 0 ]; then
                    GPU=$(dirname $i)
                    AUDIO=$(echo $GPU | sed -e "s/0$/1/")
                   echo "vfio-pci" > $GPU/driver_override
                    if [ -d $AUDIO ]; then
                            echo "vfio-pci" > $AUDIO/driver_override
                    fi
            fi
    done
    
    modprobe -i vfio-pci

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Add the following to /etc/mkinitcpio.conf and then run mkinitcpio -p linux

    
BINARIES="/usr/bin/find /usr/bin/dirname"
    FILES="/sbin/vfio-pci-override-vga.sh"

mkinitcpio is already including the vfio modules by default?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]