nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
166 stars 51 forks source link

vfu_reset_ctx() should also reset migration state to RUNNING #458

Closed changpe1 closed 3 years ago

changpe1 commented 3 years ago
  1. Start QEMU with migration region
  2. Kill QEMU
  3. Restart QEMU

I can see the following error messages, maybe libvfio-user should reset the device state to RUNNING too.

[2021-04-30 17:52:24.240759] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: bad command 2 while device in stopped state
[2021-04-30 17:52:24.240773] vfio_user.c:1476:vfio_user_log: *DEBUG*: /var/run/muser/domain/muser0/8: closing unexpected fd 749 (index 0) from cmd 2
[2021-04-30 17:52:24.240786] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0x1: cmd 2 failed: Invalid argument
[2021-04-30 17:52:24.240801] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: bad size 0 in header
[2021-04-30 17:52:24.240812] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: cmd 0 failed: Invalid argument
[2021-04-30 17:52:24.240825] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: not a command req
[2021-04-30 17:52:24.240833] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: cmd 0 failed: Invalid argument
[2021-04-30 17:52:24.240859] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: bad command 2 while device in stopped state
[2021-04-30 17:52:24.240867] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0x2: cmd 2 failed: Invalid argument
[2021-04-30 17:52:24.240879] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: bad size 0 in header
[2021-04-30 17:52:24.240890] vfio_user.c:1484:vfio_user_log: *ERROR*: /var/run/muser/domain/muser0/8: msg0: cmd 12 failed: Invalid argument
changpe1 commented 3 years ago

link to issue #218

tmakatos commented 3 years ago

Yes I think you're right.

tmakatos commented 3 years ago

Should be fixed by #457.