Hi Igor,

On Mon, Jul 27, 2015 at 5:16 PM, Igor Pavlov
<igor.arabesc.pav...@gmail.com> wrote:
> Hello,
>
> I'm trying to configure a wi-fi AP in a guest OS.
> The guest OS is the OpenWRT v15.05-RC3 (I also tried current version of the
> Arch Linux with the same result), it runs in the bhyve and the host OS is:
> #uname -msr
> FreeBSD 10.1-RELEASE-p14 amd64
>
> The system CPU is: # sysctl hw.model
> hw.model: Intel(R) Xeon(R) CPU E3-1265L v3 @ 2.50GHz
> (it supports VT-d)
>
> There are two miniPCIe wi-fi adapters which are installed in a PCIe switch
> card and passed to the guest OS:
>
> //It's the PCIe switch adapter
> # pciconf -lvbc pci0:1:0:0
> pcib2@pci0:1:0:0:    class=0x060400 card=0xd01d19b6 chip=0x860610b5
> rev=0xba hdr=0x01
>     vendor     = 'PLX Technology, Inc.'
>     device     = 'PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s)
> Switch'
>     class      = bridge
>     subclass   = PCI-PCI
>     bar   [10] = type Memory, range 32, base 0xf7a00000, size 131072,
> enabled
>     cap 01[40] = powerspec 3  supports D0 D3  current D0
>     cap 05[48] = MSI supports 4 messages, 64 bit, vector masks
>     cap 10[68] = PCI-Express 2 upstream port max data 128(512) link x1(x1)
>                  speed 5.0(5.0) ASPM disabled(L0s/L1)
>     cap 0d[a4] = PCI Bridge card=0xd01d19b6
>     ecap 0003[100] = Serial 1 ba860110b5df0e00
>     ecap 0001[fb4] = AER 1 0 fatal 0 non-fatal 1 corrected
>     ecap 0004[138] = Power Budgeting 1
>     ecap 0002[148] = VC 1 max VC1 lowpri VC0-VC1
>     ecap 000b[448] = Vendor 1 ID 0
>     ecap 000b[950] = Vendor 1 ID 1
>
> //It's an ethernet adapter, it's used in the host OS
> # pciconf -lvbc pci0:5:0:0
> igb0@pci0:5:0:0:    class=0x020000 card=0x0000ffff chip=0x15338086 rev=0x03
> hdr=0x00
>     vendor     = 'Intel Corporation'
>     device     = 'I210 Gigabit Network Connection'
>     class      = network
>     subclass   = ethernet
>     bar   [10] = type Memory, range 32, base 0xf7700000, size 1048576,
> enabled
>     bar   [18] = type I/O Port, range 32, base 0xe000, size 32, enabled
>     bar   [1c] = type Memory, range 32, base 0xf7800000, size 16384, enabled
>     cap 01[40] = powerspec 3  supports D0 D3  current D0
>     cap 05[50] = MSI supports 1 message, 64 bit, vector masks
>     cap 11[70] = MSI-X supports 5 messages, enabled
>                  Table in map 0x1c[0x0], PBA in map 0x1c[0x2000]
>     cap 10[a0] = PCI-Express 2 endpoint max data 128(512) FLR link x1(x1)
>                  speed 2.5(2.5) ASPM disabled(L0s/L1)
>     ecap 0001[100] = AER 2 0 fatal 0 non-fatal 1 corrected
>     ecap 0003[140] = Serial 1 00031dffff0f5039
>     ecap 0017[1a0] = TPH Requester 1
>
> //It's the QCA9880, 1-st wi-fi adapter, it's used in the PCI device
> passthrough to the guest OS
> # pciconf -lvbc pci0:6:0:0
> ppt0@pci0:6:0:0:    class=0x028000 card=0x00000000 chip=0x003c168c rev=0x00
> hdr=0x00
>     vendor     = 'Atheros Communications Inc.'
>     class      = network
>     bar   [10] = type Memory, range 64, base 0xf7200000, size 2097152,
> enabled
>     cap 01[40] = powerspec 3  supports D0 D1 D3  current D0
>     cap 05[50] = MSI supports 8 messages, vector masks enabled with 1
> message
>     cap 10[70] = PCI-Express 2 endpoint max data 128(256) link x1(x1)
>                  speed 2.5(2.5) ASPM disabled(L0s/L1)
>     ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
>     ecap 0002[140] = VC 1 max VC0
>     ecap 0003[160] = Serial 1 0000000000000000
>
> // It's the AR9380, 2-nd wi-fi adapter, it's used in the PCI device
> passthrough to the guest OS
> # pciconf -lvbc pci0:7:0:0
> ppt1@pci0:7:0:0:    class=0x028000 card=0x3114168c chip=0x0030168c rev=0x01
> hdr=0x00
>     vendor     = 'Atheros Communications Inc.'
>     device     = 'AR9300 Wireless LAN adaptor'
>     class      = network
>     bar   [10] = type Memory, range 64, base 0xf7900000, size 131072,
> enabled
>     cap 01[40] = powerspec 3  supports D0 D1 D3  current D0
>     cap 05[50] = MSI supports 4 messages, 64 bit, vector masks
>     cap 10[70] = PCI-Express 2 endpoint max data 128(128) link x1(x1)
>                  speed 2.5(2.5) ASPM disabled(L0s/L1)
>     ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
>     ecap 0002[140] = VC 1 max VC0
>     ecap 0003[300] = Serial 1 0000000000000000
>
> Well, the QCA9880 works more or less without issues, but there is the issue
> with the AR9380 - it doesn't work properly. I can see it in the guest OS, I
> can configure it, I can scan environment for networks, but when I start it
> in the AP mode there is no corresponding SSID in the air.
> I see following messages in the guest OS boot log: # dmesg | grep ath9k
> [    7.410394] ath9k 0000:00:07.0: can't derive routing for PCI INT A
> [    7.411012] ath9k 0000:00:07.0: PCI INT A: no GSI
> It sounds not good.
> I don't know if it relates to the FreeBSD/bhyve or a guest OS. In my
> opinion, the former is more likely.
>

bhyve does not passthrough legacy PCI interrupts so the guest ath9k
driver is not able to attach an interrupt handler to PCI INT_A.

Is it possible to get the ath9k driver to use MSI instead? The device
does support it.

> Is it possible to resolve this issue?

Its hard to passthrough legacy PCI interrupts in the general case
because the interrupt can be shared with other host devices. However,
I am happy to be proven wrong on this one :-)

best
Neel

>
> --
> Igor
> _______________________________________________
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to 
> "freebsd-virtualization-unsubscr...@freebsd.org"
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to