Test steps on Bionic. Output is provided for each test with the QEMU versions in -updates and test packages in a PPA. RELEASE=bionic # only the 5.4 kernel validates the IOMMU reserved ranges $ sudo apt install --yes --no-install-recommends linux-generic-hwe-18.04 $ sudo reboot ... $ dpkg -s qemu-system-x86 | grep Version: Version: 1:2.11+dfsg-1ubuntu7.41 $ dpkg -s qemu-system-x86 | grep Version: Version: 1:2.11+dfsg-1ubuntu7.42 ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035265 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA: -22 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio_dma_map(0x55c57a2aa790, 0x100000000, 0xfc00100000, 0x7e42dfe00000) = -22 (Invalid argument) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA: -22 (hint: AMD IOMMU: reduce VM ram) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio_dma_map(0x55b5cb9a9790, 0x100000000, 0xfc00100000, 0x7e545be00000) = -22 (Invalid argument) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035264 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] [ 148.065577] Out of memory: Killed process 1453 (qemu-system-x86) total-vm:1062679292kB, anon-rss:3872400kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:8100kB oom_score_adj:0 Killed $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M pc -m 1035264 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] [ 343.622730] Out of memory: Killed process 2082 (qemu-system-x86) total-vm:1062679292kB, anon-rss:3868344kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:8100kB oom_score_adj:0 Killed ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034241 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA: -22 qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio_dma_map(0x55e792ec0e80, 0x100000000, 0xfc00100000, 0x7ea923e00000) = -22 (Invalid argument) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034241 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: VFIO_MAP_DMA: -22 (hint: AMD IOMMU: reduce VM ram) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio_dma_map(0x556ee3551e80, 0x100000000, 0xfc00100000, 0x7e7a47e00000) = -22 (Invalid argument) qemu-system-x86_64: -device vfio-pci,host=0000:00:03.0: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument ... $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034240 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] [ 176.065472] Out of memory: Killed process 1518 (qemu-system-x86) total-vm:1061630344kB, anon-rss:3872532kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:8108kB oom_score_adj:0 Killed $ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -M q35 -m 1034240 qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] [ 369.769526] Out of memory: Killed process 2090 (qemu-system-x86) total-vm:1061630344kB, anon-rss:3868284kB, file-rss:4kB, shmem-rss:0kB, UID:0 pgtables:8100kB 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:37:19.815629Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] 2023-03-04T23:37:20.556667Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: VFIO_MAP_DMA: -22 2023-03-04T23:37:20.556750Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: vfio_dma_map(0x559b0c1a9170, 0x100000000, 0xfc00100000, 0x7e2807e00000) = -22 (Invalid argument) 2023-03-04T23:37:20.565704Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: 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:40:07.564507Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] 2023-03-04T23:40:08.490097Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: VFIO_MAP_DMA: -22 (hint: AMD IOMMU: reduce VM ram) 2023-03-04T23:40:08.490289Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: vfio_dma_map(0x557fda165170, 0x100000000, 0xfc00100000, 0x7e3d9be00000) = -22 (Invalid argument) 2023-03-04T23:40:08.505190Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.0,addr=0x2: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument ... $ sed s/1035265/1035264/ -i vm.xml $ virsh create vm.xml [ 248.659702] Out of memory: Killed process 1638 (qemu-system-x86) total-vm:1062657904kB, anon-rss:3867488kB, file-rss:4kB, shmem-rss:0kB, UID:64055 pgtables:8100kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: qemu unexpectedly closed the monitor: 2023-03-04T23:37:37.590604Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] $ sed s/1035265/1035264/ -i vm.xml $ virsh create vm.xml [ 419.042306] Out of memory: Killed process 2189 (qemu-system-x86) total-vm:1062657904kB, anon-rss:3866036kB, file-rss:4kB, shmem-rss:0kB, UID:64055 pgtables:8092kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor: 2023-03-04T23:40:27.966918Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] ... $ cat vm.xml vm hvm 1034241
$ virsh create vm.xml error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor: 2023-03-04T23:38:08.767496Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] 2023-03-04T23:38:09.283978Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: VFIO_MAP_DMA: -22 2023-03-04T23:38:09.284105Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: vfio_dma_map(0x55a78ccdfc50, 0x100000000, 0xfc00100000, 0x7ea083e00000) = -22 (Invalid argument) 2023-03-04T23:38:09.290046Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: 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:40:49.199432Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] 2023-03-04T23:40:49.721532Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: VFIO_MAP_DMA: -22 (hint: AMD IOMMU: reduce VM ram) 2023-03-04T23:40:49.721609Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: vfio_dma_map(0x55ea22a79c50, 0x100000000, 0xfc00100000, 0x7ebc47e00000) = -22 (Invalid argument) 2023-03-04T23:40:49.727903Z qemu-system-x86_64: -device vfio-pci,host=00:03.0,id=hostdev0,bus=pci.3,addr=0x1: vfio error: 0000:00:03.0: failed to setup container for group 2: memory listener initialization failed for container: Invalid argument ... $ sed s/1034241/1034240/ -i vm.xml $ virsh create vm.xml [ 296.598447] Out of memory: Killed process 1797 (qemu-system-x86) total-vm:1061618060kB, anon-rss:3866920kB, file-rss:4kB, shmem-rss:0kB, UID:64055 pgtables:8084kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor: 2023-03-04T23:38:25.545038Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5] $ virsh create vm.xml [ 458.397031] Out of memory: Killed process 2347 (qemu-system-x86) total-vm:1061618060kB, anon-rss:3865672kB, file-rss:4kB, shmem-rss:0kB, UID:64055 pgtables:8084kB oom_score_adj:0 error: Failed to create domain from vm.xml error: internal error: process exited while connecting to monitor: 2023-03-04T23:41:07.346098Z qemu-system-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]