* Re: [AMD iommu] pci Failed to assign device "hostdev0" : Device or resource busy
2011-12-12 18:36 ` Don Dutile
@ 2011-12-13 0:21 ` Andreas Hartmann
2011-12-13 8:40 ` Andreas Hartmann
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Andreas Hartmann @ 2011-12-13 0:21 UTC (permalink / raw)
To: Don Dutile; +Cc: kvm
Am Mon, 12 Dec 2011 13:36:36 -0500
schrieb Don Dutile <ddutile@redhat.com>:
> On 12/12/2011 06:15 AM, Andreas Hartmann wrote:
> > Hello!
> >
> > I've got a few questions to a problem, which already was analyzed here
> > sometime ago:
> > http://markmail.org/message/dspovwvzp3wtdrf6#query:+page:1+mid:i2oph4xwfmiknt3y+state:results
> >
> > My situation is a bit different. I do have two PCI cards (a Linksys wlan
> > card and an intel e100 card). Each of these cards should be managed in
> > an own VM. I do have no problems with IRQ sharing (each device does have its own IRQ).
> >
> > I'm using linux 3.0.6, kvm 0.15 and libvirt 0.9.7. Mainboard is: GA-990XA-UD3.
> >
> >
> > The problem is: both cards are behind a PCI-PCI bridge:
> >
> > 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
> >
> >
> > -[0000:00]-+-00.0 ATI Technologies Inc RD890 PCI to PCI bridge (external gfx0 port B)
> > +-00.2 ATI Technologies Inc Device 5a23
> > +-02.0-[01]--+-00.0 ATI Technologies Inc Device 6759
> > | \-00.1 ATI Technologies Inc Device aa90
> > +-04.0-[02]----00.0 Device 1b6f:7023
> > +-09.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
> > +-0a.0-[04]----00.0 Device 1b6f:7023
> > +-11.0 ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
> > +-12.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> > +-12.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> > +-13.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> > +-13.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> > +-14.0 ATI Technologies Inc SBx00 SMBus Controller
> > +-14.1 ATI Technologies Inc SB700/SB800 IDE Controller
> > +-14.2 ATI Technologies Inc SBx00 Azalia (Intel HDA)
> > +-14.3 ATI Technologies Inc SB700/SB800 LPC host controller
> >
> > +-14.4-[05]--+-06.0 Intel Corporation 82557/8/9/0/1 Ethernet Pro 100
> > | \-07.0 RaLink RT2800 802.11n PCI
> >
> You cannot assign two devices behind a (legacy) PCI (not PCIe) bridge to two
> different VMs because PCI devices dont provide a B:D.F in their transaction headers;
> In this case, the PCIe-PCI bridge/switch prepends the bridge's B:D.F in front of
> a transaction that is sourced by 05:06.0 or 05:07.0 .
>
> So, the devices cannot be isolated from each other's (mem) mapping domains in the
> IOMMU, thus, libvirt prevents this (security) violation from being enabled.
Ok. If I remove the intel card and put in instead a 32 bit PCIe card
like TP-Link TG-3468, I could assign each of these two cards to
different VMs.
Is this correct?
[...]
> > 1. Is there any way to get the devices into different VMs? (I can't put them to another PCI slot as there are just 2 PCI slots on the board.)
> Only if the two slots are behind different PCIe-PCI bridges .
>
> > 2. Is there any fix to prevent the host crash - maybe in a newer version of kvm or kernel?
> don't assign the PCI bridge; libvirt does all the proper bind/unbinding of devices
> for assigned devices, so the above echo steps are unnecessary if you use libvirt.
If I just remove the intel card, I should be able to assign the wlan
card to one of my VMs. I'll try that.
Thank you for your advice!
Kind regards,
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [AMD iommu] pci Failed to assign device "hostdev0" : Device or resource busy
2011-12-12 18:36 ` Don Dutile
2011-12-13 0:21 ` Andreas Hartmann
@ 2011-12-13 8:40 ` Andreas Hartmann
2011-12-19 20:32 ` Don Dutile
2011-12-13 9:40 ` Andreas Hartmann
2011-12-13 14:16 ` Andreas Hartmann
3 siblings, 1 reply; 8+ messages in thread
From: Andreas Hartmann @ 2011-12-13 8:40 UTC (permalink / raw)
To: Don Dutile; +Cc: kvm
Hello Don!
Am Tue, 13 Dec 2011 01:21:41 +0100
schrieb Andreas Hartmann <andihartmann@01019freenet.de>:
> Am Mon, 12 Dec 2011 13:36:36 -0500
> schrieb Don Dutile <ddutile@redhat.com>:
>
> > On 12/12/2011 06:15 AM, Andreas Hartmann wrote:
> > > Hello!
> > >
> > > I've got a few questions to a problem, which already was analyzed here
> > > sometime ago:
> > > http://markmail.org/message/dspovwvzp3wtdrf6#query:+page:1+mid:i2oph4xwfmiknt3y+state:results
> > >
> > > My situation is a bit different. I do have two PCI cards (a Linksys wlan
> > > card and an intel e100 card). Each of these cards should be managed in
> > > an own VM. I do have no problems with IRQ sharing (each device does have its own IRQ).
> > >
> > > I'm using linux 3.0.6, kvm 0.15 and libvirt 0.9.7. Mainboard is: GA-990XA-UD3.
> > >
> > >
> > > The problem is: both cards are behind a PCI-PCI bridge:
> > >
> > > 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
> > >
> > >
> > > -[0000:00]-+-00.0 ATI Technologies Inc RD890 PCI to PCI bridge (external gfx0 port B)
> > > +-00.2 ATI Technologies Inc Device 5a23
> > > +-02.0-[01]--+-00.0 ATI Technologies Inc Device 6759
> > > | \-00.1 ATI Technologies Inc Device aa90
> > > +-04.0-[02]----00.0 Device 1b6f:7023
> > > +-09.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
> > > +-0a.0-[04]----00.0 Device 1b6f:7023
> > > +-11.0 ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
> > > +-12.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> > > +-12.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> > > +-13.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> > > +-13.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> > > +-14.0 ATI Technologies Inc SBx00 SMBus Controller
> > > +-14.1 ATI Technologies Inc SB700/SB800 IDE Controller
> > > +-14.2 ATI Technologies Inc SBx00 Azalia (Intel HDA)
> > > +-14.3 ATI Technologies Inc SB700/SB800 LPC host controller
> > >
> > > +-14.4-[05]--+-06.0 Intel Corporation 82557/8/9/0/1 Ethernet Pro 100
> > > | \-07.0 RaLink RT2800 802.11n PCI
> > >
> > You cannot assign two devices behind a (legacy) PCI (not PCIe) bridge to two
> > different VMs because PCI devices dont provide a B:D.F in their transaction headers;
> > In this case, the PCIe-PCI bridge/switch prepends the bridge's B:D.F in front of
> > a transaction that is sourced by 05:06.0 or 05:07.0 .
> >
> > So, the devices cannot be isolated from each other's (mem) mapping domains in the
> > IOMMU, thus, libvirt prevents this (security) violation from being enabled.
>
> Ok. If I remove the intel card and put in instead a 32 bit PCIe card
> like TP-Link TG-3468, I could assign each of these two cards to
> different VMs.
>
> Is this correct?
>
> [...]
>
> > > 1. Is there any way to get the devices into different VMs? (I can't put them to another PCI slot as there are just 2 PCI slots on the board.)
> > Only if the two slots are behind different PCIe-PCI bridges .
> >
> > > 2. Is there any fix to prevent the host crash - maybe in a newer version of kvm or kernel?
> > don't assign the PCI bridge; libvirt does all the proper bind/unbinding of devices
> > for assigned devices, so the above echo steps are unnecessary if you use libvirt.
>
> If I just remove the intel card, I should be able to assign the wlan
> card to one of my VMs. I'll try that.
Meanwhile I checked this scenario: I removed the intel card and
rebooted. I got the following pci tree:
-[0000:00]-+-00.0 ATI Technologies Inc RD890 PCI to PCI bridge (external gfx0 port B)
+-00.2 ATI Technologies Inc Device 5a23
+-02.0-[01]--+-00.0 ATI Technologies Inc Device 6759
| \-00.1 ATI Technologies Inc Device aa90
+-04.0-[02]----00.0 Device 1b6f:7023
+-09.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
+-0a.0-[04]----00.0 Device 1b6f:7023
+-11.0 ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
+-12.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
+-12.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
+-13.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
+-13.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
+-14.0 ATI Technologies Inc SBx00 SMBus Controller
+-14.1 ATI Technologies Inc SB700/SB800 IDE Controller
+-14.2 ATI Technologies Inc SBx00 Azalia (Intel HDA)
+-14.3 ATI Technologies Inc SB700/SB800 LPC host controller
+-14.4-[05]----07.0 RaLink RT2800 802.11n PCI
+-14.5 ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
+-15.0-[06]--
+-16.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
+-16.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
+-18.0 Advanced Micro Devices [AMD] Device 1600
+-18.1 Advanced Micro Devices [AMD] Device 1601
+-18.2 Advanced Micro Devices [AMD] Device 1602
+-18.3 Advanced Micro Devices [AMD] Device 1603
+-18.4 Advanced Micro Devices [AMD] Device 1604
\-18.5 Advanced Micro Devices [AMD] Device 1605
But this doesn't work, too: I had to manually unbind the bridge (as described in the mail before - it was
not necessary to manually unbind the device itself). On closing the VM,
the complete host crashed with this screen (excerpt):
amd_iommu_domain_destroy
iommu_domain_free
kvm_iommu_unmap_guest
kvm_arch_destroy_vm
kvm_destroy_vm
kvm_vcpu_release
__fput
flip_close
put_files_struct
do_exit
do_group_exit
get_signal_to_deliver
do_signal
do_notify_resume
int_signal
Seams to even not work if there's just one (legal) PCI device plugged
in.
Could somebody please shed some light on this problem?
Thank you,
kind regards,
Andreas Hartmann
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [AMD iommu] pci Failed to assign device "hostdev0" : Device or resource busy
2011-12-13 8:40 ` Andreas Hartmann
@ 2011-12-19 20:32 ` Don Dutile
[not found] ` <20111220000002.0efc3ec1@dualc.maya.org>
0 siblings, 1 reply; 8+ messages in thread
From: Don Dutile @ 2011-12-19 20:32 UTC (permalink / raw)
To: Andreas Hartmann; +Cc: kvm
On 12/13/2011 03:40 AM, Andreas Hartmann wrote:
> Hello Don!
>
Andreas,
sorry for the delay, I don't follow this email list frequently (read: !daily).
> Am Tue, 13 Dec 2011 01:21:41 +0100
> schrieb Andreas Hartmann<andihartmann@01019freenet.de>:
>
>> Am Mon, 12 Dec 2011 13:36:36 -0500
>> schrieb Don Dutile<ddutile@redhat.com>:
>>
>>> On 12/12/2011 06:15 AM, Andreas Hartmann wrote:
>>>> Hello!
>>>>
>>>> I've got a few questions to a problem, which already was analyzed here
>>>> sometime ago:
>>>> http://markmail.org/message/dspovwvzp3wtdrf6#query:+page:1+mid:i2oph4xwfmiknt3y+state:results
>>>>
>>>> My situation is a bit different. I do have two PCI cards (a Linksys wlan
>>>> card and an intel e100 card). Each of these cards should be managed in
>>>> an own VM. I do have no problems with IRQ sharing (each device does have its own IRQ).
>>>>
>>>> I'm using linux 3.0.6, kvm 0.15 and libvirt 0.9.7. Mainboard is: GA-990XA-UD3.
>>>>
>>>>
>>>> The problem is: both cards are behind a PCI-PCI bridge:
>>>>
>>>> 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40)
>>>>
>>>>
>>>> -[0000:00]-+-00.0 ATI Technologies Inc RD890 PCI to PCI bridge (external gfx0 port B)
>>>> +-00.2 ATI Technologies Inc Device 5a23
>>>> +-02.0-[01]--+-00.0 ATI Technologies Inc Device 6759
>>>> | \-00.1 ATI Technologies Inc Device aa90
>>>> +-04.0-[02]----00.0 Device 1b6f:7023
>>>> +-09.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
>>>> +-0a.0-[04]----00.0 Device 1b6f:7023
>>>> +-11.0 ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
>>>> +-12.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
>>>> +-12.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
>>>> +-13.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
>>>> +-13.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
>>>> +-14.0 ATI Technologies Inc SBx00 SMBus Controller
>>>> +-14.1 ATI Technologies Inc SB700/SB800 IDE Controller
>>>> +-14.2 ATI Technologies Inc SBx00 Azalia (Intel HDA)
>>>> +-14.3 ATI Technologies Inc SB700/SB800 LPC host controller
>>>>
>>>> +-14.4-[05]--+-06.0 Intel Corporation 82557/8/9/0/1 Ethernet Pro 100
>>>> | \-07.0 RaLink RT2800 802.11n PCI
>>>>
>>> You cannot assign two devices behind a (legacy) PCI (not PCIe) bridge to two
>>> different VMs because PCI devices dont provide a B:D.F in their transaction headers;
>>> In this case, the PCIe-PCI bridge/switch prepends the bridge's B:D.F in front of
>>> a transaction that is sourced by 05:06.0 or 05:07.0 .
>>>
>>> So, the devices cannot be isolated from each other's (mem) mapping domains in the
>>> IOMMU, thus, libvirt prevents this (security) violation from being enabled.
>>
>> Ok. If I remove the intel card and put in instead a 32 bit PCIe card
>> like TP-Link TG-3468, I could assign each of these two cards to
>> different VMs.
>>
KISS: Don't try to assign legacy PCI devices; just PCIe. ;-)
Where is "TP-Link TG-3468" in lspci output below? the AMD devices in 18.0->18.5 ???
>> Is this correct?
>>
>> [...]
>>
>>>> 1. Is there any way to get the devices into different VMs? (I can't put them to another PCI slot as there are just 2 PCI slots on the board.)
>>> Only if the two slots are behind different PCIe-PCI bridges .
>>>
>>>> 2. Is there any fix to prevent the host crash - maybe in a newer version of kvm or kernel?
>>> don't assign the PCI bridge; libvirt does all the proper bind/unbinding of devices
>>> for assigned devices, so the above echo steps are unnecessary if you use libvirt.
>>
>> If I just remove the intel card, I should be able to assign the wlan
>> card to one of my VMs. I'll try that.
>
> Meanwhile I checked this scenario: I removed the intel card and
> rebooted. I got the following pci tree:
>
> -[0000:00]-+-00.0 ATI Technologies Inc RD890 PCI to PCI bridge (external gfx0 port B)
> +-00.2 ATI Technologies Inc Device 5a23
> +-02.0-[01]--+-00.0 ATI Technologies Inc Device 6759
> | \-00.1 ATI Technologies Inc Device aa90
> +-04.0-[02]----00.0 Device 1b6f:7023
> +-09.0-[03]----00.0 Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
> +-0a.0-[04]----00.0 Device 1b6f:7023
> +-11.0 ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode]
> +-12.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> +-12.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> +-13.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> +-13.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> +-14.0 ATI Technologies Inc SBx00 SMBus Controller
> +-14.1 ATI Technologies Inc SB700/SB800 IDE Controller
> +-14.2 ATI Technologies Inc SBx00 Azalia (Intel HDA)
> +-14.3 ATI Technologies Inc SB700/SB800 LPC host controller
> +-14.4-[05]----07.0 RaLink RT2800 802.11n PCI
>
> +-14.5 ATI Technologies Inc SB700/SB800 USB OHCI2 Controller
> +-15.0-[06]--
> +-16.0 ATI Technologies Inc SB700/SB800 USB OHCI0 Controller
> +-16.2 ATI Technologies Inc SB700/SB800 USB EHCI Controller
> +-18.0 Advanced Micro Devices [AMD] Device 1600
> +-18.1 Advanced Micro Devices [AMD] Device 1601
> +-18.2 Advanced Micro Devices [AMD] Device 1602
> +-18.3 Advanced Micro Devices [AMD] Device 1603
> +-18.4 Advanced Micro Devices [AMD] Device 1604
> \-18.5 Advanced Micro Devices [AMD] Device 1605
>
> But this doesn't work, too: I had to manually unbind the bridge (as described in the mail before - it was
> not necessary to manually unbind the device itself). On closing the VM,
> the complete host crashed with this screen (excerpt):
>
You cannot assign a PCI bridge. In fact, you don't need to for device-assignment.
You just need to assign the device itself; nothing else in the host PCI hierarchy.
.... assuming the device is a PCIe device, and not a graphics card/device.
again, libvirt does all the bind/unbinding you need to do.
You want to do a 'virsh device-attach <dom-id> pci.xml
with pci.xml looking something like:
<hostdev mode='subsystem' type='pci' managed='no'>
<source>
<address bus='0' slot='XX' function='0'/>
</source>
</hostdev>
where XX is replaced by the value of the slot your PCIe device is plugged into.
> amd_iommu_domain_destroy
> iommu_domain_free
> kvm_iommu_unmap_guest
> kvm_arch_destroy_vm
> kvm_destroy_vm
> kvm_vcpu_release
> __fput
> flip_close
> put_files_struct
> do_exit
> do_group_exit
> get_signal_to_deliver
> do_signal
> do_notify_resume
> int_signal
>
> Seams to even not work if there's just one (legal) PCI device plugged
> in.
>
> Could somebody please shed some light on this problem?
>
>
> Thank you,
> kind regards,
> Andreas Hartmann
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [AMD iommu] pci Failed to assign device "hostdev0" : Device or resource busy
2011-12-12 18:36 ` Don Dutile
2011-12-13 0:21 ` Andreas Hartmann
2011-12-13 8:40 ` Andreas Hartmann
@ 2011-12-13 9:40 ` Andreas Hartmann
2011-12-13 14:16 ` Andreas Hartmann
3 siblings, 0 replies; 8+ messages in thread
From: Andreas Hartmann @ 2011-12-13 9:40 UTC (permalink / raw)
To: Don Dutile; +Cc: kvm
Hello Don!
Some additional information about the bridge device 00:14.4 itself
(both legacy PCI cards are behind this bridge device - it's an output with both legacy devices plugged in):
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40) (prog-if 01 [Subtractive decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop+ ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64
Bus: primary=00, secondary=05, subordinate=05, sec-latency=64
I/O behind bridge: 0000a000-0000afff
Memory behind bridge: fda00000-fdafffff
Prefetchable memory behind bridge: fd900000-fd9fffff
Secondary status: 66MHz- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
If the bridge is put to the VM too, libvirt exits with the following error:
error: internal error Unable to reset PCI device 0000:00:14.4: no FLR, PM reset or bus reset available
The wlan device looks like this:
05:07.0 Network controller: RaLink RT2800 802.11n PCI
Subsystem: Linksys Device 0067
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32 (500ns min, 1000ns max), Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 21
Region 0: Memory at fdae0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Thank you for your advice,
kind regards,
Andreas Hartmann
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [AMD iommu] pci Failed to assign device "hostdev0" : Device or resource busy
2011-12-12 18:36 ` Don Dutile
` (2 preceding siblings ...)
2011-12-13 9:40 ` Andreas Hartmann
@ 2011-12-13 14:16 ` Andreas Hartmann
3 siblings, 0 replies; 8+ messages in thread
From: Andreas Hartmann @ 2011-12-13 14:16 UTC (permalink / raw)
To: Don Dutile; +Cc: kvm
Hello Don!
Am Tue, 13 Dec 2011 01:21:41 +0100
schrieb Andreas Hartmann <andihartmann@01019freenet.de>:
[...]
> Ok. If I remove the intel card and put in instead a 32 bit PCIe card
> like TP-Link TG-3468, I could assign each of these two cards to
> different VMs.
>
> Is this correct?
No - it isn't correct - but don't now why!
1. The legacy pci card, even if it's the only legacy one, can't be
used, because it crashes the machine after removing the VM (see other
post).
2. The TP-Link TG-3468 card crashes the host at the moment of "virsh
start VM".
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
Flags: bus master, fast devsel, latency 0, IRQ 43
I/O ports at de00 [size=256]
Memory at fdbff000 (64-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at fda00000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Capabilities: [48] Vital Product Data
Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [60] Express Endpoint, MSI 00
Capabilities: [84] Vendor Specific Information: Len=4c <?>
Capabilities: [100] Advanced Error Reporting
Capabilities: [12c] Virtual Channel
Capabilities: [148] Device Serial Number f1-11-00-00-68-4c-e0-00
Capabilities: [154] Power Budgeting <?>
Kernel driver in use: r8169
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
Flags: bus master, fast devsel, latency 0, IRQ 44
I/O ports at ce00 [size=256]
Memory at fd6ff000 (64-bit, prefetchable) [size=4K]
Memory at fd6f8000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel driver in use: r8169
First problem: I don't know, how to distinguish these two cards. They
use both the same module and they have equal PCI-ID's (but different
bus ID's).
If the desired one (03:00.0) is manually unbound with these lines
echo "10ec 8168" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:03:00.0" > /sys/bus/pci/devices/0000\:03\:00.0/driver/unbind
echo "0000:03:00.0" > /sys/bus/pci/drivers/pci-stub/bind
both devices are unbound (this is definitely wrong) and both devices
use the same IRQ (as they were managed by r8169, they had different
IRQs):
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller
Flags: fast devsel, IRQ 17
I/O ports at de00 [size=256]
Memory at fdbff000 (64-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at fda00000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Capabilities: [48] Vital Product Data
Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
Capabilities: [60] Express Endpoint, MSI 00
Capabilities: [84] Vendor Specific Information: Len=4c <?>
Capabilities: [100] Advanced Error Reporting
Capabilities: [12c] Virtual Channel
Capabilities: [148] Device Serial Number f1-11-00-00-68-4c-e0-00
Capabilities: [154] Power Budgeting <?>
Kernel driver in use: pci-stub
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard
Flags: fast devsel, IRQ 17
I/O ports at ce00 [size=256]
Memory at fd6ff000 (64-bit, prefetchable) [size=4K]
Memory at fd6f8000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel driver in use: pci-stub
Second problem:
If I do a "modprobe r8169", both devices are "adressed". How can I
address just one of both?
Sorry for all of these questions :-). I really would be glad, to get an
answer!
Kind regards,
Andreas Hartmann
^ permalink raw reply [flat|nested] 8+ messages in thread