Lines Matching refs:vq

45 	struct vhost_virtqueue *vq = &n->vqs[VHOST_TEST_VQ];  in handle_vq()  local
51 mutex_lock(&vq->mutex); in handle_vq()
52 private = vq->private_data; in handle_vq()
54 mutex_unlock(&vq->mutex); in handle_vq()
58 vhost_disable_notify(&n->dev, vq); in handle_vq()
61 head = vhost_get_vq_desc(vq, vq->iov, in handle_vq()
62 ARRAY_SIZE(vq->iov), in handle_vq()
69 if (head == vq->num) { in handle_vq()
70 if (unlikely(vhost_enable_notify(&n->dev, vq))) { in handle_vq()
71 vhost_disable_notify(&n->dev, vq); in handle_vq()
77 vq_err(vq, "Unexpected descriptor format for TX: " in handle_vq()
81 len = iov_length(vq->iov, out); in handle_vq()
84 vq_err(vq, "Unexpected 0 len for TX\n"); in handle_vq()
87 vhost_add_used_and_signal(&n->dev, vq, head, 0); in handle_vq()
89 if (unlikely(vhost_exceeds_weight(vq, 0, total_len))) in handle_vq()
93 mutex_unlock(&vq->mutex); in handle_vq()
98 struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, in handle_vq_kick() local
100 struct vhost_test *n = container_of(vq->dev, struct vhost_test, dev); in handle_vq_kick()
131 struct vhost_virtqueue *vq) in vhost_test_stop_vq() argument
135 mutex_lock(&vq->mutex); in vhost_test_stop_vq()
136 private = vq->private_data; in vhost_test_stop_vq()
137 vq->private_data = NULL; in vhost_test_stop_vq()
138 mutex_unlock(&vq->mutex); in vhost_test_stop_vq()
176 struct vhost_virtqueue *vq; in vhost_test_run() local
196 vq = n->vqs + index; in vhost_test_run()
197 mutex_lock(&vq->mutex); in vhost_test_run()
201 oldpriv = vq->private_data; in vhost_test_run()
202 vq->private_data = priv; in vhost_test_run()
206 mutex_unlock(&vq->mutex); in vhost_test_run()
250 struct vhost_virtqueue *vq; in vhost_test_set_features() local
258 vq = &n->vqs[VHOST_TEST_VQ]; in vhost_test_set_features()
259 mutex_lock(&vq->mutex); in vhost_test_set_features()
260 vq->acked_features = features; in vhost_test_set_features()
261 mutex_unlock(&vq->mutex); in vhost_test_set_features()