• Home
  • Raw
  • Download

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 = vhost_vq_get_backend(vq); 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 = vhost_vq_get_backend(vq); in vhost_test_stop_vq()
137 vhost_vq_set_backend(vq, 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 = vhost_vq_get_backend(vq); in vhost_test_run()
202 vhost_vq_set_backend(vq, 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()
271 struct vhost_virtqueue *vq; in vhost_test_set_backend() local
283 vq = &n->vqs[index]; in vhost_test_set_backend()
284 mutex_lock(&vq->mutex); in vhost_test_set_backend()
287 if (!vhost_vq_access_ok(vq)) { in vhost_test_set_backend()
292 vhost_poll_stop(&vq->poll); in vhost_test_set_backend()
293 backend = vhost_vq_get_backend(vq); in vhost_test_set_backend()
294 vhost_vq_set_backend(vq, NULL); in vhost_test_set_backend()
296 vhost_vq_set_backend(vq, backend); in vhost_test_set_backend()
297 r = vhost_vq_init_access(vq); in vhost_test_set_backend()
299 r = vhost_poll_start(&vq->poll, vq->kick); in vhost_test_set_backend()
302 mutex_unlock(&vq->mutex); in vhost_test_set_backend()
312 mutex_unlock(&vq->mutex); in vhost_test_set_backend()