Same problem here. My VMs runs fine as long as I'm using a virtual gpu. Tried it with Linux Mint and Win 11.
As soon as I want to use my hardware gpus it runs into the same error. Tried it with a Nvidia Quadro P400 and an AMD Radeon Pro VII. Both the same.
Here is the log file:
text error warn system array login
2024-04-27T18:36:13.684290Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:36:13.684296Z qemu-system-x86_64: vfio_dma_map(0x14dc170fc600, 0x381c00000000, 0x10000000, 0x14d7fd3f0000) = -22 (Invalid argument)
2024-04-27T18:44:08.006008Z qemu-system-x86_64: terminating on signal 15 from pid 15617 (/usr/sbin/libvirtd)
2024-04-27 18:44:08.407+0000: shutting down, reason=destroyed
2024-04-27 18:56:40.657+0000: Starting external device: TPM Emulator
/usr/bin/swtpm socket --ctrl 'type=unixio,path=/run/libvirt/qemu/swtpm/7-Windows 11-swtpm.sock,mode=0600' --tpmstate dir=/var/lib/libvirt/swtpm/238c0edb-a29c-5167-a285-78214c7dd87b/tpm2,mode=0600 --log 'file=/var/log/swtpm/libvirt/qemu/Windows 11-swtpm.log' --terminate --tpm2
2024-04-27 18:56:40.683+0000: starting up libvirt version: 8.7.0, qemu version: 7.2.0, kernel: 6.1.82-Unraid, hostname: sgtnunraid
LC_ALL=C \
PATH=/bin:/sbin:/usr/bin:/usr/sbin \
HOME='/var/lib/libvirt/qemu/domain-7-Windows 11' \
XDG_DATA_HOME='/var/lib/libvirt/qemu/domain-7-Windows 11/.local/share' \
XDG_CACHE_HOME='/var/lib/libvirt/qemu/domain-7-Windows 11/.cache' \
XDG_CONFIG_HOME='/var/lib/libvirt/qemu/domain-7-Windows 11/.config' \
/usr/local/sbin/qemu \
-name 'guest=Windows 11,debug-threads=on' \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-7-Windows 11/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/etc/libvirt/qemu/nvram/238c0edb-a29c-5167-a285-78214c7dd87b_VARS-pure-efi-tpm.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-7.2,usb=off,dump-guest-core=off,mem-merge=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format \
-accel kvm \
-cpu host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff,hv-vendor-id=none,host-cache-info=on,l3-cache=off \
-m 16384 \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":17179869184}' \
-overcommit mem-lock=off \
-smp 8,sockets=1,dies=1,cores=4,threads=2 \
-uuid 238c0edb-a29c-5167-a285-78214c7dd87b \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=43,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
-device '{"driver":"pcie-pci-bridge","id":"pci.7","bus":"pci.1","addr":"0x0"}' \
-device '{"driver":"ich9-usb-ehci1","id":"usb","bus":"pcie.0","addr":"0x7.0x7"}' \
-device '{"driver":"ich9-usb-uhci1","masterbus":"usb.0","firstport":0,"bus":"pcie.0","multifunction":true,"addr":"0x7"}' \
-device '{"driver":"ich9-usb-uhci2","masterbus":"usb.0","firstport":2,"bus":"pcie.0","addr":"0x7.0x1"}' \
-device '{"driver":"ich9-usb-uhci3","masterbus":"usb.0","firstport":4,"bus":"pcie.0","addr":"0x7.0x2"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.2","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/Windows 11/vdisk1.img","node-name":"libvirt-3-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-3-storage"}' \
-device '{"driver":"virtio-blk-pci","bus":"pci.3","addr":"0x0","drive":"libvirt-3-format","id":"virtio-disk2","bootindex":1,"write-cache":"on","serial":"vdisk1"}' \
-blockdev '{"driver":"file","filename":"/mnt/user/isos/Windows11.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"}' \
-device '{"driver":"ide-cd","bus":"ide.0","drive":"libvirt-2-format","id":"sata0-0-0","bootindex":2}' \
-blockdev '{"driver":"file","filename":"/mnt/user/isos/virtio-win-0.1.248-1.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-cd","bus":"ide.1","drive":"libvirt-1-format","id":"sata0-0-1"}' \
-netdev tap,fd=44,id=hostnet0 \
-device '{"driver":"e1000","netdev":"hostnet0","id":"net0","mac":"52:54:00:3b:bc:34","bus":"pci.7","addr":"0x1"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=41,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-chardev 'socket,id=chrtpm,path=/run/libvirt/qemu/swtpm/7-Windows 11-swtpm.sock' \
-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
-device '{"driver":"tpm-tis","tpmdev":"tpm-tpm0","id":"tpm0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 0.0.0.0:2,websocket=5702,audiodev=audio1 \
-k en-us \
-device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \
-device '{"driver":"vfio-pci","host":"0000:03:00.0","id":"hostdev0","bus":"pci.4","addr":"0x0"}' \
-device '{"driver":"vfio-pci","host":"0000:03:00.1","id":"hostdev1","bus":"pci.5","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
char device redirected to /dev/pts/4 (label charserial0)
qxl_send_events: spice-server bug: guest stopped, ignoring
2024-04-27T18:56:42.808272Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:42.808314Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381800000000, 0x400000000, 0x14bed2000000) = -2 (No such file or directory)
2024-04-27T18:56:42.809994Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:42.810000Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381c00000000, 0x10000000, 0x14bec2000000) = -22 (Invalid argument)
2024-04-27T18:56:42.979266Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:42.979279Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381800000000, 0x400000000, 0x14bed2000000) = -22 (Invalid argument)
2024-04-27T18:56:42.981030Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:42.981036Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381c00000000, 0x10000000, 0x14bec2000000) = -22 (Invalid argument)
2024-04-27T18:56:43.008906Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:43.008918Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381800000000, 0x400000000, 0x14bed2000000) = -22 (Invalid argument)
2024-04-27T18:56:43.010623Z qemu-system-x86_64: VFIO_MAP_DMA failed: Invalid argument
2024-04-27T18:56:43.010629Z qemu-system-x86_64: vfio_dma_map(0x14c2dbcfc600, 0x381c00000000, 0x10000000, 0x14bec2000000) = -22 (Invalid argument)
And here is my Diagnostics, too.
I would be very grateful for any help!
diagnostics.zip