Hallo zusammen,

Ich möchte einen USB-Port in eine (Full Virtualized) VM durchreichen, um hier einen USB-WLAN Stick zu verwenden.
Diese VM erfüllt die Funktion eines/r Routers/Firewall und jetzt zusätzlich eines WLAN-APs, weshalb aus Sicherheitsgründen der USB-Port mit dem WLAN-Stick als PCI-Device durchgereicht werden soll.

Der VM ist bereits eine NIC (04:02.0) zugewiesen und funktioniert auch, nur der USB-Port (00:1d.7) macht Probleme.


Wenn ich den USB-Port an die VM hängen will (bzw. beim autostart während des bootens), bekomme ich folgende Fehlermeldung:
Code:
 # xm pci-attach gateway 00:1d.7
Error: pci: 0000:00:1d.7: non-page-aligned MMIO BAR found.
Das Problem ist laut Recherche: "This is caused by the fact that the memory range for device is not correctly aligned to a page limit." und sollte durch resource realignment behoben werden.

Der pciback-Treiber ist laut "/sys/bus/pci/drivers/pciback" auch für dieses Gerät geladen:
Code:
 # l /sys/bus/pci/drivers/pciback
[....]
lrwxrwxrwx  1 root root    0 19. Mai 20:29 0000:00:1d.7 -> ../../../../devices/pci0000:00/0000:00:1d.7/
lrwxrwxrwx  1 root root    0 19. Mai 20:29 0000:04:02.0 -> ../../../../devices/pci0000:00/0000:00:1e.0/0000:04:02.0/
[....]

Hinweise, dass mit dem realignment was nicht geklappt hat, liefert:

dmesg:
Code:
# dmesg |grep "1d.7"
[    0.000000] Command line: root=/dev/disk[....] noresume splash=none showopts elevator=cfq pciback.permissive pciback.hide=(04:02.0)(00:1d.7) pci=resource_alignment=0000:00:1d.7
[    0.000000] Kernel command line: root=/dev/disk[....] noresume splash=none showopts elevator=cfq pciback.permissive pciback.hide=(04:02.0)(00:1d.7) pci=resource_alignment=0000:00:1d.7
[    0.146627] pci 0000:00:1d.7: [8086:293a] type 0 class 0x000c03
[    0.146656] pci 0000:00:1d.7: reg 10: [mem 0xe3b21800-0xe3b21bff]
[    0.146728] pci 0000:00:1d.7: Disabling memory decoding and releasing memory resources.
[    0.146972] pci 0000:00:1d.7: Rounding up size of resource #0 to 0x1000.
[    0.147170] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
[    0.147175] pci 0000:00:1d.7: PME# disabled
[    0.174506] pci 0000:00:1d.7: BAR 0: can't assign mem (size 0x1000)
[    1.653676] pciback 0000:00:1d.7: seizing device
[    1.654415] pciback 0000:00:1d.7: PCI INT A -> GSI 23 (level, low) -> IRQ 23
[    1.654584] pciback 0000:00:1d.7: PCI INT A disabled
und

# lspci -v -s 1d.7
Code:
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) (prog-if 20 [EHCI])
        Subsystem: Intel Corporation Device 34d0
        Flags: medium devsel, IRQ 23
        Memory at <ignored> (32-bit, non-prefetchable) [disabled]
        Capabilities: [50] Power Management version 2
        Capabilities: [58] Debug port: BAR=1 offset=00a0
        Capabilities: [98] PCI Advanced Features
        Kernel driver in use: pciback

Hoffe jemand kann mir hier weiterhelfen - Vielen Dank schonmal im Vorraus!




Mehr Info:

Hardware: Xeon E3110, Intel S3210SHLC Mainboard
OS: openSuSE 11.4-x64 mit XEN-Kernel "2.6.37.6-0.5-xen"
KERNEL: 2.6.37.6-0.5-xen
XEN: xen-4.0.2_02-4.7.1.x86_64




/boot/grub/menu.lst
Code:
kernel /xen.gz vga=mode-normal iommu=verbose
module /vmlinuz-xen root=/dev/disk[....] noresume splash=none showopts elevator=cfq pciback.permissive pciback.hide=04:02.0)(00:1d.7) pci=resource_alignment=0000:00:1d.7

Ressourcen:
http://wiki.xensource.com/xenwiki/XenPCIpassthrough
http://wiki.xensource.com/xenwiki/VTdHowTo

[Error : "non-page-aligned MMIO BAR found" when trying to start XEN virtual machine]
http://www.novell.com/support/search...00%20123977298