You are not logged in.

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

abarahc
Member
Registered: 2010-04-30
Posts: 128

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

was following this tutorial: http://www.linux-kvm.org/page/How_to_as … 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

EDIT :

Answered by @aw on https://bbs.archlinux.org/viewtopic.php … 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"

Offline

Board footer

Powered by FluxBB