[vfio-users] Unbind Vfio Passthrough = general protection fault

nahoxou at netcourrier.com nahoxou at netcourrier.com
Mon Sep 21 22:46:54 UTC 2015


Tell me please If need more detail information.




>What script or commands are you using to unbind the device?  Does only stopping the VM trigger the issue or is the unbind required? 

I put a sleep command between qemu stop and unbind so i think it is more about unbind...

I use the recommended command from all vfio web tutorials.
bind:
for dev in "0000:01:00.0" "0000:01:00.1"; do
        vendor=$(cat /sys/bus/pci/devices/${dev}/vendor)
        device=$(cat /sys/bus/pci/devices/${dev}/device)
        if [ -e /sys/bus/pci/devices/${dev}/driver ]; then
                echo "${dev}" > /sys/bus/pci/devices/${dev}/driver/unbind
        fi
        echo "${vendor} ${device}" > /sys/bus/pci/drivers/vfio-pci/new_id
done


unbind :
for dev in "0000:01:00.0" "0000:01:00.1"; do
        vendor=$(cat /sys/bus/pci/devices/${dev}/vendor)
        device=$(cat /sys/bus/pci/devices/${dev}/device)
        if [ -e /sys/bus/pci/devices/${dev}/driver ]; then
                echo "${dev}" > /sys/bus/pci/devices/${dev}/driver/unbind
        fi
done


Successful unbind command works rarely maybe 1/10 times.









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20150922/6491c303/attachment.htm>


More information about the vfio-users mailing list