3

I've got two R9 280's installed in my system. In Ubuntu when I run lspci -nn both the cards have the same device id.

Example Output:

01:00.0 Example GPU 1 [8080:aa68]
04:00.0 Example GPU 2 [8080:aa68]

Notice the device ids "8080:aa68" are the same. So my question is why are the ids the same? I'm trying to pass through one of the cards to kvm but both get passed because the ids are the same. So what could I do to solve this?

Update 1: I've tried setpci -s 04:00.0 02.w=aa69 it doesn't do anything the device id stays the same. I also tried echo "8086 10f5" > /sys/bus/pci/drivers/radeon/new_id but it says the file exists.

Update 2: If I do this echo 0000:04:00.0 > /sys/bus/pci/devices/0000:04:00.0/driver/unbind then my system freezes

1 Answers1

2

Because they are exactly the same hardware so it will show the same vendor id and same device id. The only difference between the 2 cards is the slot it is sitting in (probably the 1st part in your output).

You can use dmidecode –t slot to match it with the output from lspci -nn to identify them each but you can not tell KVM that.

Interesting question though and generally I would leave it at "you probably need another, different, card" when I came across this:

On kernel.org it says that "Writing a device ID to /sys/bus/pci/drivers/.../new_id will attempt to dynamically add a new device ID to a PCI device driver. This may allow the driver to support more hardware than was included in the driver's static device ID support table at compile time. The format for the device ID is: VVVV DDDD SVVV SDDD CCCC MMMM PPPP. That is Vendor ID, Device ID, Subsystem Vendor ID, Subsystem Device ID, Class, Class Mask, and Private Driver Data. The Vendor ID and Device ID fields are required, the rest are optional. Upon successfully adding an ID, the driver will probe for the device and attempt to bind to it. For example: # echo "8086 10f5" > /sys/bus/pci/drivers/foo/new_id"

And that lead me to the command setpci and an U&L topic that suggests you can change the device ID of PCI cards.

So maybe you can change one of the 8080:aa68 to another device id with one of these 2 methods. Do pick an id that is a similar card but maybe a bit older or newer than the one you have. Changing it to a random device id will probably cause trouble.

Rinzwind
  • 309,379