Giter Club home page Giter Club logo

vfio-pci-bind's People

Contributors

andre-richter avatar ljm42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vfio-pci-bind's Issues

syntax error in shell script

I believe this line in the shell script is incorrect:

if [[ $curr_driver -ne "vfio-pci" ]]; then

In the Bourne Shell the "-ne" operator is meant for integer operations, since this is a string operation it should use "!=" or "==", right?

Also, it looks like the logic is reversed. Based on what the script is doing, and the corresponding line in the Ruby file:

if curr_driver == 'vfio-pci'

I believe this line should be:
if [[ "$curr_driver" == "vfio-pci" ]]; then

Can you double check and see if I am off base here?

vfio-pci-bind.sh Bindinh Hangs System

Hi

Thank you for your work.

When I try to use the script my system hangs (waited for 10 min and still hanged) and I have to do a manual Computer Reset (press the physical button).

I have run it using:
sudo vfio-pci-bind.sh 0000:10:00.0 10de:107d
sudo vfio-pci-bind.sh 0000:10:00.1 10de:0e08
reversing the ID orders (10de:0e08 0000:10:00.1)

sudo vfio-pci-bind.sh 0000:10:00.0
sudo vfio-pci-bind.sh 0000:10:00.1

sudo vfio-pci-bind.sh 10de:107d
sudo vfio-pci-bind.sh 10de:0e08

Using "sudo su" before executing the commands.

After I press Enter, it outputs nothing and just hangs the PC, can't even use the mouse.

I have Debian 11.5 KDE. The MB BIOS has IOMMU and virtualization turned on. Linux has it enabled also. I tried using a manual procedure and it worked, but when installing the drivers on the guest I got the Code 43 error (turned off kvm and other workaround I found on the internet with no succes.. Even tried older NVidia Drivers). So I thought it was some misstep I did or the guide was to old and was missing a step. So I formatted the PC and installed Debian again (nothing lost, the previous installation was also fresh, preferred to star over from 0 then to reverse the steps of the manual guide).

What am I doing wrong?

Thank you in advanced!

driver re bind after vm shutdown

Hi (:
first really big thank you for your script! <3

i plan to switch from vfio-pci on boot to doing it in system when the VM is needed.
So i can use the GPU for nativ gaming when VM is off.
So my question is now can you build a way to unbind vfio-pci and rebind with the driver?

with kind regards

binding devices on boot

Hi,
Thanks for making such great script it saves my day because I have some identical vfio ids on both gpu.
I have to add multiple devices bind on boot I tried like this but not working
KERNEL=="0000:4e:00.0","0000:4e:00.1","0000:4e:00.2","0000:4e:00.3", TAG="vfio-pci-bind"

and like this only first device was bounded
KERNEL=="0000:4e:00.0", TAG="vfio-pci-bind"
KERNEL=="0000:4e:00.1", TAG="vfio-pci-bind"
KERNEL=="0000:4e:00.2", TAG="vfio-pci-bind"
KERNEL=="0000:4e:00.3", TAG="vfio-pci-bind"

can you help please loop all devices ?
and besides script doesn't work using "sudo" but only as "sudo su -" root works
Using vfio-pci-bind.sh 0000:4e:00.0 one by one works but the bound gone after reboot ubuntu.

GPU 1
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73af] (rev c0)
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:ab28]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:ab28]
03:00.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a6]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a6]
03:00.3 Serial bus controller [0c80]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a4]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:0408]

GPU 2
4e:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73bf] (rev c0)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:0e3a]
4e:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:ab28]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:ab28]
4e:00.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a6]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a6]
4e:00.3 Serial bus controller [0c80]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:73a4]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:0408]

Thanks in advance
Cheers.

bind specific Vendor:Device

Thanks for this script. It works well until you add hardware that changes your PCI addresses, and then there is a risk that the wrong device will be bound to vfio-pci. It would be a big problem if the host lost access to a nic or drive controller as a result.

I'd like to propose that the script accept a second (optional) parameter of the Vendor:Device to bind. If the supplied Vendor:Device is found at Domain:Bus:Device.Function, then it can go ahead and bind the device. If something else is found at that address then it should not bind the device.

I will submit a pull request for a potential implementation of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.