Test Steps on QEMU 7.2 (lunar-proposed), which addresses the issue:
RELEASE=lunar
$ apt policy qemu-system-x86 qemu-system-x86: Installed: 1:7.2+dfsg-4ubuntu1 Candidate: 1:7.2+dfsg-4ubuntu1 Version table: *** 1:7.2+dfsg-4ubuntu1 100 100 http://security.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages 100 http://archive.ubuntu.com/ubuntu lunar-proposed/main amd64 Packages 100 /var/lib/dpkg/status 1:7.0+dfsg-7ubuntu4 500 500 http://archive.ubuntu.com/ubuntu lunar/main amd64 Packages
The VM now mentions it needs more phys-bits for the 1+ TiB assignment/usage (~2 TiB in this example)
$ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -m 2048000 qemu-system-x86_64: Address space limit 0xffffffffff < 0x2f3bfffffff phys-bits too low (40)
If the physical bits are specified, the VFIO MAP DMA error no longer happens, and we proceed to out-of-memory as expected.
$ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -m 2048000 -cpu qemu64,phys-bits=48 [ 578.875598] Out of memory: Killed process 2715 (qemu-system-x86) total-vm:2098083568kB, anon-rss:3749768kB, file-rss:2640kB, shmem-rss:0kB, UID:0 pgtables:7524kB oom_score_adj:0
Test Steps on QEMU 7.2 (lunar-proposed), which addresses the issue:
RELEASE=lunar
$ apt policy qemu-system-x86 security. ubuntu. com/ubuntu lunar-proposed/main amd64 Packages archive. ubuntu. com/ubuntu lunar-proposed/main amd64 Packages dpkg/status 7.0+dfsg- 7ubuntu4 500 archive. ubuntu. com/ubuntu lunar/main amd64 Packages
qemu-system-x86:
Installed: 1:7.2+dfsg-4ubuntu1
Candidate: 1:7.2+dfsg-4ubuntu1
Version table:
*** 1:7.2+dfsg-4ubuntu1 100
100 http://
100 http://
100 /var/lib/
1:
500 http://
The VM now mentions it needs more phys-bits for the 1+ TiB assignment/usage (~2 TiB in this example)
$ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -m 2048000 x86_64: Address space limit 0xffffffffff < 0x2f3bfffffff phys-bits too low (40)
qemu-system-
If the physical bits are specified, the VFIO MAP DMA error no longer happens,
and we proceed to out-of-memory as expected.
$ sudo qemu-system-x86_64 -nographic -device vfio-pci,host=$PCI -m 2048000 -cpu qemu64,phys-bits=48 2098083568kB, anon-rss:3749768kB, file-rss:2640kB, shmem-rss:0kB, UID:0 pgtables:7524kB oom_score_adj:0
[ 578.875598] Out of memory: Killed process 2715 (qemu-system-x86) total-vm: