PCIe Passthrough Atheros Wifi

lenny30

Member
May 26, 2020
94
5
8
41
HI,
I want to use an Atheros Wifi card in a VM.
I tried wiki, but every time I assign the PCI to the VM and then start it, Proxmox loses its network connection.

Atheros AR928x Wifi N Card.

GRUB is configured:

Code:
root@proxmox:~# dmesg | grep -e DMAR -e IOMMU
[    0.016543] ACPI: DMAR 0x000000007BB03FF0 0000A8 (v01                 00000003 BRXT 0100000D)
[    0.112831] DMAR: IOMMU enabled
[    0.247863] DMAR: Host address width 39
[    0.247866] DMAR: DRHD base: 0x000000fed64000 flags: 0x0
[    0.247882] DMAR: dmar0: reg_base_addr fed64000 ver 1:0 cap 1c0000c40660462 ecap 7e3ff0505e
[    0.247885] DMAR: DRHD base: 0x000000fed65000 flags: 0x1
[    0.247897] DMAR: dmar1: reg_base_addr fed65000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.247901] DMAR: RMRR base: 0x0000007b6a9000 end: 0x0000007b6c8fff
[    0.247904] DMAR: RMRR base: 0x0000007d800000 end: 0x0000007fffffff
[    0.247908] DMAR-IR: IOAPIC id 1 under DRHD base  0xfed65000 IOMMU 1
[    0.247911] DMAR-IR: HPET id 0 under DRHD base 0xfed65000
[    0.247913] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.250174] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    2.330766] DMAR: No ATSR found
[    2.330865] DMAR: dmar0: Using Queued invalidation
[    2.330871] DMAR: dmar1: Using Queued invalidation
[    2.343661] DMAR: Intel(R) Virtualization Technology for Directed I/O

Modules are configured:
Code:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
#alle vier aktiviert - 16-7-20
 vfio
 vfio_iommu_type1
 vfio_pci
 vfio_virqfd

Then i have blacklist the Driver ath9k. And use the Webgui to add the Wificard as Hardware in the VM. If i now start the VM, all Network is lost. I must reboot proxmox...
 

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
1,301
273
88
Vienna
Just to be clear, your PVE is connected via cable, right? The WiFi card can only be used in one place concurrently, i.e. if it's used in the VM it will disappear from your host.

Aside from that, potentially check that your WiFi card is an isolated IOMMU group. I.e. check the output of find /sys/kernel/iommu_groups/ -type l and lspci -nnk.
 

lenny30

Member
May 26, 2020
94
5
8
41
Hi,
the Atheros Wifi is: /sys/kernel/iommu_groups/5/devices/0000:03:00.0

root@proxmox:~# find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/7/devices/0000:00:15.0
/sys/kernel/iommu_groups/5/devices/0000:03:00.0
/sys/kernel/iommu_groups/5/devices/0000:00:13.2
/sys/kernel/iommu_groups/5/devices/0000:02:00.0
/sys/kernel/iommu_groups/5/devices/0000:00:13.0
/sys/kernel/iommu_groups/5/devices/0000:01:00.0
/sys/kernel/iommu_groups/5/devices/0000:00:13.3
/sys/kernel/iommu_groups/5/devices/0000:00:13.1
/sys/kernel/iommu_groups/3/devices/0000:00:0f.0
/sys/kernel/iommu_groups/1/devices/0000:00:02.0
/sys/kernel/iommu_groups/8/devices/0000:00:1a.0
/sys/kernel/iommu_groups/6/devices/0000:00:14.1
/sys/kernel/iommu_groups/6/devices/0000:00:14.0
/sys/kernel/iommu_groups/4/devices/0000:00:12.0
/sys/kernel/iommu_groups/2/devices/0000:00:0e.0
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/9/devices/0000:00:1f.0
/sys/kernel/iommu_groups/9/devices/0000:00:1f.1


lspci -nnk:

03:00.0 Network controller [0280]: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) [168c:002a] (rev 01)
Subsystem: Foxconn International, Inc. T77H047.31 802.11bgn Wireless Half-size Mini PCIe Card [AR9283] [105b:e01f]
Kernel modules: ath9k


Grüße
 

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
1,301
273
88
Vienna
As you can see, the device is not in an isolated group. You didn't post your full lspci output, but I'm going to assume that your ethernet card is one of the other group 5 devices.

Passing through devices that are not in an isolated IOMMU group is highly undefined behaviour and not expected to work.

There's not a lot you can do to change the IOMMU grouping, especially for a WiFi card. Usual advice would be to try different PCI(e) slots and/or update the BIOS.
 

lenny30

Member
May 26, 2020
94
5
8
41
This is the full output, you´re right, 01 and 02 is the onboard NIC...in Group 5.
i dont have another PCIe Slot, BIOS is latest.

So i cant use passthrough for the pcie slot?!

root@proxmox:~# lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Host Bridge [8086:5af0] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge [8086:7270]
00:02.0 VGA compatible controller [0300]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Graphics Controller [8086:5a84] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller [8086:2212]
Kernel driver in use: i915
Kernel modules: i915
00:0e.0 Audio device [0403]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Audio Cluster [8086:5a98] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster [8086:7270]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel, snd_sof_pci
00:0f.0 Communication controller [0780]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Trusted Execution Engine [8086:5a9a] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine [8086:7270]
Kernel driver in use: mei_me
Kernel modules: mei_me
00:12.0 SATA controller [0106]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SATA AHCI Controller [8086:5ae3] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller [8086:7270]
Kernel driver in use: ahci
Kernel modules: ahci
00:13.0 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #1 [8086:5ad8] (rev fb)
Kernel driver in use: pcieport
00:13.1 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #2 [8086:5ad9] (rev fb)
Kernel driver in use: pcieport
00:13.2 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #3 [8086:5ada] (rev fb)
Kernel driver in use: pcieport
00:13.3 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port A #4 [8086:5adb] (rev fb)
Kernel driver in use: pcieport
00:14.0 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port B #1 [8086:5ad6] (rev fb)
Kernel driver in use: pcieport
00:14.1 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PCI Express Port B #2 [8086:5ad7] (rev fb)
Kernel driver in use: pcieport
00:15.0 USB controller [0c03]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series USB xHCI [8086:5aa8] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI [8086:7270]
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
00:1a.0 Serial bus controller [0c80]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series PWM Pin Controller [8086:5ac8] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PWM Pin Controller [8086:7270]
Kernel driver in use: pwm-lpss
00:1f.0 ISA bridge [0601]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Low Pin Count Interface [8086:5ae8] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface [8086:7270]
Kernel driver in use: lpc_ich
Kernel modules: lpc_ich
00:1f.1 SMBus [0c05]: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SMBus Controller [8086:5ad4] (rev 0b)
Subsystem: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller [8086:7270]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
01:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
Subsystem: Intel Corporation I211 Gigabit Network Connection [8086:0000]
Kernel driver in use: igb
Kernel modules: igb
02:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
Subsystem: Intel Corporation I211 Gigabit Network Connection [8086:0000]
Kernel driver in use: igb
Kernel modules: igb
03:00.0 Network controller [0280]: Qualcomm Atheros AR928X Wireless Network Adapter (PCI-Express) [168c:002a] (rev 01)
Subsystem: Foxconn International, Inc. T77H047.31 802.11bgn Wireless Half-size Mini PCIe Card [AR9283] [105b:e01f]
Kernel modules: ath9k
 

Stefan_R

Proxmox Staff Member
Staff member
Jun 4, 2019
1,301
273
88
Vienna
This is the full output, you´re right, 01 and 02 is the onboard NIC...in Group 5.
i dont have another PCIe Slot, BIOS is latest.

So i cant use passthrough for the pcie slot?!
Unfortunately not, PCIe passthrough hardware support is always a tricky thing...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!