From owner-freebsd-virtualization@freebsd.org Tue Jul 28 00:16:23 2015 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 256309AB32C for ; Tue, 28 Jul 2015 00:16:23 +0000 (UTC) (envelope-from igor.arabesc.pavlov@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4D83BD0 for ; Tue, 28 Jul 2015 00:16:22 +0000 (UTC) (envelope-from igor.arabesc.pavlov@gmail.com) Received: by qkbm65 with SMTP id m65so45582204qkb.2 for ; Mon, 27 Jul 2015 17:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=RwQQnjVSa6koSoFTg8rFcvMpHmxd+08s5pmlR82aIEI=; b=DtbBIdDzoIeCO43ZgFL9hni0whBRGR+MMYkrRo9SBK4XMfvWCRekE+Z2E+jQzWoaEX FL0hmk3bfvq1kh4eZHtnH8l03dqGvcnaF+nWbsdcrM+NpFRmsz4Dj4zZr3y0Uj492paV 7q4vL7F7tUU1rHki2/7J6GkQNQ4rWVjInvwq4hB8/mE6Jtf3zoII0STC0z1J6UsrfMyu b/yUBMArc+X4OuprMKWjAGy/YIvZ07uA07e1x40EohFcRwlzaGd32MbX8yOL4ECUky5/ 7TsXVGQ5hAT+FETE4PQoMxmwAaD62Pe/OUJ9VOX3/1/LFEjeDmic2UwsfwshiwfzLs4N OQPg== MIME-Version: 1.0 X-Received: by 10.55.40.230 with SMTP id o99mr45113282qko.28.1438042581933; Mon, 27 Jul 2015 17:16:21 -0700 (PDT) Received: by 10.140.98.138 with HTTP; Mon, 27 Jul 2015 17:16:21 -0700 (PDT) Date: Tue, 28 Jul 2015 03:16:21 +0300 Message-ID: Subject: An issue with a pair of wi-fi adapters in a guest OS From: Igor Pavlov To: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2015 00:16:23 -0000 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. Is it possible to resolve this issue? -- Igor