Jan 16 13:31:22 NNET25NAS209 kernel: Booting paravirtualized kernel on bare hardware
Jan 16 13:31:22 NNET25NAS209 kernel: Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
Jan 16 13:31:22 NNET25NAS209 kernel: Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier
Jan 16 13:31:22 NNET25NAS209 kernel: pci 0000:01:00.0: VF(n) BAR2 space: [mem 0xfe02000000-0xfe21ffffff 64bit pref] (contains BAR2 for 16 VFs)
Jan 16 13:31:22 NNET25NAS209 kernel: pci 0000:05:00.0: BAR 0: assigned to efifb
Jan 16 13:31:22 NNET25NAS209 kernel: pci 0000:0a:00.0: working around ROM BAR overlap defect
Jan 16 13:31:22 NNET25NAS209 kernel: pci 0000:0b:00.0: working around ROM BAR overlap defect
no entries during the time where I tried to start the VM.
i also have to admit, that I had to set the following kernel options (not the aspm ones) to make mmio work:
“kernel_extra_options”: “pcie_aspm=force pcie_aspm.policy=powersave quiet pcie_acs_override=downstream,multifunction”
I definitely had these issues with an RX560 i tried before. It somehow wasn’t able to reset. With the Arc card, I can shutdown, power on and reboot the VM as much as I want, as long there wasn’t too much happening on the system between turning the VM off and on.
For example right now, I had the VM powered off, moved all my VMs back to the TrueNAS pool and now the VM doesn’t power back on again:
[EFAULT] internal error: qemu unexpectedly closed the monitor: 2025-01-17T00:57:10.953380Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address 2025-01-17T00:57:10.998228Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address 2025-01-17T00:57:10.998444Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: vfio 0000:09:00.0: failed to setup container for group 30: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x556df2979500, 0x100000, 0xbff00000, 0x7f8dd3500000) = -2 (No such file or directory)
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py”, line 189, in start
if self.domain.create() < 0:
^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/libvirt.py”, line 1373, in create
raise libvirtError(‘virDomainCreate() failed’)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2025-01-17T00:57:10.953380Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address
2025-01-17T00:57:10.998228Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address
2025-01-17T00:57:10.998444Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: vfio 0000:09:00.0: failed to setup container for group 30: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x556df2979500, 0x100000, 0xbff00000, 0x7f8dd3500000) = -2 (No such file or directory)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 211, in call_method
result = await self.middleware.call_with_audit(message[‘method’], serviceobj, methodobj, params, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1529, in call_with_audit
result = await self._call(method, serviceobj, methodobj, params, app=app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1460, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 179, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/schema/processor.py”, line 49, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_lifecycle.py”, line 58, in start
await self.middleware.run_in_thread(self._start, vm[‘name’])
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1367, in run_in_thread
return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1364, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/vm_supervisor.py”, line 68, in _start
self.vms[vm_name].start(vm_data=self._vm_from_name(vm_name))
File “/usr/lib/python3/dist-packages/middlewared/plugins/vm/supervisor/supervisor.py”, line 198, in start
raise CallError(‘\n’.join(errors))
middlewared.service_exception.CallError: [EFAULT] internal error: qemu unexpectedly closed the monitor: 2025-01-17T00:57:10.953380Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address
2025-01-17T00:57:10.998228Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: VFIO_MAP_DMA failed: Bad address
2025-01-17T00:57:10.998444Z qemu-system-x86_64: -device {“driver”:“vfio-pci”,“host”:“0000:09:00.0”,“id”:“hostdev0”,“bus”:“pci.0”,“addr”:“0x8”}: vfio 0000:09:00.0: failed to setup container for group 30: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x556df2979500, 0x100000, 0xbff00000, 0x7f8dd3500000) = -2 (No such file or directory)
Also here is a stack trace of the time when the VM didn’t want to start:
[44772.242276] WARNING: CPU: 15 PID: 130313 at mm/gup.c:1313 __get_user_pages+0x5f9/0x6e0
[44772.242283] Modules linked in: mei_pxp(E) mei_hdcp(E) snd_hda_codec_hdmi(E) mei_gsc(E) mei_me(E) mei(E) vhost_net(E) tun(E) vhost(E) vhost_iotlb(E) macvtap(E) macvlan(E) tap(E) xt_conntrack(E) nft_chain_nat(E) xt_MASQUERADE(E) nf_nat(E) nf_conntrack_netlink(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) xfrm_user(E) xfrm_algo(E) xt_addrtype(E) nft_compat(E) nf_tables(E) nfnetlink(E) br_netfilter(E) bridge(E) scst_vdisk(OE) isert_scst(OE) iscsi_scst(OE) scst(OE) rdma_cm(E) iw_cm(E) ib_cm(E) dlm(E) libcrc32c(E) crc32c_generic(E) nvme_fabrics(E) overlay(E) sunrpc(E) binfmt_misc(E) 8021q(E) garp(E) stp(E) mrp(E) llc(E) ntb_netdev(E) ntb_transport(E) ntb_split(E) ntb(E) ioatdma(E) ipmi_ssif(E) intel_rapl_msr(E) intel_rapl_common(E) edac_mce_amd(E) kvm_amd(E) kvm(E) ghash_clmulni_intel(E) sha512_ssse3(E) sha256_ssse3(E) sha1_ssse3(E) aesni_intel(E) crypto_simd(E) cryptd(E) i915(E) evdev(E) rapl(E) snd_hda_intel(E) snd_intel_dspcfg(E) drm_buddy(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E) drm_display_helper(E)
[44772.242328] wmi_bmof(E) sp5100_tco(E) ccp(E) cec(E) pcspkr(E) watchdog(E) k10temp(E) acpi_cpufreq(E) snd_pcm(E) rc_core(E) ast(E) snd_timer(E) ttm(E) drm_shmem_helper(E) snd(E) acpi_ipmi(E) video(E) soundcore(E) drm_kms_helper(E) ipmi_si(E) ipmi_devintf(E) ipmi_msghandler(E) button(E) sg(E) drm(E) loop(E) efi_pstore(E) configfs(E) ip_tables(E) x_tables(E) autofs4(E) zfs(POE) spl(OE) efivarfs(E) mlx4_ib(E) ib_uverbs(E) sd_mod(E) ib_core(E) mlx4_en(E) nvme(E) ahci(E) nvme_core(E) xhci_pci(E) ahciem(E) t10_pi(E) libahci(E) xhci_hcd(E) crc32_pclmul(E) crc64_rocksoft(E) libata(E) crc64(E) crc32c_intel(E) crc_t10dif(E) i2c_piix4(E) igb(E) crct10dif_generic(E) i2c_algo_bit(E) crct10dif_pclmul(E) crct10dif_common(E) dca(E) usbcore(E) scsi_mod(E) mlx4_core(E) scsi_common(E) usb_common(E) wmi(E) gpio_amdpt(E) gpio_generic(E) vfio_pci(E) vfio_pci_core(E) irqbypass(E) vfio_iommu_type1(E) vfio(E)
[44772.242372] CPU: 15 PID: 130313 Comm: qemu-system-x86 Tainted: P OE 6.6.44-production+truenas #1
[44772.242374] Hardware name: GIGABYTE MC12-LE0-00/MC12-LE0-00, BIOS F18 10/18/2024
[44772.242376] RIP: 0010:__get_user_pages+0x5f9/0x6e0
[44772.242378] Code: 45 89 e0 0f 84 61 fe ff ff 41 83 fc 01 76 58 41 8d 74 24 ff 89 da 4c 89 f7 e8 73 e9 ff ff 48 85 c0 0f 85 13 fe ff ff 4c 89 f7 <0f> 0b 49 8b 46 08 a8 01 0f 85 a5 00 00 00 66 90 89 da be 01 00 00
[44772.242379] RSP: 0018:ffffaf60011efb50 EFLAGS: 00010246
[44772.242381] RAX: 0000000000000000 RBX: 00000000000d0101 RCX: 0000000000000030
[44772.242382] RDX: 0000000000000400 RSI: 0000000000000002 RDI: ffffec2084160000
[44772.242383] RBP: 00007f8e01200000 R08: 0000000000000100 R09: 80000001058008e7
[44772.242384] R10: 00000000000395c0 R11: ffff99a8ff354000 R12: 0000000000000100
[44772.242385] R13: ffff998b37478f18 R14: ffffec2084160000 R15: ffff998a700f6930
[44772.242386] FS: 00007f8fd8dc9ec0(0000) GS:ffff99a87edc0000(0000) knlGS:0000000000000000
[44772.242387] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[44772.242389] CR2: 00007f2a8c000020 CR3: 00000006ca9ca000 CR4: 0000000000750ee0
[44772.242390] PKRU: 55555554
[44772.242391] Call Trace:
[44772.242392]
[44772.242393] ? __get_user_pages+0x5f9/0x6e0
[44772.242395] ? __warn+0x81/0x130
[44772.242400] ? __get_user_pages+0x5f9/0x6e0
[44772.242402] ? report_bug+0x171/0x1a0
[44772.242406] ? handle_bug+0x41/0x70
[44772.242409] ? exc_invalid_op+0x17/0x70
[44772.242411] ? asm_exc_invalid_op+0x1a/0x20
[44772.242416] ? __get_user_pages+0x5f9/0x6e0
[44772.242420] __gup_longterm_locked+0x246/0xc10
[44772.242422] ? put_pages_list+0xd7/0x100
[44772.242427] pin_user_pages_remote+0x7f/0xb0
[44772.242430] vaddr_get_pfns+0x78/0x2a0 [vfio_iommu_type1]
[44772.242435] ? srso_alias_return_thunk+0x5/0xfbef5
[44772.242438] vfio_pin_pages_remote+0x386/0x500 [vfio_iommu_type1]
[44772.242443] vfio_iommu_type1_ioctl+0xfec/0x18e0 [vfio_iommu_type1]
[44772.242449] __x64_sys_ioctl+0x97/0xd0
[44772.242453] do_syscall_64+0x59/0xb0
[44772.242455] ? __x64_sys_ioctl+0xaf/0xd0
[44772.242456] ? srso_alias_return_thunk+0x5/0xfbef5
[44772.242458] ? syscall_exit_to_user_mode+0x22/0x40
[44772.242460] ? srso_alias_return_thunk+0x5/0xfbef5
[44772.242462] ? do_syscall_64+0x65/0xb0
[44772.242463] ? do_syscall_64+0x65/0xb0
[44772.242465] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[44772.242467] RIP: 0033:0x7f8fd9975c5b
[44772.242469] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[44772.242470] RSP: 002b:00007ffd22d8b7f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[44772.242472] RAX: ffffffffffffffda RBX: 0000556df2979500 RCX: 00007f8fd9975c5b
[44772.242473] RDX: 00007ffd22d8b850 RSI: 0000000000003b71 RDI: 000000000000002a
[44772.242474] RBP: 0000000000100000 R08: 0000000000000000 R09: 0000000000000000
[44772.242474] R10: 00000000bff00000 R11: 0000000000000246 R12: 00000000bff00000
[44772.242475] R13: 0000556df2979700 R14: 00007ffd22d8b850 R15: 0000556df2979500
[44772.242479]
[44772.242479] —[ end trace 0000000000000000 ]—