Hi On Wed, Jan 9, 2019 at 12:45 PM Hoffmann, Gerd <kra...@redhat.com> wrote: > > Hi, > > > Unfortunately, vdev is not set before vhost_dev_start(). > > > > We could add the migration blocker there somehow? > > Sure. Just use migrate_add_blocker() to do that at any time (see qxl.c > for an example).
VhostUserInput inherits from VirtioInput, which implements vmsd. The "Add vhost-user-input-pci" patch override the DeviceClass vmsd to set it as unmigratable. If I understand correctly, Michael suggested to add a check for device vmsd == NULL in hw/virtio/vhost-user.c instead. However, vhost-user devices would still need to overwrite vmsd to NULL. I don't think there is a benefit in the generic vmsd == NULL check, as you still need not to forget to overwrite vmsd to NULL in the vhost-user device. Am I missing something? -- Marc-André Lureau