Skip to content

DMA logging report fails with QEMU client #824

@eltrufas

Description

@eltrufas

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions