Skip to contentSkip to conversation

virtio: invoke set_features on load

PATCH In review Michael S. Tsirkin 2 participants 2 messages May 9, 2010 – May 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: invoke set_features on load

After migration, vhost was not getting features acked because set_features callback was never invoked. The fix is just to invoke that callback.

---

David, a tested-by tag would be appreciated.

 hw/virtio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/virtio.c +2 -0
index 5d686f0..74c450d 100644
@@ -692,6 +692,8 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
                 features, supported_features);
         return -1;
     }
+    if (vdev->set_features)
+        vdev->set_features(vdev, features);
     vdev->guest_features = features;
     vdev->config_len = qemu_get_be32(f);
     qemu_get_buffer(f, vdev->config, vdev->config_len);
Signature · 1 line
1.7.1.12.g42b7f
Tested-by on v1 1/1
#1 lore raw

"Michael S. Tsirkin" <[email protected]> wrote on 05/09/2010 09:42:09 AM:

Quoted 9 lines

After migration, vhost was not getting features acked because set_features callback was never invoked. The fix is just to invoke that callback.

---

David, a tested-by tag would be appreciated.

Quoted 19 lines
 hw/virtio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
hw/virtio.c +2 -0
index 5d686f0..74c450d 100644
@@ -692,6 +692,8 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
                 features, supported_features);
         return -1;
     }
+    if (vdev->set_features)
+        vdev->set_features(vdev, features);
     vdev->guest_features = features;
     vdev->config_len = qemu_get_be32(f);
     qemu_get_buffer(f, vdev->config, vdev->config_len);
Signature · 1 line
1.7.1.12.g42b7f