Hello.
I've looked for it in many ways, but I can't solve it, so I'm posting a question.
I don't know what the -34 error is output from guest dmesg.
Surprisingly, it works fine when if i boot usb and try it as a host, it works fine.
Therefore, my guess is that there is a problem with pci passthrough or qemu setting in the host rather than module/firmware.
Host; Fedora 41 6.11.4-301.fc41.x86_64
lspci -nn
06:00.0 Network controller [0280]: Qualcomm Technologies, Inc WCN785x Wi-Fi 7(802.11be) 320MHz 2x2 [FastConnect 7800] [17cb:1107] (rev 01)
/etc/default/grub
GRUB_CMDLINE_LINUX="rhgb quiet intel_iommu=on i915.enable_guc=3 i915.max_vfs=1 modprobe.blacklist=ath12k pci=noaer vfio-pci.ids=17cb:1107"
Guest; openwrt-24.10.0-x86-64-generic-ext4-combined.img.gz
opkg install
iw iwinfo kmod-batman-adv kmod-cfg80211 kmod-mac80211 libiwinfo-lua luci-proto-batman-adv wireless-regdb wpad-mesh-mbedtls ath12k-firmware-wcn7850 kmod-ath12k
qemu/virt-manager setting
<domain type="kvm">
<os>
<type arch="x86_64" machine="pc-i440fx-9.1">hvm</type>
<boot dev="hd"/>
</os>
{...}
<hostdev mode="subsystem" type="pci" managed="yes">
<driver name="vfio"/>
<source>
<address domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
</source>
<alias name="hostdev0"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0"/>
</hostdev>
guest dmesg
[ 8.406122] ath12k_pci 0000:00:05.0: BAR 0: assigned [mem 0x100000000-0x1001fffff 64bit]
[ 8.411276] ath12k_pci 0000:00:05.0: MSI vectors: 1
[ 8.412940] ath12k_pci 0000:00:05.0: Hardware name: wcn7850 hw2.0
[ 8.512113] ath12k_pci 0000:00:05.0: link down error during global reset
[ 8.526787] mhi mhi0: BHI offset: 0xffffffff is out of range: 0x200000
[ 8.527711] ath12k_pci 0000:00:05.0: failed to set mhi state: INIT(0)
[ 8.528627] ath12k_pci 0000:00:05.0: failed to start mhi: -34
[ 8.529401] ath12k_pci 0000:00:05.0: failed to power up :-34
[ 8.580852] ath12k_pci 0000:00:05.0: failed to create soc core: -34
[ 8.582389] ath12k_pci 0000:00:05.0: failed to init core: -34
[ 8.583854] ------------[ cut here ]------------
[ 8.585069] WARNING: CPU: 1 PID: 1126 at 0xffffffff81139f63
[ 8.586334] Modules linked in: ath12k(O+) video pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack mac80211(O) lzo cfg80211(O) wmi slhc r8169 qrtr_mhi qrtr qmi_helpers(O) nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 mhi_pci_generic mhi_net mhi lzo_rle lzo_decompress lzo_compress libcrc32c forcedeth e1000e drm_suballoc_helper drm_exec drm_display_helper drm_buddy crc_ccitt compat(O) bnx2 i2c_dev dwmac_intel dwmac_generic stmmac_platform stmmac ixgbe e1000 amd_xgbe mdio nls_utf8 nls_iso8859_1 nls_cp437 pcs_xpcs ena sha512_ssse3 sha512_generic seqiv sha3_generic jitterentropy_rng drbg michael_mic hmac geniv rng cmac crypto_acompress igb igc vfat fat button_hotplug(O) tg3 realtek phylink mii
[ 8.602325] CPU: 1 PID: 1126 Comm: kmodloader Tainted: G O 6.6.73 #0
[ 8.603884] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014
[ 8.605723] RIP: 0010:0xffffffff81139f63
[ 8.606559] Code: 81 a4 24 e8 00 00 00 ff ff f7 ff 4c 89 e7 e8 44 1d 00 00 e9 27 fe ff ff 49 8d bc 24 98 00 00 00 ff d0 0f 1f 00 e9 13 ff ff ff <0f> 0b 49 c7 84 24 28 01 00 00 00 00 00 00 e9 11 fe ff ff 48 89 cf
[ 8.610078] RSP: 0018:ffffc90000afb9d0 EFLAGS: 00010086
[ 8.611246] RAX: 0000000000000880 RBX: ffff88800438fa00 RCX: ffff888004c45150
[ 8.612719] RDX: ffff88800438fa80 RSI: ffff88800438fa00 RDI: ffff888003e17000
[ 8.614169] RBP: ffffc90000afba08 R08: 0000000000000018 R09: ffff888004c45100
[ 8.615650] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888003e17000
[ 8.617138] R13: ffff888004631bc0 R14: ffff888003e17208 R15: ffff888003e17114
[ 8.618813] FS: 00007f34ee134b28(0000) GS:ffff88803ec80000(0000) knlGS:0000000000000000
[ 8.620683] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 8.622043] CR2: 00007f34edfe6000 CR3: 000000000439c000 CR4: 0000000000350ee0
[ 8.623622] Call Trace:
[ 8.624383] <TASK>
[ 8.625049] ? 0xffffffff8103a650
[ 8.625949] ? 0xffffffff810d7b00
[ 8.626895] ? 0xffffffff81139f63
[ 8.627809] ? 0xffffffff81ac01de
[ 8.628803] ? 0xffffffff81ae6730
[ 8.629689] ? 0xffffffff81ae6858
[ 8.630572] ? 0xffffffff81c00bbb
[ 8.631446] ? 0xffffffff81139f63
[ 8.632452] 0xffffffffa082014a [ath12k@000000009d86fe97+0x3d000]
[ 8.634057] 0xffffffffa0821686 [ath12k@000000009d86fe97+0x3d000]
[ 8.635586] 0xffffffff814dbf80
[ 8.636504] 0xffffffff81689958
[ 8.637522] 0xffffffff81689b73
[ 8.638447] 0xffffffff81689c4f
[ 8.639377] 0xffffffff81689e26
[ 8.640377] ? 0xffffffff81689da0
[ 8.641394] 0xffffffff816875f2
[ 8.642374] 0xffffffff81689179
[ 8.643283] 0xffffffff81688925
[ 8.644249] ? 0xffffffffa084c010 [ath12k@000000009d86fe97+0x3d000]
[ 8.645963] 0xffffffff8168ade9
[ 8.646918] ? 0xffffffffa084c010 [ath12k@000000009d86fe97+0x3d000]
[ 8.648760] 0xffffffff814da5cd
[ 8.649778] 0xffffffffa084c034 [ath12k@000000009d86fe97+0x3d000]
[ 8.651506] 0xffffffff81000812
[ 8.652629] ? 0xffffffff8129228e
[ 8.653677] 0xffffffff8115c753
[ 8.654665] 0xffffffff8115e5af
[ 8.655677] 0xffffffff8115e86e
[ 8.656757] ? 0xffffffff8115e86e
[ 8.658001] 0xffffffff8115e9a5
[ 8.659071] 0xffffffff8100360a
[ 8.660286] 0xffffffff81ae5ecd
[ 8.661404] 0xffffffff81c00130
[ 8.662482] RIP: 0033:0x7f34ee0ec968
[ 8.663681] Code: 4c 89 4c 24 48 4c 8b 4c 24 60 48 89 54 24 10 48 8b 7e 08 48 89 74 24 18 48 8b 51 18 c7 44 24 08 28 00 00 00 48 8b 76 10 0f 05 <48> 89 c7 e8 ab 5d fe ff 48 83 c4 58 c3 41 57 41 56 41 55 41 54 55
[ 8.668666] RSP: 002b:00007ffd18c48bf0 EFLAGS: 00000206 ORIG_RAX: 00000000000000af
[ 8.670822] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f34ee0ec968
[ 8.672904] RDX: 0000000000405485 RSI: 00000000000b0770 RDI: 00007f34edf37030
[ 8.675094] RBP: 0000000000407300 R08: 0000000000000000 R09: 0000000000000802
[ 8.677201] R10: 0000000000000000 R11: 0000000000000206 R12: 00007f34edf37030
[ 8.679393] R13: 0000000000000003 R14: 0000000000405485 R15: 00000000000b0770
[ 8.681534] </TASK>
[ 8.682348] ---[ end trace 0000000000000000 ]---
[ 9.152424] ath12k_pci: probe of 0000:00:05.0 failed with error -34