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

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- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at d0300000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA 
PME(D0+,D1+,D2-,D3hot+,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Count=1/1 
Enable-
                Address: fee0300c  Data: 418b
        Capabilities: [60] Express (v1) Legacy Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <128ns, 
L1 <2us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- 
Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- 
TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency 
L0 <512ns, L1 <64us
                        ClockPM- Suprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ 
DLActive- BWMgmt- ABWMgmt-
        Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
                Vector table: BAR=0 offset=00000000
                PBA: BAR=0 offset=00000000
        Capabilities: [100] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- 
RxOF- MalfTLP- ECRC- UnsupReq+ ACSVoil-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- 
RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-
                UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- 
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-
                CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                AERCap: First Error Pointer: 14, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [140] Virtual Channel <?>

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- <TAbort- 
<MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at f2010000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Message Signalled Interrupts: Mask- 64bit- Count=1/1 
Enable-
                Address: 00000000  Data: 0000
        Capabilities: [50] MSI-X: Enable- Mask- TabSize=1
                Vector table: BAR=0 offset=00000000
                PBA: BAR=0 offset=00000000
        Kernel driver in use: ath9k
        Kernel modules: ath9k

Reply via email to