VFIO_MAP_DMA failed: Invalid argument

fuomag9

New Member
Mar 17, 2023
18
1
3
Hi,

I'm running proxmox with the kernel
Code:
Linux proxmox 6.2.6-1-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.6-1 (2023-03-14T17:08Z) x86_64 GNU/Linux

I'm running PCI passthrough of both a 12th gen intel iGPU and a Nvidia card as well. They both work perfectly fine.

Recently, I've started noticing an absurd amount of log spam like the one below:

Code:
Apr 15 10:07:15 proxmox QEMU[92569]: kvm: VFIO_MAP_DMA failed: Invalid argument
Apr 15 10:07:15 proxmox QEMU[92569]: kvm: vfio_dma_map(0x55943b644f00, 0x380000000000, 0x10000000, 0x7f1ec0000000) = -22 (Invalid argument)
Apr 15 10:07:15 proxmox QEMU[92569]: kvm: VFIO_MAP_DMA failed: Invalid argument
Apr 15 10:07:15 proxmox QEMU[92569]: kvm: vfio_dma_map(0x55943b644f00, 0x380000000000, 0x10000000, 0x7f1ec0000000) = -22 (Invalid argument)
Apr 15 10:07:39 proxmox QEMU[92569]: kvm: VFIO_MAP_DMA failed: Invalid argument
Apr 15 10:07:39 proxmox QEMU[92569]: kvm: vfio_dma_map(0x55943b644f00, 0x380000000000, 0x10000000, 0x7f1ec0000000) = -22 (Invalid argument)
Apr 15 10:07:39 proxmox QEMU[92569]: kvm: VFIO_MAP_DMA failed: Invalid argument
Apr 15 10:07:39 proxmox QEMU[92569]: kvm: vfio_dma_map(0x55943b644f00, 0x380000000000, 0x10000000, 0x7f1ec0000000) = -22 (Invalid argument)
Apr 15 10:08:01 proxmox QEMU[92569]: kvm: VFIO_MAP_DMA failed: Invalid argument
Apr 15 10:08:01 proxmox QEMU[92569]: kvm: vfio_dma_map(0x55943b644f00, 0x380000000000, 0x10000000, 0x7f1ec0000000) = -22 (Invalid argument)

I've tried searching online but I've not found any useful information that would lead on why this would be happening (as everything seems to work fine in my case!)
Does anyone have any idea what could be causing this and how to make them stop? They are making my logs unreadable :(
 
Last edited:
can you post you vm config? (qm config ID) ?
 
can you post you vm config? (qm config ID) ?
sure, here you go:


Code:
agent: 1
bios: ovmf
boot: order=scsi0;net0
cores: 2
cpu: host,flags=+pdpe1gb;+aes
hostpci0: 0000:00:02,pcie=1
machine: q35
memory: 5096
meta: creation-qemu=7.1.0,ctime=1677236735
name: Jellyfin
net0: virtio=4A:7D:9F:DD:CF:1F,bridge=vmbr0,firewall=1,tag=776
numa: 0
onboot: 1
ostype: l26
scsi0: nvme-1TB-mirror:vm-106-disk-0,cache=unsafe,discard=on,iothread=1,size=10G
scsi1: hdd-film:vm-106-disk-0,backup=0,iothread=1,size=2T
scsi2: hdd-film:vm-106-disk-1,cache=unsafe,iothread=1,size=30G
scsihw: virtio-scsi-single
smbios1: uuid=7157f298-f4b5-4bf3-9aee-0624fcd48836
sockets: 1
vmgenid: 1aee7f90-c910-4f50-becf-4f26f5508fdc
 
you don't have an efidisk, and according to this reddit thread i found: https://www.reddit.com/r/VFIO/comments/zaoy5o/warning_newest_arch_qemu_packages_may_break_your/
it seems to be a problem with 2m big efi images and a new ovmf image (which is the default if you don't configure it and there is a default one generated)

try to create an efidisk (and make sure to uncheck 'pre-enroll keys' ) and see if it fixes that problem
Creating an efidisk seems not to have solved it unfortunately, here's the config after the change


Code:
agent: 1
bios: ovmf
boot: order=scsi0;net0
cores: 2
cpu: host,flags=+pdpe1gb;+aes
efidisk0: nvme-1TB-mirror:vm-106-disk-1,efitype=4m,size=1M
hostpci0: 0000:00:02,pcie=1
machine: q35
memory: 5096
meta: creation-qemu=7.1.0,ctime=1677236735
name: Jellyfin
net0: virtio=4A:7D:9F:DD:CF:1F,bridge=vmbr0,firewall=1,tag=776
numa: 0
onboot: 1
ostype: l26
parent: sssss
scsi0: nvme-1TB-mirror:vm-106-disk-0,cache=unsafe,discard=on,iothread=1,size=10G
scsi1: hdd-film:vm-106-disk-0,backup=0,iothread=1,size=2T
scsi2: hdd-film:vm-106-disk-1,cache=unsafe,iothread=1,size=30G
scsihw: virtio-scsi-single
smbios1: uuid=7157f298-f4b5-4bf3-9aee-0624fcd48836
sockets: 1
vmgenid: 1aee7f90-c910-4f50-becf-4f26f5508fdc
 
can you post your 'pveversion -v' ?
 
can you post your 'pveversion -v' ?
Code:
proxmox-ve: 7.4-1 (running kernel: 6.2.9-1-pve)
pve-manager: 7.4-3 (running version: 7.4-3/9002ab8a)
pve-kernel-6.2: 7.4-1
pve-kernel-5.15: 7.4-1
pve-kernel-6.1: 7.3-6
pve-kernel-6.2.9-1-pve: 6.2.9-1
pve-kernel-6.2.6-1-pve: 6.2.6-1
pve-kernel-6.1.15-1-pve: 6.1.15-1
pve-kernel-6.1.10-1-pve: 6.1.10-1
pve-kernel-5.15.104-1-pve: 5.15.104-2
ceph-fuse: 15.2.16-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.4
libproxmox-backup-qemu0: 1.3.1-1
libproxmox-rs-perl: 0.2.1
libpve-access-control: 7.4-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-4
libpve-guest-common-perl: 4.2-4
libpve-http-server-perl: 4.2-2
libpve-rs-perl: 0.7.5
libpve-storage-perl: 7.4-2
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-2
lxcfs: 5.0.3-pve1
novnc-pve: 1.4.0-1
proxmox-backup-client: 2.4.1-1
proxmox-backup-file-restore: 2.4.1-1
proxmox-kernel-helper: 7.4-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.1-1
proxmox-widget-toolkit: 3.6.5
pve-cluster: 7.3-3
pve-container: 4.4-3
pve-docs: 7.4-2
pve-edk2-firmware: 3.20230228-2
pve-firewall: 4.3-1
pve-firmware: 3.6-4
pve-ha-manager: 3.6.0
pve-i18n: 2.12-1
pve-qemu-kvm: 7.2.0-8
pve-xtermjs: 4.16.0-1
qemu-server: 7.4-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+3
vncterm: 1.7-1
zfsutils-linux: 2.1.9-pve1
 
if you want to experiment, you could try to downgrade the 'pve-edk2-firmware' package to one of the previous versions and see if it fixes it (or booting into an older kernel)
 
if you want to experiment, you could try to downgrade the 'pve-edk2-firmware' package to one of the previous versions and see if it fixes it (or booting into an older kernel)
Unfortunately it's a production machine so I can't try to experiment with packages downgrades as I don't trust myself in not making the machine unusable :(
 
Seems to be fixed with the current version!

Code:
proxmox-ve: 7.4-1 (running kernel: 6.2.11-2-pve)
pve-manager: 7.4-3 (running version: 7.4-3/9002ab8a)
pve-kernel-6.2: 7.4-3
pve-kernel-5.15: 7.4-3
pve-kernel-6.1: 7.3-6
pve-kernel-6.2.11-2-pve: 6.2.11-2
pve-kernel-6.2.11-1-pve: 6.2.11-1
pve-kernel-6.2.9-1-pve: 6.2.9-1
pve-kernel-6.1.15-1-pve: 6.1.15-1
pve-kernel-6.1.10-1-pve: 6.1.10-1
pve-kernel-5.15.107-2-pve: 5.15.107-2
ceph-fuse: 15.2.16-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.4
libproxmox-backup-qemu0: 1.3.1-1
libproxmox-rs-perl: 0.2.1
libpve-access-control: 7.4-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.4-1
libpve-guest-common-perl: 4.2-4
libpve-http-server-perl: 4.2-3
libpve-rs-perl: 0.7.6
libpve-storage-perl: 7.4-2
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-2
lxcfs: 5.0.3-pve1
novnc-pve: 1.4.0-1
openvswitch-switch: 2.15.0+ds1-2+deb11u4
proxmox-backup-client: 2.4.1-1
proxmox-backup-file-restore: 2.4.1-1
proxmox-kernel-helper: 7.4-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.1-1
proxmox-widget-toolkit: 3.6.5
pve-cluster: 7.3-3
pve-container: 4.4-3
pve-docs: 7.4-2
pve-edk2-firmware: 3.20230228-2
pve-firewall: 4.3-1
pve-firmware: 3.6-5
pve-ha-manager: 3.6.1
pve-i18n: 2.12-1
pve-qemu-kvm: 7.2.0-8
pve-xtermjs: 4.16.0-1
qemu-server: 7.4-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+3
vncterm: 1.7-1
zfsutils-linux: 2.1.11-pve1
 
Hi,

Having the same problem with up to date kernel and new MS-01 iGPU:

Code:
Sep 14 19:47:14 pve1 QEMU[42664]: kvm: VFIO_MAP_DMA failed: Invalid argument
Sep 14 19:47:14 pve1 QEMU[42664]: kvm: vfio_container_dma_map(0x60c21eef7870, 0x383800000000, 0x10000000, 0x71b868000000) = -22 (Invalid argument)
Sep 14 19:47:14 pve1 QEMU[42664]: kvm: VFIO_MAP_DMA failed: Invalid argument

Code:
proxmox-ve: 8.2.0 (running kernel: 6.8.12-1-pve)
pve-manager: 8.2.4 (running version: 8.2.4/faa83925c9641325)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.8: 6.8.12-1
proxmox-kernel-6.8.12-1-pve-signed: 6.8.12-1
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
ceph-fuse: 18.2.2-pve1
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx9
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.1
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.1.4
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.0.7
libpve-cluster-perl: 8.0.7
libpve-common-perl: 8.2.2
libpve-guest-common-perl: 5.1.4
libpve-http-server-perl: 5.1.0
libpve-network-perl: 0.9.8
libpve-rs-perl: 0.8.9
libpve-storage-perl: 8.2.3
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.2.7-1
proxmox-backup-file-restore: 3.2.7-1
proxmox-firewall: 0.5.0
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.3
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.6
proxmox-widget-toolkit: 4.2.3
pve-cluster: 8.0.7
pve-container: 5.1.12
pve-docs: 8.2.3
pve-edk2-firmware: 4.2023.08-4
pve-esxi-import-tools: 0.7.1
pve-firewall: 5.0.7
pve-firmware: 3.13-1
pve-ha-manager: 4.0.5
pve-i18n: 3.2.2
pve-qemu-kvm: 9.0.2-2
pve-xtermjs: 5.3.0-3
qemu-server: 8.2.4
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.4-pve1

Code:
agent: 1
bios: ovmf
boot: order=scsi0;ide0;net0
cores: 4
cpu: host
efidisk0: local-zfs:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
hostpci0: 0000:00:02.0,x-vga=1
machine: pc-q35-9.0
memory: 8192
meta: creation-qemu=9.0.2,ctime=1726332316
name: WindowsTest
net0: virtio=BC:24:11:CE:BE:4A,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsi0: local-zfs:vm-100-disk-1,cache=writethrough,discard=on,iothread=1,size=64G
scsihw: virtio-scsi-single
smbios1: uuid=89c4899a-dc7e-4276-90c0-7215988a4fab
sockets: 1
tpmstate0: local-zfs:vm-100-disk-2,size=4M,version=v2.0
vga: none
vmgenid: c5e9562b-06f6-4e1e-8d50-bedbd6623e31

Is there something I can try to get over it?
 

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!