Debian kernel 6.1.0-33-amd64 VFIO_MAP_DMA issue

I just upgraded to Debian kernel 6.1.0-33-amd64 last night and when I rebooted into the new kernel, my Incus virtual machines using PCI passthrough NICs are not able to start and throw a VFIO_MAP_DMA error. Rebooting back into 6.1.0-32-amd64 resolves the issue.

Any ideas?

# incus --version
6.11

# uname -a
Linux 6.1.0-33-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.133-1 (2025-04-10) x86_64 GNU/Linux

# incus start router
Error: Failed setting up device via monitor: Failed setting up device "eth0": Failed adding NIC device: vfio 0000:02:00.1: failed to setup container for group 14: memory listener initialization failed: Region pc.rom: vfio_container_dma_map(0x561cdf6e3740, 0xc0000, 0x20000, 0x7f1fb7a00000) = -12 (Cannot allocate memory)
Try `incus info --show-log router` for more info

# incus info --show-log router
Name: router
Description: 
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2024/01/16 20:05 UTC
Last Used: 2025/03/16 08:09 UTC

Log:

VFIO_MAP_DMA failed: Cannot allocate memory

# incus profile show router
config:
  boot.autostart: "true"
  boot.autostart.delay: "60"
  boot.autostart.priority: "4"
  boot.stop.priority: "2"
  limits.cpu: 3-3
  limits.cpu.priority: "10"
  limits.disk.priority: "10"
  limits.memory: 4GiB
  limits.memory.enforce: soft
  limits.memory.swap: "false"
  security.secureboot: "false"
description: Soft Router
devices:
  eth0:
    name: eth0
    nictype: physical
    parent: eno2
    type: nic
  eth1:
    name: eth1
    nictype: physical
    parent: eno3
    type: nic
  eth2:
    name: eth2
    nictype: physical
    parent: eno4
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: router
used_by:
- /1.0/instances/router

Created an account just to reply to this.

I’ve been banging my head against my desk at work for a few hours now. I’ve updated my Debian 12 machine and after reboot it wouldn’t start my VM that has an NVME SSD passed-through. The libvirt logs show:

qemu-system-x86_64: VFIO_MAP_DMA failed: Cannot allocate memory

Now I’ve done some changes to the hardware too, so I didn’t attribute the problem to the Debian update at first. But seeing this and rebooting with 6.1.0-32 solved the problem.

I guess something is wrong with 6.1.0-33.

2 Likes

I appreciate the affirmation and effort. Haven’t had an issue like this in years.

It appears there’s been a regression: https://bugs.debian.org/1102889

2 Likes

Ah, yep that sure looks to be the root cause. Thank you!

Should be fixed with the recently released linux-image-6-1-0-34-amd64 package.

1 Like

Great, thanks! that one was particularly frustrating :slight_smile:

I can confirm that upgrading to 6.1.0-34 resolves the issue.

I’ve upgraded to 6.1.0-34-amd64 from 6.1.0-32-amd64 and incus 6.12 (via 1:6.12-debian12-202504242211) starts without issue.

1 Like