You are not logged in.

#1 2013-12-03 14:38:37

Registered: 2010-04-30
Posts: 127

[SOLVED] cant edit /sys/bus/pci/drivers/pci-stub/new_id

was following this tutorial: … T-d_in_KVM
which describe how to prepare a pci device to be used on kvm passthrought scheme!

On 4th step of this tutorial after you locate you pci device you have to:

echo "8086 10b9" > /sys/bus/pci/drivers/pci-stub/new_id
echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/bind

But on the first command i get

echo: write error: invalid argument

I tried to open it with nano/vim. On nano i got "invalid argument" on open/write process! But on vim i got "change to readonly mode". So  i type the command

ls -l /sys/bus/pci/drivers/pci-stub/new_id

and the result was

0 --w------- 1 root root 4.0K Dec  3 08:29 /sys/bus/pci/drivers/pci-stub/new_id

Then i change the mod of file with

chmod 600 /sys/bus/pci/drivers/pci-stub/new_id

but all the "echo" commands and text editor still return the same message about the file

so a tried

chmod 666 /sys/bus/pci/drivers/pci-stub/new_id

still nothing changed.

There is anything "special" i've to make it writeable or this tutorial is worng?

thnks anyway


Answered by @aw on … 6#p1356306

aw wrote:

You're using them incorrectly.  Note that the script echos $vendor and $device to the new_id file while you're trying to use the (incomplete) PCI address.  You're getting permission denied because of what you're trying to echo, not because of file permissions.  As to why vfio-pci vs pci-stub, vfio is a new userspace driver interface where qemu is just a userspace driver using it for device assignment.  Legacy kvm device assignment with pci-stub is effectively deprecated.  Also, if you want to do VGA, vfio is the only device assignment interface with this support.

Last edited by abarahc (2013-12-03 17:25:26)

user@localhost $ grep -rnw "." -e "hacking"


Board footer

Powered by FluxBB