diff options
Diffstat (limited to 'vhost_user_rng.c')
-rw-r--r-- | vhost_user_rng.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vhost_user_rng.c b/vhost_user_rng.c index 860c33e..6d4fd5c 100644 --- a/vhost_user_rng.c +++ b/vhost_user_rng.c @@ -64,8 +64,9 @@ static void vu_rng_start(VirtIODevice *vdev) } rng->vhost_dev->acked_features = vdev->guest_features; + DBG("rng->vhost_dev->acked_features: 0x%lx\n", vdev->guest_features); - ret = vhost_dev_start(rng->vhost_dev, vdev); + ret = vhost_dev_start(rng->vhost_dev, vdev, true); if (ret < 0) { DBG("Error starting vhost-user-rng: %d\n", ret); return; @@ -80,6 +81,9 @@ static void vu_rng_start(VirtIODevice *vdev) vhost_virtqueue_mask(rng->vhost_dev, vdev, i, false); } + /* Wait a bit for the vrings to be set in vhost-user-device */ + sleep(1); + } /* TODO: We need to implement this function in a future release */ @@ -190,4 +194,8 @@ void vhost_user_rng_realize(void) /* Initiale vhost-user communication */ vhost_dev_init(dev); + + /* Write the final features */ + global_vdev->host_features = dev->features; + DBG("dev->host_features: 0x%lx\n", dev->features); } |