Test steps on Kinetic. Output is provided for each test with the QEMU versions in -updates and test packages in a PPA. RELEASE=kinetic ... $ dpkg -s qemu-system-x86 | grep Version: Version: 1:7.0+dfsg-7ubuntu2.1 $ dpkg -s qemu-system-x86 | grep Version: Version: 1:7.0+dfsg-7ubuntu2.2 ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035265 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA failed: Invalid argument qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x55de52842110, 0x100000000, 0xfc00100000, 0x7e73d9400000) = -22 (Invalid argument) $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035265 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA failed: Invalid argument (hint: AMD IOMMU: reduce VM ram) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x557b14b21110, 0x100000000, 0xfc00100000, 0x7e6221400000) = -22 (Invalid argument) ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035264 [ 92.351799] Out of memory: Killed process 903 (qemu-system-x86) total-vm:1060937428kB, anon-rss:3758492kB, file-rss:2628kB, shmem-rss:0kB, UID:0 pgtables:7512kB oom_score_adj:0 Killed $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035264 [ 436.735278] Out of memory: Killed process 2559 (qemu-system-x86) total-vm:1060937428kB, anon-rss:3735972kB, file-rss:2568kB, shmem-rss:0kB, UID:0 pgtables:7488kB oom_score_adj:0 Killed ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034241 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA failed: Invalid argument qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x561beb4c85c0, 0x100000000, 0xfc00100000, 0x7ef375400000) = -22 (Invalid argument) $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034241 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA failed: Invalid argument (hint: AMD IOMMU: reduce VM ram) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x561beb4c85c0, 0x100000000, 0xfc00100000, 0x7ef375400000) = -22 (Invalid argument) ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034240 [ 119.865082] Out of memory: Killed process 918 (qemu-system-x86) total-vm:1059889168kB, anon-rss:3764036kB, file-rss:2636kB, shmem-rss:0kB, UID:0 pgtables:7536kB oom_score_adj:0 Killed $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034240 [ 463.268559] Out of memory: Killed process 2574 (qemu-system-x86) total-vm:1059889168kB, anon-rss:3737156kB, file-rss:2640kB, shmem-rss:0kB, UID:0 pgtables:7472kB oom_score_adj:0 Killed ... $ cat vm.xml vm hvm 1035265
$ virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: qemu unexpectedly closed the monitor: 2023-03-04T23:27:57.955370Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.0","addr":"0x2"}: VFIO_MAP_DMA failed: Invalid argument 2023-03-04T23:27:58.033246Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.0","addr":"0x2"}: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x5627141a2040, 0x100000000, 0xfc00100000, 0x7e0a49400000) = -22 (Invalid argument) $ virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: qemu unexpectedly closed the monitor: 2023-03-04T23:32:46.662885Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.0","addr":"0x2"}: VFIO_MAP_DMA failed: Invalid argument (hint: AMD IOMMU: reduce VM ram) 2023-03-04T23:32:46.705900Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.0","addr":"0x2"}: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x55ea7dcad040, 0x100000000, 0xfc00100000, 0x7eb631400000) = -22 (Invalid argument) ... $ sed s/1035265/1035264/ -i vm.xml $ virsh create vm.xml [ 281.277086] Out of memory: Killed process 2044 (qemu-system-x86) total-vm:1060989740kB, anon-rss:3724768kB, file-rss:2568kB, shmem-rss:0kB, UID:64055 pgtables:7456kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor $ virsh create vm.xml [ 522.966071] Out of memory: Killed process 2680 (qemu-system-x86) total-vm:1060989740kB, anon-rss:3734512kB, file-rss:2576kB, shmem-rss:0kB, UID:64055 pgtables:7472kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor ... $ cat vm.xml vm hvm 1034241
$ virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: qemu unexpectedly closed the monitor: 2023-03-04T23:28:46.042882Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.3","addr":"0x1"}: VFIO_MAP_DMA failed: Invalid argument 2023-03-04T23:28:46.097727Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.3","addr":"0x1"}: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x5634af190980, 0x100000000, 0xfc00100000, 0x7ef71d400000) = -22 (Invalid argument) $ virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: qemu unexpectedly closed the monitor: 2023-03-04T23:32:00.592090Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.3","addr":"0x1"}: VFIO_MAP_DMA failed: Invalid argument (hint: AMD IOMMU: reduce VM ram) 2023-03-04T23:32:00.629199Z qemu-system-x86_64: -device {"driver":"vfio-pci","host":"0000:00:03.0","id":"hostdev0","bus":"pci.3","addr":"0x1"}: vfio 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed: Region pc.ram: vfio_dma_map(0x564878680980, 0x100000000, 0xfc00100000, 0x7e2985400000) = -22 (Invalid argument) ... $ sed s/1034241/1034240/ -i vm.xml $ virsh create vm.xml [ 324.813508] Out of memory: Killed process 2119 (qemu-system-x86) total-vm:1059950540kB, anon-rss:3725672kB, file-rss:2544kB, shmem-rss:0kB, UID:64055 pgtables:7452kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor $ virsh create vm.xml [ 484.549084] Out of memory: Killed process 2609 (qemu-system-x86) total-vm:1059950540kB, anon-rss:3734368kB, file-rss:2576kB, shmem-rss:0kB, UID:64055 pgtables:7476kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor