LINUX.ORG.RU

Не могу пробросить PCI WiFi в виртуальную машину

 , ,


0

1

Парни привет, не получается активировать PCI адаптер WiFi 8086:02f0 от Intel. Хост Asus p1440fa Trisquel 11, поддерживает md-v VT-d VT-x EPT, настраивал по wiki и разным методикам, перепробовал все, гостевая машина Debian 11, Intel Virtualization Technology» Enabled в UEFI.

sudo dmesg | grep -i vfio

  • [0.379166] VFIO - User Level meta-driver version: 0.3
  • [193.830513] vfio-pci 0000:00:14.3: enabling device (0000 -> 0002)

Включил модули в ядре. Забиндил. Добавил в автозапуск. Включение IOMMU.

sudo dmesg | grep -e DMAR -e IOMMU

  • [ 0.013387] ACPI: DMAR 0x000000009A518000 0000A8 (v01 INTEL EDK2 00000002 01000013)
  • [ 0.013415] ACPI: Reserving DMAR table memory at [mem 0x9a518000-0x9a5180a7]
  • [ 0.045922] DMAR: IOMMU enabled
  • [ 0.126203] DMAR: Host address width 39
  • [ 0.126204] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
  • [ 0.126210] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
  • [ 0.126213] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
  • [ 0.126215] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
  • [ 0.126217] DMAR: RMRR base: 0x0000009a7d3000 end: 0x0000009aa1cfff
  • [ 0.126219] DMAR: RMRR base: 0x0000009b800000 end: 0x0000009fffffff
  • [ 0.126220] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
  • [ 0.126222] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
  • [ 0.126222] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
  • [ 0.128764] DMAR-IR: Enabled IRQ remapping in x2apic mode
  • [ 0.320498] DMAR: No ATSR found
  • [ 0.320499] DMAR: No SATC found
  • [ 0.320501] DMAR: IOMMU feature fl1gp_support inconsistent
  • [ 0.320502] DMAR: IOMMU feature pgsel_inv inconsistent
  • [ 0.320503] DMAR: IOMMU feature nwfs inconsistent
  • [ 0.320504] DMAR: IOMMU feature pasid inconsistent
  • [ 0.320505] DMAR: IOMMU feature eafs inconsistent
  • [ 0.320505] DMAR: IOMMU feature prs inconsistent
  • [ 0.320506] DMAR: IOMMU feature nest inconsistent
  • [ 0.320507] DMAR: IOMMU feature mts inconsistent
  • [ 0.320507] DMAR: IOMMU feature sc_support inconsistent
  • [ 0.320508] DMAR: IOMMU feature dev_iotlb_support inconsistent
  • [ 0.320509] DMAR: dmar0: Using Queued invalidation
  • [ 0.320512] DMAR: dmar1: Using Queued invalidation
  • [ 0.323007] DMAR: Intel(R) Virtualization Technology for Directed I/O

Устройство отдельно в 6 группе IOMMU

sudo dmesg | grep -iE "(DMAR|IOMMU)"

  • [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-72-generic root=UUID=f4ffd274-a9e3-40fe-b38d-334627d48283 ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on quiet splash vt.handoff=7
  • [ 0.013387] ACPI: DMAR 0x000000009A518000 0000A8 (v01 INTEL EDK2 00000002 01000013)
  • [ 0.013415] ACPI: Reserving DMAR table memory at [mem 0x9a518000-0x9a5180a7]
  • [ 0.045828] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-72-generic root=UUID=f4ffd274-a9e3-40fe-b38d-334627d48283 ro rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on quiet splash vt.handoff=7
  • [ 0.045922] DMAR: IOMMU enabled
  • [ 0.126203] DMAR: Host address width 39
  • [ 0.126204] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
  • [ 0.126210] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
  • [ 0.126213] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
  • [ 0.126215] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
  • [ 0.126217] DMAR: RMRR base: 0x0000009a7d3000 end: 0x0000009aa1cfff
  • [ 0.126219] DMAR: RMRR base: 0x0000009b800000 end: 0x0000009fffffff
  • [ 0.126220] DMAR-IR: IOAPIC id 2 under DRHD base 0xfed91000 IOMMU 1
  • [ 0.126222] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
  • [ 0.126222] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
  • [ 0.128764] DMAR-IR: Enabled IRQ remapping in x2apic mode
  • [ 0.258356] iommu: Default domain type: Translated
  • [ 0.258356] iommu: DMA domain TLB invalidation policy: lazy mode
  • [ 0.320498] DMAR: No ATSR found
  • [ 0.320499] DMAR: No SATC found
  • [ 0.320501] DMAR: IOMMU feature fl1gp_support inconsistent
  • [ 0.320502] DMAR: IOMMU feature pgsel_inv inconsistent
  • [ 0.320503] DMAR: IOMMU feature nwfs inconsistent
  • [ 0.320504] DMAR: IOMMU feature pasid inconsistent
  • [ 0.320505] DMAR: IOMMU feature eafs inconsistent
  • [ 0.320505] DMAR: IOMMU feature prs inconsistent
  • [ 0.320506] DMAR: IOMMU feature nest inconsistent
  • [ 0.320507] DMAR: IOMMU feature mts inconsistent
  • [ 0.320507] DMAR: IOMMU feature sc_support inconsistent
  • [ 0.320508] DMAR: IOMMU feature dev_iotlb_support inconsistent
  • [ 0.320509] DMAR: dmar0: Using Queued invalidation
  • [ 0.320512] DMAR: dmar1: Using Queued invalidation
  • [ 0.321007] pci 0000:00:00.0: Adding to iommu group 0
  • [ 0.321017] pci 0000:00:02.0: Adding to iommu group 1
  • [ 0.321025] pci 0000:00:04.0: Adding to iommu group 2
  • [ 0.321033] pci 0000:00:08.0: Adding to iommu group 3
  • [ 0.321044] pci 0000:00:12.0: Adding to iommu group 4
  • [ 0.321058] pci 0000:00:14.0: Adding to iommu group 5
  • [ 0.321066] pci 0000:00:14.2: Adding to iommu group 5
  • [ 0.321074] pci 0000:00:14.3: Adding to iommu group 6
    • [ 0.321089] pci 0000:00:15.0: Adding to iommu group 7
    • [ 0.321096] pci 0000:00:15.1: Adding to iommu group 7
    • [ 0.321105] pci 0000:00:15.2: Adding to iommu group 7
    • [ 0.321115] pci 0000:00:16.0: Adding to iommu group 8
    • [ 0.321123] pci 0000:00:17.0: Adding to iommu group 9
    • [ 0.321133] pci 0000:00:19.0: Adding to iommu group 10
    • [ 0.321146] pci 0000:00:1d.0: Adding to iommu group 11
    • [ 0.321159] pci 0000:00:1d.4: Adding to iommu group 12
    • [ 0.321170] pci 0000:00:1e.0: Adding to iommu group 13
    • [ 0.321178] pci 0000:00:1e.2: Adding to iommu group 13
    • [ 0.321195] pci 0000:00:1f.0: Adding to iommu group 14
    • [ 0.321204] pci 0000:00:1f.3: Adding to iommu group 14
    • [ 0.321211] pci 0000:00:1f.4: Adding to iommu group 14
    • [ 0.321220] pci 0000:00:1f.5: Adding to iommu group 14
    • [ 0.321232] pci 0000:01:00.0: Adding to iommu group 15
    • [ 0.321244] pci 0000:02:00.0: Adding to iommu group 16
    • [ 0.323007] DMAR: Intel(R) Virtualization Technology for Directed I/O

Модули vfio прописал. В черный список драйвера кинул. Устройство перехватываеться:

lspci -nnk -d 8086:02f0

  • 00:14.3 Network controller [0280]: Intel Corporation Comet Lake PCH-LP CNVi WiFi [8086:02f0]
  • DeviceName: WLAN
  • Subsystem: Intel Corporation Wireless-AC 9560 160MHz [8086:0034]
  • Kernel driver in use: vfio-pci
  • Kernel modules: iwlwifi

В гостевой машине:

lspci -nnk -d 8086:02f0

  • 02:00.0 Network controller [0280]: Intel Corporation Comet Lake PCH-LP CNVi WiFi [8086:02f0]
  • Subsystem: Intel Corporation Wireless-AC 9560 160MHz [8086:0034]
  • Kernel driver in use: pci-stub

Через #ip a, ip link PCI адаптер не видит, драйвера iwlwifi стоят и wireless_tools. Изолированную сеть пробовал. В гостевой машине через телефон и usb свисток интернет работает. Но нужен PCI WiFi. Помогите парни, где то я упустил или сам адаптер не поддерживает виртуализацию. Или есть другой рабочий метод кроме vfio-pci.



Последнее исправление: Lupertazzi (всего исправлений: 4)

Ответ на: комментарий от MagicMirror

Если так, то это не просто PCI устройство, из-за чего может не работать.

Нет, это такое же PCIe устройство, просто физически расположенное в SoC. Работать будет.

i586 ★★★★★
()