diff options
author | Jason Wang <jasowang@redhat.com> | 2011-06-21 12:04:27 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-07-19 12:28:34 +0200 |
commit | f59281dafb832b161133743fcf3dc29051e6fdb8 (patch) | |
tree | 3eacc9fd60396174a94c8bd02326e930ff94351d /drivers/vhost/vhost.h | |
parent | net: can: remove custom hex_to_bin() (diff) | |
download | linux-f59281dafb832b161133743fcf3dc29051e6fdb8.tar.xz linux-f59281dafb832b161133743fcf3dc29051e6fdb8.zip |
vhost: init used ring after backend was set
Move the used ring initialization after backend was set. This
makes it possible to disable the backend and tweak the used ring,
then restart. This will also make it possible to log the used ring
write correctly.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 1544b782529b..14c9abf0d800 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -174,6 +174,7 @@ int vhost_get_vq_desc(struct vhost_dev *, struct vhost_virtqueue *, struct vhost_log *log, unsigned int *log_num); void vhost_discard_vq_desc(struct vhost_virtqueue *, int n); +int vhost_init_used(struct vhost_virtqueue *); int vhost_add_used(struct vhost_virtqueue *, unsigned int head, int len); int vhost_add_used_n(struct vhost_virtqueue *, struct vring_used_elem *heads, unsigned count); |