-
Notifications
You must be signed in to change notification settings - Fork 57
Description
While trying to add migration support to the QEMU vfio-user client, I'm seeing migration of the GPIO sample device fail with a dirty memory tracking error that I don't yet understand. I was hoping to get some assistance (sorry if this isn't the right space for this, since it might be a qemu issue).
The QEMU tree with my patches is at https://github.com/eltrufas/qemu/commits/master/. So far I've implemented the vfio-user equivalents of the ioctls that the migration.c file uses (DEVICE_FEATURE, DEVICE_RESET, GET_PRECOPY_INFO), and connected the migration init code from VFIO into vfio-user. My libvfio-user tree is https://github.com/eltrufas/libvfio-user/tree/master. It is basically untouched save for including #823. I don't think that would make a difference for what I'm seeing though, since it doesn't get far enough to exercise the calls I added.
When starting a VM with the GPIO sample attached and executing a migration, I get:
(qemu) migrate "exec:cat > mig"
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xc0000, size: t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xca000, size: t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xcd000, size: t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xe8000, size: t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xf0000, size: t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0x100000, size:t
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xfd000000, sizt
qemu-system-x86_64: vfio-user:/tmp/vfio-user.sock: Failed to get DMA logging report, iova: 0xfffc0000, sizt
qemu-system-x86_64: ram_save_setup failed: Invalid argument
qemu-system-x86_64: ram_save_setup failed: Invalid argument
For completeness:
- GPIO logs: https://pastebin.com/yHyvKm5f
- QEMU trace events: https://pastebin.com/yHyvKm5f
I'm willing to put in time to track this down, but I'm curious to hear your thoughts on where this might be breaking down. I'm especiaily trying to determine whether I'm doing something wrong in my qemu implementation of VFIO_USER_DEVICE_FEATURE, or if QEMU relies on sending requests that seemingly work fine for regular VFIO but not for vfio-user.