Re: PCI Passthrough, error: The driver 'pci-stub' is occupying your device 0000:08:06.2

James Neave
2011-02-21T23:51:18Z

On Mon, Feb 21, 2011 at 11:28 PM, Chris Wright <chrisw@sous-sol.org> wrote:
> * Alex Williamson (alex.williamson@redhat.com) wrote:
>> I don't know why you're getting -EBUSY for this device, but maybe we can
>> start from a clean slate and see if it helps.  Here's what I would
>> suggest:
>
> I bet this is an AMD IOMMU box.  Can we get full dmesg?
>

Hi!

Good guess, it is indeed an 890FX based board.

Here's the latest dmesg:
http://pastebin.com/0ZSP31uf

Lots and other dumps are available further up this thread.

fwiw, I've somehow managed to get it to do something different.
After passing though the soundcard, installing Ubuntu 10.10 on the VM
and trying some of the other 14.x PCI devices I managed to really
upset libvirt.
After restarting it on the host server, I added 08:06.0, 1 and 2 again
and got slightly further:

[ 5805.521230] firewire_ohci: Removed fw-ohci device.
[ 5812.092791] pci-stub 0000:08:06.0: claimed by stub
[ 5812.092861] pci-stub 0000:08:06.1: claimed by stub
[ 5812.093107] pci-stub 0000:08:06.0: claimed by stub
[ 5812.099889] pci-stub 0000:08:06.1: claimed by stub
[ 5812.102623] pci-stub 0000:08:06.2: claimed by stub
[ 5812.102723] pci-stub 0000:08:06.2: claimed by stub
[ 5812.265948] type=1400 audit(1298331554.277:41): apparmor="STATUS"
operation="profile_load"
name="libvirt-307bfcd2-9dec-29b7-1b4d-c46cd9d7cdbc" pid=3227
comm="apparmor_parser"
[ 5812.653784] device vnet0 entered promiscuous mode
[ 5812.655088] virbr0: topology change detected, propagating
[ 5812.655097] virbr0: port 1(vnet0) entering forwarding state
[ 5812.655103] virbr0: port 1(vnet0) entering forwarding state
[ 5812.781203] pci-stub 0000:08:06.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[ 5812.820087] pci-stub 0000:08:06.0: restoring config space at offset
0x1 (was 0x2100000, writing 0x2100001)
[ 5813.048427] assign device 0:8:6.0
[ 5813.048463] type=1400 audit(1298331555.057:42): apparmor="DENIED"
operation="capable" parent=1
profile="libvirt-307bfcd2-9dec-29b7-1b4d-c46cd9d7cdbc" pid=3236
comm="kvm" capability=17 capname="sys_rawio"
[ 5813.048505] deassign device 0:8:6.0
[ 5813.080089] pci-stub 0000:08:06.0: restoring config space at offset
0x1 (was 0x2100000, writing 0x2100001)
[ 5813.080116] pci-stub 0000:08:06.0: PCI INT A disabled
[ 5813.277511] type=1400 audit(1298331555.287:43): apparmor="STATUS"
operation="profile_remove"
name="libvirt-307bfcd2-9dec-29b7-1b4d-c46cd9d7cdbc" pid=3251
comm="apparmor_parser"
[ 5813.340516] uhci_hcd 0000:08:06.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
[ 5813.340534] uhci_hcd 0000:08:06.0: UHCI Host Controller
[ 5813.340660] uhci_hcd 0000:08:06.0: new USB bus registered, assigned
bus number 4
[ 5813.340708] uhci_hcd 0000:08:06.0: irq 20, io base 0x00007f00
[ 5813.340717] uhci_hcd 0000:08:06.0: unable to allocate consistent
memory for frame list
[ 5813.340858] uhci_hcd 0000:08:06.0: startup error -16
[ 5813.340950] uhci_hcd 0000:08:06.0: USB bus 4 deregistered
[ 5813.341044] uhci_hcd 0000:08:06.0: PCI INT A disabled
[ 5813.341049] uhci_hcd 0000:08:06.0: init 0000:08:06.0 fail, -16

'apparmor="DENIED"', I've fixed those before by adding to
/etc/apparmor/ profiles for libvirt.
I guess that means I have to add rw access for sys_rawio?

That's all for tonight, probably won't get any more time on this until
Wednesday 19:00 GMT.

Many Thanks,

James.