Each qemu (version) is slightly different in the road to this, but then seems to behave.
This one is slightly better to get "in front" of the slow call to map all the memory.
$ virsh nodedev-detach pci_0000_21_00_1 --driver vfio
$ gdb /usr/bin/qemu-system-x86_64
(gdb) b vfio_dma_map
(gdb) command 1
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>silent
>if size != 134217728000
>cont
>end
>end
(gdb) run -m 131072 -smp 1 -no-user-config -device vfio-pci,host=21:00.1,id=hostdev0,bus=pci.0,addr=0x7 -enable-kvm
(gdb) catch syscall 16
(gdb) c
Each qemu (version) is slightly different in the road to this, but then seems to behave.
This one is slightly better to get "in front" of the slow call to map all the memory. qemu-system- x86_64 host=21: 00.1,id= hostdev0, bus=pci. 0,addr= 0x7 -enable-kvm
$ virsh nodedev-detach pci_0000_21_00_1 --driver vfio
$ gdb /usr/bin/
(gdb) b vfio_dma_map
(gdb) command 1
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>silent
>if size != 134217728000
>cont
>end
>end
(gdb) run -m 131072 -smp 1 -no-user-config -device vfio-pci,
(gdb) catch syscall 16
(gdb) c
Also correct the link to qemu - it is the one from vfio_listener_ region_ add: /git.qemu. org/?p= qemu.git; a=blob; f=hw/vfio/ common. c;h=3e03c495d86 8f154b26a33c0c2 d870273a0b4198; hb=HEAD# l664
https:/