Comment 26 for bug 1838575

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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

Also correct the link to qemu - it is the one from vfio_listener_region_add:
https://git.qemu.org/?p=qemu.git;a=blob;f=hw/vfio/common.c;h=3e03c495d868f154b26a33c0c2d870273a0b4198;hb=HEAD#l664