From: Wolfgang Nothdurft Subject: pci passthough a dlink dwa-556 pci express wlan card Date: Sat, 18 Jul 2009 16:58:22 +0200 Message-ID: <4A61E30E.8000201@linux-dude.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060700030601000105020208" To: kvm@vger.kernel.org Return-path: Received: from mail.linux-dude.de ([213.179.141.24]:3508 "EHLO mail.linux-dude.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751089AbZGRPdh (ORCPT ); Sat, 18 Jul 2009 11:33:37 -0400 Received: from home.linux-dude.de (dslb-088-064-094-201.pools.arcor-ip.net [88.64.94.201]) (authenticated bits=0) by mail.linux-dude.de (8.14.0/8.14.0) with ESMTP id n6IEvn8u011547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sat, 18 Jul 2009 16:57:50 +0200 Received: from [192.168.1.7] (gaming.linux-dude.de [192.168.1.7]) by home.linux-dude.de (8.14.0/8.14.0) with ESMTP id n6IEwLuD001514 for ; Sat, 18 Jul 2009 16:58:21 +0200 Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------060700030601000105020208 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Hi, I want to assign a DLINK DWA-556 to a virtual machine on a Supermicro C2SBC-Q Board with vt-d enabled. When I start the machinge I get a "freeing invalid memtype" error. I saw the card in the virtual machine and the ath9k driver load without errors, all tools can access the card, but I get no connections or see wlans during iwlist scan. On the host the card works properly. I use qemu-kvm-devel-88 and kvm-kmod-devel-88. Hopefully someone can help me with this problem. regards wolfgang I attached the lspci output from the host and guest. start command: kvm -name router -hda /kvm/router/hda.img -hdb /kvm/router/swap.img -m 256 -net nic,vlan=0,macaddr=52:54:00:12:34:56 -net tap,vlan=0 -curses -pcidevice host=05:00.0 this is the dmesg output on the host. pci 0000:05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 assign device: host bdf = 5:0:0 pci 0000:05:00.0: irq 33 for MSI/MSI-X pci 0000:05:00.0: irq 33 for MSI/MSI-X kvm:4509 freeing invalid memtype d0300000-d0301000 pci 0000:05:00.0: irq 33 for MSI/MSI-X pci 0000:05:00.0: irq 33 for MSI/MSI-X kvm:4509 freeing invalid memtype d0301000-d0310000 pci 0000:05:00.0: PCI INT A disabled Host Kernel: Linux kvmserver 2.6.30-gentoo-r2 #11 SMP Sat Jul 18 15:27:53 CEST 2009 x86_64 Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz GenuineIntel GNU/Linux Guest Kernel: Linux router 2.6.30 #7 SMP Sat Jul 18 15:53:28 CEST 2009 i686 QEMU Virtual CPU version 0.10.50 GenuineIntel GNU/Linux dmesg output in Guest: ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10 ath9k 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10 ath9k 0000:00:05.0: setting latency timer to 64 phy0: Selected rate control algorithm 'ath9k_rate_control' Registered led device: ath9k-phy0::radio Registered led device: ath9k-phy0::assoc Registered led device: ath9k-phy0::tx Registered led device: ath9k-phy0::rx phy0: Atheros AR5418 MAC/BB Rev:2 AR2133 RF Rev:81: mem=0xd0820000, irq=10 dmesg output testing the card direct on the Host: ath9k 0000:05:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 ath9k 0000:05:00.0: setting latency timer to 64 phy0: Selected rate control algorithm 'ath9k_rate_control' Registered led device: ath9k-phy0::radio Registered led device: ath9k-phy0::assoc Registered led device: ath9k-phy0::tx Registered led device: ath9k-phy0::rx phy0: Atheros AR5418 MAC/BB Rev:2 AR2133 RF Rev:81: mem=0xffffc200011e0000, irq=16 --------------060700030601000105020208 Content-Type: text/plain; name="lspci-host.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lspci-host.txt" 05:00.0 Network controller: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter (rev 01) Subsystem: D-Link System Inc Device 3a70 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- --------------060700030601000105020208 Content-Type: text/plain; name="lspci-guest.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lspci-guest.txt" 00:05.0 Network controller: Atheros Communications Inc. AR5418 802.11abgn Wireless PCI Express Adapter (rev 01) Subsystem: D-Link System Inc Device 3a70 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-