Home
last modified time | relevance | path

Searched refs:vq (Results 1 – 25 of 248) sorted by relevance

12345678910

/linux-6.12.1/drivers/virtio/ !
Dvirtio_ring.c22 dev_err(&(_vq)->vq.vdev->dev, \
23 "%s:"fmt, (_vq)->vq.name, ##args); \
31 (_vq)->vq.name, (_vq)->in_use); \
59 dev_err(&_vq->vq.vdev->dev, \
60 "%s:"fmt, (_vq)->vq.name, ##args); \
63 #define START_USE(vq) argument
64 #define END_USE(vq) argument
65 #define LAST_ADD_TIME_UPDATE(vq) argument
66 #define LAST_ADD_TIME_CHECK(vq) argument
67 #define LAST_ADD_TIME_INVALID(vq) argument
[all …]
Dvirtio_pci_modern.c46 void vp_modern_avq_done(struct virtqueue *vq) in vp_modern_avq_done() argument
48 struct virtio_pci_device *vp_dev = to_vp_device(vq->vdev); in vp_modern_avq_done()
56 virtqueue_disable_cb(vq); in vp_modern_avq_done()
57 while ((cmd = virtqueue_get_buf(vq, &len))) in vp_modern_avq_done()
59 } while (!virtqueue_enable_cb(vq)); in vp_modern_avq_done()
70 struct virtqueue *vq; in virtqueue_exec_admin_cmd() local
74 vq = admin_vq->info->vq; in virtqueue_exec_admin_cmd()
75 if (!vq) in virtqueue_exec_admin_cmd()
86 if (virtqueue_is_broken(vq)) in virtqueue_exec_admin_cmd()
90 ret = virtqueue_add_sgs(vq, sgs, out_num, in_num, cmd, GFP_KERNEL); in virtqueue_exec_admin_cmd()
[all …]
Dvirtio_vdpa.c40 struct virtqueue *vq; member
106 static bool virtio_vdpa_notify(struct virtqueue *vq) in virtio_vdpa_notify() argument
108 struct vdpa_device *vdpa = vd_get_vdpa(vq->vdev); in virtio_vdpa_notify()
111 ops->kick_vq(vdpa, vq->index); in virtio_vdpa_notify()
116 static bool virtio_vdpa_notify_with_data(struct virtqueue *vq) in virtio_vdpa_notify_with_data() argument
118 struct vdpa_device *vdpa = vd_get_vdpa(vq->vdev); in virtio_vdpa_notify_with_data()
120 u32 data = vring_notification_data(vq); in virtio_vdpa_notify_with_data()
140 return vring_interrupt(0, info->vq); in virtio_vdpa_virtqueue_cb()
145 void (*callback)(struct virtqueue *vq), in virtio_vdpa_setup_vq() argument
153 bool (*notify)(struct virtqueue *vq) = virtio_vdpa_notify; in virtio_vdpa_setup_vq()
[all …]
Dvirtio_pci_common.c51 bool vp_notify(struct virtqueue *vq) in vp_notify() argument
55 iowrite16(vq->index, (void __iomem *)vq->priv); in vp_notify()
68 vring_interrupt(irq, info->vq); in vp_vring_slow_path_interrupt()
92 if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) in vp_vring_interrupt()
207 void (*callback)(struct virtqueue *vq), in vp_setup_vq() argument
215 struct virtqueue *vq; in vp_setup_vq() local
222 vq = vp_dev->setup_vq(vp_dev, info, index, callback, name, ctx, in vp_setup_vq()
224 if (IS_ERR(vq)) in vp_setup_vq()
227 info->vq = vq; in vp_setup_vq()
240 return vq; in vp_setup_vq()
[all …]
/linux-6.12.1/drivers/vhost/ !
Dvhost.c49 #define vhost_used_event(vq) ((__virtio16 __user *)&vq->avail->ring[vq->num]) argument
50 #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num]) argument
53 static void vhost_disable_cross_endian(struct vhost_virtqueue *vq) in vhost_disable_cross_endian() argument
55 vq->user_be = !virtio_legacy_is_little_endian(); in vhost_disable_cross_endian()
58 static void vhost_enable_cross_endian_big(struct vhost_virtqueue *vq) in vhost_enable_cross_endian_big() argument
60 vq->user_be = true; in vhost_enable_cross_endian_big()
63 static void vhost_enable_cross_endian_little(struct vhost_virtqueue *vq) in vhost_enable_cross_endian_little() argument
65 vq->user_be = false; in vhost_enable_cross_endian_little()
68 static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp) in vhost_set_vring_endian() argument
72 if (vq->private_data) in vhost_set_vring_endian()
[all …]
Dnet.c98 struct vhost_virtqueue *vq; member
109 struct vhost_virtqueue vq; member
227 static void vhost_net_enable_zcopy(int vq) in vhost_net_enable_zcopy() argument
229 vhost_net_zcopy_mask |= 0x1 << vq; in vhost_net_enable_zcopy()
233 vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) in vhost_net_ubuf_alloc() argument
244 ubufs->vq = vq; in vhost_net_ubuf_alloc()
358 struct vhost_virtqueue *vq) in vhost_zerocopy_signal_used() argument
361 container_of(vq, struct vhost_net_virtqueue, vq); in vhost_zerocopy_signal_used()
366 if (vq->heads[i].len == VHOST_DMA_FAILED_LEN) in vhost_zerocopy_signal_used()
368 if (VHOST_DMA_IS_DONE(vq->heads[i].len)) { in vhost_zerocopy_signal_used()
[all …]
Dtest.c45 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()
[all …]
Dvhost.h50 struct vhost_virtqueue *vq; member
55 struct vhost_virtqueue *vq);
158 struct vhost_virtqueue *vq; member
183 bool vhost_exceeds_weight(struct vhost_virtqueue *vq, int pkts, int total_len);
200 bool vhost_vq_access_ok(struct vhost_virtqueue *vq);
210 bool vhost_vq_work_queue(struct vhost_virtqueue *vq, struct vhost_work *work);
211 bool vhost_vq_has_work(struct vhost_virtqueue *vq);
212 bool vhost_vq_is_setup(struct vhost_virtqueue *vq);
226 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log,
229 int vq_meta_prefetch(struct vhost_virtqueue *vq);
[all …]
Dvsock.c91 struct vhost_virtqueue *vq) in vhost_transport_do_send_pkt() argument
98 mutex_lock(&vq->mutex); in vhost_transport_do_send_pkt()
100 if (!vhost_vq_get_backend(vq)) in vhost_transport_do_send_pkt()
103 if (!vq_meta_prefetch(vq)) in vhost_transport_do_send_pkt()
107 vhost_disable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt()
123 vhost_enable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt()
127 head = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), in vhost_transport_do_send_pkt()
134 if (head == vq->num) { in vhost_transport_do_send_pkt()
139 if (unlikely(vhost_enable_notify(&vsock->dev, vq))) { in vhost_transport_do_send_pkt()
140 vhost_disable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt()
[all …]
Dscsi.c174 struct vhost_virtqueue vq; member
257 struct vhost_virtqueue *vq; in vhost_scsi_init_inflight() local
261 vq = &vs->vqs[i].vq; in vhost_scsi_init_inflight()
263 mutex_lock(&vq->mutex); in vhost_scsi_init_inflight()
276 mutex_unlock(&vq->mutex); in vhost_scsi_init_inflight()
281 vhost_scsi_get_inflight(struct vhost_virtqueue *vq) in vhost_scsi_get_inflight() argument
286 svq = container_of(vq, struct vhost_scsi_virtqueue, vq); in vhost_scsi_get_inflight()
332 struct vhost_scsi_virtqueue, vq); in vhost_scsi_release_cmd_res()
383 struct vhost_scsi_virtqueue, vq); in vhost_scsi_release_cmd()
386 if (!vhost_vq_work_queue(&svq->vq, &svq->completion_work)) in vhost_scsi_release_cmd()
[all …]
/linux-6.12.1/arch/arm64/include/uapi/asm/ !
Dptrace.h169 #define SVE_PT_FPSIMD_SIZE(vq, flags) (sizeof(struct user_fpsimd_state)) argument
200 #define SVE_PT_SVE_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) argument
201 #define SVE_PT_SVE_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) argument
202 #define SVE_PT_SVE_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) argument
210 #define SVE_PT_SVE_ZREG_OFFSET(vq, n) \ argument
211 (SVE_PT_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n))
212 #define SVE_PT_SVE_ZREGS_SIZE(vq) \ argument
213 (SVE_PT_SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET)
215 #define SVE_PT_SVE_PREGS_OFFSET(vq) \ argument
216 (SVE_PT_REGS_OFFSET + __SVE_PREGS_OFFSET(vq))
[all …]
Dsve_context.h42 #define __sve_vl_from_vq(vq) ((vq) * __SVE_VQ_BYTES) argument
44 #define __SVE_ZREG_SIZE(vq) ((__u32)(vq) * __SVE_VQ_BYTES) argument
45 #define __SVE_PREG_SIZE(vq) ((__u32)(vq) * (__SVE_VQ_BYTES / 8)) argument
46 #define __SVE_FFR_SIZE(vq) __SVE_PREG_SIZE(vq) argument
49 #define __SVE_ZREG_OFFSET(vq, n) \ argument
50 (__SVE_ZREGS_OFFSET + __SVE_ZREG_SIZE(vq) * (n))
51 #define __SVE_ZREGS_SIZE(vq) \ argument
52 (__SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - __SVE_ZREGS_OFFSET)
54 #define __SVE_PREGS_OFFSET(vq) \ argument
55 (__SVE_ZREGS_OFFSET + __SVE_ZREGS_SIZE(vq))
[all …]
Dsigcontext.h211 #define sve_vl_from_vq(vq) __sve_vl_from_vq(vq) argument
276 #define SVE_SIG_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) argument
277 #define SVE_SIG_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) argument
278 #define SVE_SIG_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) argument
286 #define SVE_SIG_ZREG_OFFSET(vq, n) \ argument
287 (SVE_SIG_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n))
288 #define SVE_SIG_ZREGS_SIZE(vq) __SVE_ZREGS_SIZE(vq) argument
290 #define SVE_SIG_PREGS_OFFSET(vq) \ argument
291 (SVE_SIG_REGS_OFFSET + __SVE_PREGS_OFFSET(vq))
292 #define SVE_SIG_PREG_OFFSET(vq, n) \ argument
[all …]
/linux-6.12.1/tools/virtio/ !
Dvhost_net_test.c42 struct virtqueue *vq; member
138 static bool vq_notify(struct virtqueue *vq) in vq_notify() argument
140 struct vq_info *info = vq->priv; in vq_notify()
180 if (info->vq) in vq_reset()
181 vring_del_virtqueue(info->vq); in vq_reset()
185 info->vq = vring_new_virtqueue(info->idx, num, 4096, vdev, true, false, in vq_reset()
187 assert(info->vq); in vq_reset()
188 info->vq->priv = info; in vq_reset()
257 static void wait_for_interrupt(struct vq_info *vq) in wait_for_interrupt() argument
261 poll(&vq->fds, 1, 100); in wait_for_interrupt()
[all …]
Dvirtio_test.c35 struct virtqueue *vq; member
53 bool vq_notify(struct virtqueue *vq) in vq_notify() argument
55 struct vq_info *info = vq->priv; in vq_notify()
63 void vq_callback(struct virtqueue *vq) in vq_callback() argument
100 if (info->vq) in vq_reset()
101 vring_del_virtqueue(info->vq); in vq_reset()
105 info->vq = vring_new_virtqueue(info->idx, num, 4096, vdev, true, false, in vq_reset()
107 assert(info->vq); in vq_reset()
108 info->vq->priv = info; in vq_reset()
169 static void run_test(struct vdev_info *dev, struct vq_info *vq, in run_test() argument
[all …]
/linux-6.12.1/include/linux/ !
Dvirtio.h33 void (*callback)(struct virtqueue *vq);
43 int virtqueue_add_outbuf(struct virtqueue *vq,
48 int virtqueue_add_inbuf(struct virtqueue *vq,
53 int virtqueue_add_inbuf_ctx(struct virtqueue *vq,
59 int virtqueue_add_sgs(struct virtqueue *vq,
66 struct device *virtqueue_dma_dev(struct virtqueue *vq);
68 bool virtqueue_kick(struct virtqueue *vq);
70 bool virtqueue_kick_prepare(struct virtqueue *vq);
72 bool virtqueue_notify(struct virtqueue *vq);
74 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
[all …]
/linux-6.12.1/tools/virtio/linux/ !
Dvirtio.h22 void (*callback)(struct virtqueue *vq);
33 int virtqueue_add_sgs(struct virtqueue *vq,
40 int virtqueue_add_outbuf(struct virtqueue *vq,
45 int virtqueue_add_inbuf(struct virtqueue *vq,
50 bool virtqueue_kick(struct virtqueue *vq);
52 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
54 void virtqueue_disable_cb(struct virtqueue *vq);
56 bool virtqueue_enable_cb(struct virtqueue *vq);
57 bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
59 void *virtqueue_detach_unused_buf(struct virtqueue *vq);
[all …]
/linux-6.12.1/drivers/gpu/drm/virtio/ !
Dvirtgpu_trace.h12 TP_PROTO(struct virtqueue *vq, struct virtio_gpu_ctrl_hdr *hdr, u32 seqno),
13 TP_ARGS(vq, hdr, seqno),
16 __field(unsigned int, vq)
17 __string(name, vq->name)
26 __entry->dev = vq->vdev->index;
27 __entry->vq = vq->index;
33 __entry->num_free = vq->num_free;
37 __entry->dev, __entry->vq, __get_str(name),
43 TP_PROTO(struct virtqueue *vq, struct virtio_gpu_ctrl_hdr *hdr, u32 seqno),
44 TP_ARGS(vq, hdr, seqno)
[all …]
/linux-6.12.1/drivers/vdpa/vdpa_sim/ !
Dvdpa_sim_blk.c110 struct vdpasim_virtqueue *vq) in vdpasim_blk_handle_req() argument
123 ret = vringh_getdesc_iotlb(&vq->vring, &vq->out_iov, &vq->in_iov, in vdpasim_blk_handle_req()
124 &vq->head, GFP_ATOMIC); in vdpasim_blk_handle_req()
128 if (vq->out_iov.used < 1 || vq->in_iov.used < 1) { in vdpasim_blk_handle_req()
130 vq->out_iov.used, vq->in_iov.used); in vdpasim_blk_handle_req()
134 if (vq->in_iov.iov[vq->in_iov.used - 1].iov_len < 1) { in vdpasim_blk_handle_req()
142 to_push = vringh_kiov_length(&vq->in_iov) - 1; in vdpasim_blk_handle_req()
144 to_pull = vringh_kiov_length(&vq->out_iov); in vdpasim_blk_handle_req()
146 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &hdr, in vdpasim_blk_handle_req()
179 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req()
[all …]
Dvdpa_sim.c84 struct vdpasim_virtqueue *vq = in vdpasim_vq_notify() local
87 if (!vq->cb) in vdpasim_vq_notify()
90 vq->cb(vq->private); in vdpasim_vq_notify()
95 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready() local
96 uint16_t last_avail_idx = vq->vring.last_avail_idx; in vdpasim_queue_ready()
98 (uintptr_t)vq->desc_addr; in vdpasim_queue_ready()
100 (uintptr_t)vq->driver_addr; in vdpasim_queue_ready()
102 (uintptr_t)vq->device_addr; in vdpasim_queue_ready()
105 vringh_init_iotlb_va(&vq->vring, vdpasim->features, vq->num, in vdpasim_queue_ready()
108 vringh_init_iotlb(&vq->vring, vdpasim->features, vq->num, in vdpasim_queue_ready()
[all …]
/linux-6.12.1/drivers/vdpa/vdpa_user/ !
Dvduse_dev.c253 struct vduse_virtqueue *vq, in vduse_dev_get_vq_state_packed() argument
260 msg.req.vq_state.index = vq->index; in vduse_dev_get_vq_state_packed()
279 struct vduse_virtqueue *vq, in vduse_dev_get_vq_state_split() argument
286 msg.req.vq_state.index = vq->index; in vduse_dev_get_vq_state_split()
450 struct vduse_virtqueue *vq = dev->vqs[i]; in vduse_dev_reset() local
452 vq->ready = false; in vduse_dev_reset()
453 vq->desc_addr = 0; in vduse_dev_reset()
454 vq->driver_addr = 0; in vduse_dev_reset()
455 vq->device_addr = 0; in vduse_dev_reset()
456 vq->num = 0; in vduse_dev_reset()
[all …]
/linux-6.12.1/net/vmw_vsock/ !
Dvirtio_transport.c98 static int virtio_transport_send_skb(struct sk_buff *skb, struct virtqueue *vq, in virtio_transport_send_skb() argument
143 ret = virtqueue_add_sgs(vq, sgs, out_sg, in_sg, skb, gfp); in virtio_transport_send_skb()
159 struct virtqueue *vq; in virtio_transport_send_pkt_work() local
168 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_pkt_work()
181 ret = virtio_transport_send_skb(skb, vq, vsock, GFP_KERNEL); in virtio_transport_send_pkt_work()
202 virtqueue_kick(vq); in virtio_transport_send_pkt_work()
216 struct virtqueue *vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_skb_fast_path() local
224 ret = virtio_transport_send_skb(skb, vq, vsock, GFP_ATOMIC); in virtio_transport_send_skb_fast_path()
226 virtqueue_kick(vq); in virtio_transport_send_skb_fast_path()
312 struct virtqueue *vq; in virtio_vsock_rx_fill() local
[all …]
/linux-6.12.1/tools/testing/selftests/arm64/fp/ !
Dsve-ptrace.c335 unsigned int vq = sve_vq_from_vl(vl); in ptrace_set_sve_get_sve_data() local
340 data_size = SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE); in ptrace_set_sve_get_sve_data()
356 fill_buf(write_buf + SVE_PT_SVE_ZREG_OFFSET(vq, i), in ptrace_set_sve_get_sve_data()
357 SVE_PT_SVE_ZREG_SIZE(vq)); in ptrace_set_sve_get_sve_data()
360 fill_buf(write_buf + SVE_PT_SVE_PREG_OFFSET(vq, i), in ptrace_set_sve_get_sve_data()
361 SVE_PT_SVE_PREG_SIZE(vq)); in ptrace_set_sve_get_sve_data()
363 fill_buf(write_buf + SVE_PT_SVE_FPSR_OFFSET(vq), SVE_PT_SVE_FPSR_SIZE); in ptrace_set_sve_get_sve_data()
364 fill_buf(write_buf + SVE_PT_SVE_FPCR_OFFSET(vq), SVE_PT_SVE_FPCR_SIZE); in ptrace_set_sve_get_sve_data()
392 if (memcmp(write_buf + SVE_PT_SVE_ZREG_OFFSET(vq, i), in ptrace_set_sve_get_sve_data()
393 read_buf + SVE_PT_SVE_ZREG_OFFSET(vq, i), in ptrace_set_sve_get_sve_data()
[all …]
Dfp-ptrace.c359 int ret, vq; in check_ptrace_values_sve() local
365 vq = __sve_vq_from_vl(config->sve_vl_in); in check_ptrace_values_sve()
367 iov.iov_len = SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, SVE_PT_REGS_SVE); in check_ptrace_values_sve()
397 if (sve->size != SVE_PT_SIZE(vq, sve->flags)) { in check_ptrace_values_sve()
399 sve->size, SVE_PT_SIZE(vq, sve->flags)); in check_ptrace_values_sve()
406 iov.iov_base + SVE_PT_SVE_ZREG_OFFSET(vq, 0), in check_ptrace_values_sve()
407 z_in, SVE_PT_SVE_ZREGS_SIZE(vq))) in check_ptrace_values_sve()
411 iov.iov_base + SVE_PT_SVE_PREG_OFFSET(vq, 0), in check_ptrace_values_sve()
412 p_in, SVE_PT_SVE_PREGS_SIZE(vq))) in check_ptrace_values_sve()
416 iov.iov_base + SVE_PT_SVE_FFR_OFFSET(vq), in check_ptrace_values_sve()
[all …]
/linux-6.12.1/drivers/staging/media/sunxi/cedrus/ !
Dcedrus_video.c292 struct vb2_queue *vq; in cedrus_s_fmt_vid_cap() local
295 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in cedrus_s_fmt_vid_cap()
296 if (vb2_is_busy(vq)) in cedrus_s_fmt_vid_cap()
317 struct vb2_queue *vq; in cedrus_s_fmt_vid_out_p() local
326 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); in cedrus_s_fmt_vid_out_p()
331 vq->subsystem_flags |= in cedrus_s_fmt_vid_out_p()
335 vq->subsystem_flags &= in cedrus_s_fmt_vid_out_p()
375 struct vb2_queue *vq; in cedrus_s_fmt_vid_out() local
378 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in cedrus_s_fmt_vid_out()
384 if (vb2_is_streaming(vq) || (vb2_is_busy(vq) && in cedrus_s_fmt_vid_out()
[all …]

12345678910