[SOLVED] How to use PCI modem in VM

ipl

New Member
Sep 2, 2021
2
0
1
54
Hi,

I'm trying to use a phone modem into my VM.

This is the device I'm talking about:
Bash:
# lspci -s 04:00.0 -vvknn
04:00.0 Communication controller [0780]: Conexant Systems, Inc. HSF 56k HSFi Modem [14f1:2f00] (rev 01)
        Subsystem: Conexant Systems, Inc. Dynalink 56PMi [14f1:2004]
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 16
        IOMMU group: 16
        Region 0: Memory at b1500000 (32-bit, non-prefetchable) [size=64K]
        Region 1: I/O ports at 3000 [size=8]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
                Status: D3 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: vfio-pci

But when adding it as a PCI Device and starting the VM, it simply won't start, because of some IRQ conflict I don't understand:
Bash:
#/var/log/syslog
Sep  2 10:36:36 pve2 pvedaemon[576710]: <root@pam> starting task UPID:pve2:00094112:00756C36:613046C4:qmstart:103:root@pam:
Sep  2 10:36:36 pve2 pvedaemon[606482]: start VM 103: UPID:pve2:00094112:00756C36:613046C4:qmstart:103:root@pam:
Sep  2 10:36:36 pve2 systemd[1]: Started 103.scope.
Sep  2 10:36:37 pve2 kernel: [76954.920207] genirq: Flags mismatch irq 16. 00000000 (vfio-intx(0000:04:00.0)) vs. 00000080 (i801_smbus)
Sep  2 10:36:38 pve2 systemd[1]: 103.scope: Succeeded.
Sep  2 10:36:38 pve2 pvedaemon[606482]: start failed: QEMU exited with code 1
Sep  2 10:36:38 pve2 pvedaemon[576710]: <root@pam> end task UPID:pve2:00094112:00756C36:613046C4:qmstart:103:root@pam: start failed: QEMU exited with code 1

I've done my research over the web, this forum and QEMU forum too, but couldn't figure out what to do.

Here some information that might help:
Bash:
# dmesg | grep DMAR
[    0.008157] ACPI: DMAR 0x000000009A00CED8 0000C8 (v01 INTEL  EDK2     00000002      01000013)
[    0.008201] ACPI: Reserving DMAR table memory at [mem 0x9a00ced8-0x9a00cf9f]
[    0.048437] DMAR: IOMMU enabled
[    0.121426] DMAR: Host address width 39
[    0.121427] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.121432] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[    0.121435] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.121438] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.121441] DMAR: RMRR base: 0x00000099e85000 end: 0x00000099ea4fff
[    0.121443] DMAR: RMRR base: 0x0000009d000000 end: 0x0000009f7fffff
[    0.121445] DMAR: RMRR base: 0x00000099f27000 end: 0x00000099fa6fff
[    0.121447] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.121449] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.121451] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.123790] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    1.054863] DMAR: No ATSR found
[    1.054865] DMAR: dmar0: Using Queued invalidation
[    1.054868] DMAR: dmar1: Using Queued invalidation
[    1.056402] DMAR: Intel(R) Virtualization Technology for Directed I/O

# find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/7/devices/0000:00:17.0
/sys/kernel/iommu_groups/15/devices/0000:01:00.3
/sys/kernel/iommu_groups/5/devices/0000:00:15.0
/sys/kernel/iommu_groups/13/devices/0000:01:00.1
/sys/kernel/iommu_groups/3/devices/0000:00:12.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.0
/sys/kernel/iommu_groups/11/devices/0000:00:1f.5
/sys/kernel/iommu_groups/11/devices/0000:00:1f.3
/sys/kernel/iommu_groups/11/devices/0000:00:1f.6
/sys/kernel/iommu_groups/11/devices/0000:00:1f.4
/sys/kernel/iommu_groups/1/devices/0000:00:02.0
/sys/kernel/iommu_groups/8/devices/0000:00:1b.0
/sys/kernel/iommu_groups/16/devices/0000:03:00.0
/sys/kernel/iommu_groups/16/devices/0000:04:00.0
/sys/kernel/iommu_groups/6/devices/0000:00:16.0
/sys/kernel/iommu_groups/6/devices/0000:00:16.3
/sys/kernel/iommu_groups/14/devices/0000:01:00.2
/sys/kernel/iommu_groups/4/devices/0000:00:14.2
/sys/kernel/iommu_groups/4/devices/0000:00:14.0
/sys/kernel/iommu_groups/12/devices/0000:01:00.0
/sys/kernel/iommu_groups/2/devices/0000:00:08.0
/sys/kernel/iommu_groups/10/devices/0000:00:1d.2
/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/9/devices/0000:00:1d.0

I'm using PVE v7.0-11, which I think is last version...
Bash:
# uname -a
Linux pve2 5.11.22-3-pve #1 SMP PVE 5.11.22-7 (Wed, 18 Aug 2021 15:06:12 +0200) x86_64 GNU/Linux

Please help.
 
Older (I'm assuming) PCI hardware often won't FLReset properly and often has other passthrough issues. Using a USB modem will be very easy, while such a PCI device will probably never work, sorry. Do you know about anyone (on the internet) that has reported a successful passthrough with this device? Apologies for being so pessimistic but passthrough is not a common use case and is usually hit or miss (unless it is a very common device reported to work).
Then again, maybe someone else here will know more about this specific error and can help you.
 
Thanks you for this pretty quick answer.
I was considering the USB option as a workaround, your input just confirm that must be the way to go.
 
I just remembered that a lot of USB modems at the time were so called "WinModems", where most of the processing was done in Windows drivers instead of hardware. You might want to make sure that there are (modern) drivers available or check that it is supported by Linux.
Maybe I'm wrong to speak about modems as old and out-dated technology? It's just that in my part of the world, they haven't been in common use for decades (AFAIK).
 

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 yours easily in our online shop.

Buy now!