/Linux-v5.15/drivers/virtio/ |
D | virtio_ring.c | 21 dev_err(&(_vq)->vq.vdev->dev, \ 22 "%s:"fmt, (_vq)->vq.name, ##args); \ 30 (_vq)->vq.name, (_vq)->in_use); \ 58 dev_err(&_vq->vq.vdev->dev, \ 59 "%s:"fmt, (_vq)->vq.name, ##args); \ 62 #define START_USE(vq) argument 63 #define END_USE(vq) argument 64 #define LAST_ADD_TIME_UPDATE(vq) argument 65 #define LAST_ADD_TIME_CHECK(vq) argument 66 #define LAST_ADD_TIME_INVALID(vq) argument [all …]
|
D | virtio_vdpa.c | 39 struct virtqueue *vq; member 107 static bool virtio_vdpa_notify(struct virtqueue *vq) in virtio_vdpa_notify() argument 109 struct vdpa_device *vdpa = vd_get_vdpa(vq->vdev); in virtio_vdpa_notify() 112 ops->kick_vq(vdpa, vq->index); in virtio_vdpa_notify() 130 return vring_interrupt(0, info->vq); in virtio_vdpa_virtqueue_cb() 135 void (*callback)(struct virtqueue *vq), in virtio_vdpa_setup_vq() argument 143 struct virtqueue *vq; in virtio_vdpa_setup_vq() local 174 vq = vring_create_virtqueue(index, num, align, vdev, in virtio_vdpa_setup_vq() 177 if (!vq) { in virtio_vdpa_setup_vq() 186 ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq)); in virtio_vdpa_setup_vq() [all …]
|
D | virtio_pci_modern.c | 187 void (*callback)(struct virtqueue *vq), in setup_vq() argument 194 struct virtqueue *vq; in setup_vq() local 214 vq = vring_create_virtqueue(index, num, in setup_vq() 218 if (!vq) in setup_vq() 222 vp_modern_set_queue_size(mdev, index, virtqueue_get_vring_size(vq)); in setup_vq() 223 vp_modern_queue_address(mdev, index, virtqueue_get_desc_addr(vq), in setup_vq() 224 virtqueue_get_avail_addr(vq), in setup_vq() 225 virtqueue_get_used_addr(vq)); in setup_vq() 227 vq->priv = (void __force *)vp_modern_map_vq_notify(mdev, index, NULL); in setup_vq() 228 if (!vq->priv) { in setup_vq() [all …]
|
/Linux-v5.15/drivers/vhost/ |
D | vhost.c | 49 #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 …]
|
D | test.c | 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() [all …]
|
D | net.c | 97 struct vhost_virtqueue *vq; member 108 struct vhost_virtqueue vq; member 228 static void vhost_net_enable_zcopy(int vq) in vhost_net_enable_zcopy() argument 230 vhost_net_zcopy_mask |= 0x1 << vq; in vhost_net_enable_zcopy() 234 vhost_net_ubuf_alloc(struct vhost_virtqueue *vq, bool zcopy) in vhost_net_ubuf_alloc() argument 245 ubufs->vq = vq; in vhost_net_ubuf_alloc() 359 struct vhost_virtqueue *vq) in vhost_zerocopy_signal_used() argument 362 container_of(vq, struct vhost_net_virtqueue, vq); in vhost_zerocopy_signal_used() 367 if (vq->heads[i].len == VHOST_DMA_FAILED_LEN) in vhost_zerocopy_signal_used() 369 if (VHOST_DMA_IS_DONE(vq->heads[i].len)) { in vhost_zerocopy_signal_used() [all …]
|
D | vhost.h | 141 struct vhost_virtqueue *vq; member 168 bool vhost_exceeds_weight(struct vhost_virtqueue *vq, int pkts, int total_len); 183 bool vhost_vq_access_ok(struct vhost_virtqueue *vq); 192 bool vhost_vq_is_setup(struct vhost_virtqueue *vq); 206 int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, 209 int vq_meta_prefetch(struct vhost_virtqueue *vq); 211 struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type); 230 #define vq_err(vq, fmt, ...) do { \ argument 232 if ((vq)->error_ctx) \ 233 eventfd_signal((vq)->error_ctx, 1);\ [all …]
|
D | vsock.c | 92 struct vhost_virtqueue *vq) in vhost_transport_do_send_pkt() argument 99 mutex_lock(&vq->mutex); in vhost_transport_do_send_pkt() 101 if (!vhost_vq_get_backend(vq)) in vhost_transport_do_send_pkt() 104 if (!vq_meta_prefetch(vq)) in vhost_transport_do_send_pkt() 108 vhost_disable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt() 122 vhost_enable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt() 131 head = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), in vhost_transport_do_send_pkt() 140 if (head == vq->num) { in vhost_transport_do_send_pkt() 148 if (unlikely(vhost_enable_notify(&vsock->dev, vq))) { in vhost_transport_do_send_pkt() 149 vhost_disable_notify(&vsock->dev, vq); in vhost_transport_do_send_pkt() [all …]
|
D | scsi.c | 166 struct vhost_virtqueue vq; member 245 struct vhost_virtqueue *vq; in vhost_scsi_init_inflight() local 249 vq = &vs->vqs[i].vq; in vhost_scsi_init_inflight() 251 mutex_lock(&vq->mutex); in vhost_scsi_init_inflight() 264 mutex_unlock(&vq->mutex); in vhost_scsi_init_inflight() 269 vhost_scsi_get_inflight(struct vhost_virtqueue *vq) in vhost_scsi_get_inflight() argument 274 svq = container_of(vq, struct vhost_scsi_virtqueue, vq); in vhost_scsi_get_inflight() 330 struct vhost_scsi_virtqueue, vq); in vhost_scsi_release_cmd_res() 433 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_allocate_evt() local 443 vq_err(vq, "Failed to allocate vhost_scsi_evt\n"); in vhost_scsi_allocate_evt() [all …]
|
/Linux-v5.15/arch/arm64/include/uapi/asm/ |
D | sve_context.h | 31 #define __sve_vl_from_vq(vq) ((vq) * __SVE_VQ_BYTES) argument 33 #define __SVE_ZREG_SIZE(vq) ((__u32)(vq) * __SVE_VQ_BYTES) argument 34 #define __SVE_PREG_SIZE(vq) ((__u32)(vq) * (__SVE_VQ_BYTES / 8)) argument 35 #define __SVE_FFR_SIZE(vq) __SVE_PREG_SIZE(vq) argument 38 #define __SVE_ZREG_OFFSET(vq, n) \ argument 39 (__SVE_ZREGS_OFFSET + __SVE_ZREG_SIZE(vq) * (n)) 40 #define __SVE_ZREGS_SIZE(vq) \ argument 41 (__SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - __SVE_ZREGS_OFFSET) 43 #define __SVE_PREGS_OFFSET(vq) \ argument 44 (__SVE_ZREGS_OFFSET + __SVE_ZREGS_SIZE(vq)) [all …]
|
D | ptrace.h | 169 #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 …]
|
D | sigcontext.h | 165 #define sve_vl_from_vq(vq) __sve_vl_from_vq(vq) argument 223 #define SVE_SIG_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) argument 224 #define SVE_SIG_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) argument 225 #define SVE_SIG_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) argument 233 #define SVE_SIG_ZREG_OFFSET(vq, n) \ argument 234 (SVE_SIG_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) 235 #define SVE_SIG_ZREGS_SIZE(vq) __SVE_ZREGS_SIZE(vq) argument 237 #define SVE_SIG_PREGS_OFFSET(vq) \ argument 238 (SVE_SIG_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) 239 #define SVE_SIG_PREG_OFFSET(vq, n) \ argument [all …]
|
/Linux-v5.15/include/linux/ |
D | virtio.h | 29 void (*callback)(struct virtqueue *vq); 37 int virtqueue_add_outbuf(struct virtqueue *vq, 42 int virtqueue_add_inbuf(struct virtqueue *vq, 47 int virtqueue_add_inbuf_ctx(struct virtqueue *vq, 53 int virtqueue_add_sgs(struct virtqueue *vq, 60 bool virtqueue_kick(struct virtqueue *vq); 62 bool virtqueue_kick_prepare(struct virtqueue *vq); 64 bool virtqueue_notify(struct virtqueue *vq); 66 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len); 68 void *virtqueue_get_buf_ctx(struct virtqueue *vq, unsigned int *len, [all …]
|
/Linux-v5.15/drivers/vdpa/vdpa_sim/ |
D | vdpa_sim_blk.c | 62 struct vdpasim_virtqueue *vq) in vdpasim_blk_handle_req() argument 73 ret = vringh_getdesc_iotlb(&vq->vring, &vq->out_iov, &vq->in_iov, in vdpasim_blk_handle_req() 74 &vq->head, GFP_ATOMIC); in vdpasim_blk_handle_req() 78 if (vq->out_iov.used < 1 || vq->in_iov.used < 1) { in vdpasim_blk_handle_req() 80 vq->out_iov.used, vq->in_iov.used); in vdpasim_blk_handle_req() 84 if (vq->in_iov.iov[vq->in_iov.used - 1].iov_len < 1) { in vdpasim_blk_handle_req() 92 to_push = vringh_kiov_length(&vq->in_iov) - 1; in vdpasim_blk_handle_req() 94 to_pull = vringh_kiov_length(&vq->out_iov); in vdpasim_blk_handle_req() 96 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &hdr, in vdpasim_blk_handle_req() 120 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req() [all …]
|
D | vdpa_sim.c | 56 struct vdpasim_virtqueue *vq = in vdpasim_vq_notify() local 59 if (!vq->cb) in vdpasim_vq_notify() 62 vq->cb(vq->private); in vdpasim_vq_notify() 67 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready() local 69 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_queue_ready() 71 (struct vring_desc *)(uintptr_t)vq->desc_addr, in vdpasim_queue_ready() 73 (uintptr_t)vq->driver_addr, in vdpasim_queue_ready() 75 (uintptr_t)vq->device_addr); in vdpasim_queue_ready() 77 vq->vring.notify = vdpasim_vq_notify; in vdpasim_queue_ready() 81 struct vdpasim_virtqueue *vq) in vdpasim_vq_reset() argument [all …]
|
/Linux-v5.15/tools/virtio/linux/ |
D | virtio.h | 21 void (*callback)(struct virtqueue *vq); 30 int virtqueue_add_sgs(struct virtqueue *vq, 37 int virtqueue_add_outbuf(struct virtqueue *vq, 42 int virtqueue_add_inbuf(struct virtqueue *vq, 47 bool virtqueue_kick(struct virtqueue *vq); 49 void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len); 51 void virtqueue_disable_cb(struct virtqueue *vq); 53 bool virtqueue_enable_cb(struct virtqueue *vq); 54 bool virtqueue_enable_cb_delayed(struct virtqueue *vq); 56 void *virtqueue_detach_unused_buf(struct virtqueue *vq); [all …]
|
/Linux-v5.15/drivers/gpu/drm/virtio/ |
D | virtgpu_trace.h | 12 TP_PROTO(struct virtqueue *vq, struct virtio_gpu_ctrl_hdr *hdr), 13 TP_ARGS(vq, hdr), 16 __field(unsigned int, vq) 24 __entry->dev = vq->vdev->index; 25 __entry->vq = vq->index; 26 __entry->name = vq->name; 33 __entry->dev, __entry->vq, __entry->name, 39 TP_PROTO(struct virtqueue *vq, struct virtio_gpu_ctrl_hdr *hdr), 40 TP_ARGS(vq, hdr) 44 TP_PROTO(struct virtqueue *vq, struct virtio_gpu_ctrl_hdr *hdr), [all …]
|
/Linux-v5.15/drivers/vdpa/vdpa_user/ |
D | vduse_dev.c | 229 struct vduse_virtqueue *vq, in vduse_dev_get_vq_state_packed() argument 236 msg.req.vq_state.index = vq->index; in vduse_dev_get_vq_state_packed() 255 struct vduse_virtqueue *vq, in vduse_dev_get_vq_state_split() argument 262 msg.req.vq_state.index = vq->index; in vduse_dev_get_vq_state_split() 426 struct vduse_virtqueue *vq = &dev->vqs[i]; in vduse_dev_reset() local 428 vq->ready = false; in vduse_dev_reset() 429 vq->desc_addr = 0; in vduse_dev_reset() 430 vq->driver_addr = 0; in vduse_dev_reset() 431 vq->device_addr = 0; in vduse_dev_reset() 432 vq->num = 0; in vduse_dev_reset() [all …]
|
/Linux-v5.15/tools/virtio/ |
D | virtio_test.c | 35 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, info->vring, vdev, true, in vq_reset() 107 assert(info->vq); in vq_reset() 108 info->vq->priv = info; in vq_reset() 168 static void run_test(struct vdev_info *dev, struct vq_info *vq, in run_test() argument [all …]
|
/Linux-v5.15/net/vmw_vsock/ |
D | virtio_transport.c | 91 struct virtqueue *vq; in virtio_transport_send_pkt_work() local 100 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_pkt_work() 130 ret = virtqueue_add_sgs(vq, sgs, out_sg, in_sg, pkt, GFP_KERNEL); in virtio_transport_send_pkt_work() 156 virtqueue_kick(vq); in virtio_transport_send_pkt_work() 251 struct virtqueue *vq; in virtio_vsock_rx_fill() local 254 vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_vsock_rx_fill() 275 ret = virtqueue_add_sgs(vq, sgs, 0, 2, pkt, GFP_KERNEL); in virtio_vsock_rx_fill() 281 } while (vq->num_free); in virtio_vsock_rx_fill() 284 virtqueue_kick(vq); in virtio_vsock_rx_fill() 291 struct virtqueue *vq; in virtio_transport_tx_work() local [all …]
|
/Linux-v5.15/tools/testing/selftests/arm64/fp/ |
D | sve-probe-vls.c | 20 unsigned int vq; in main() local 34 for (vq = SVE_VQ_MAX; vq > 0; --vq) { in main() 35 vl = prctl(PR_SVE_SET_VL, vq * 16); in main() 48 vq = sve_vq_from_vl(vl); in main() 53 vqs[nvqs++] = vq; in main()
|
/Linux-v5.15/arch/um/drivers/ |
D | virtio_uml.c | 358 struct virtqueue *vq; in vu_req_read_message() local 379 virtio_device_for_each_vq((&vu_dev->vdev), vq) { in vu_req_read_message() 380 if (vq->index == msg.msg.payload.vring_state.index) { in vu_req_read_message() 382 vu_dev->vq_irq_vq_map |= BIT_ULL(vq->index); in vu_req_read_message() 414 struct virtqueue *vq; in vu_req_interrupt() local 416 virtio_device_for_each_vq((&vu_dev->vdev), vq) { in vu_req_interrupt() 417 if (vu_dev->vq_irq_vq_map & BIT_ULL(vq->index)) in vu_req_interrupt() 418 vring_interrupt(0 /* ignored */, vq); in vu_req_interrupt() 758 static bool vu_notify(struct virtqueue *vq) in vu_notify() argument 760 struct virtio_uml_vq_info *info = vq->priv; in vu_notify() [all …]
|
/Linux-v5.15/drivers/staging/media/sunxi/cedrus/ |
D | cedrus_video.c | 288 struct vb2_queue *vq; in cedrus_s_fmt_vid_cap() local 291 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in cedrus_s_fmt_vid_cap() 292 if (vb2_is_busy(vq)) in cedrus_s_fmt_vid_cap() 308 struct vb2_queue *vq; in cedrus_s_fmt_vid_out() local 316 vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, f->type); in cedrus_s_fmt_vid_out() 322 if (vb2_is_streaming(vq) || (vb2_is_busy(vq) && in cedrus_s_fmt_vid_out() 344 vq->subsystem_flags |= in cedrus_s_fmt_vid_out() 348 vq->subsystem_flags &= in cedrus_s_fmt_vid_out() 396 static int cedrus_queue_setup(struct vb2_queue *vq, unsigned int *nbufs, in cedrus_queue_setup() argument 400 struct cedrus_ctx *ctx = vb2_get_drv_priv(vq); in cedrus_queue_setup() [all …]
|
/Linux-v5.15/drivers/i2c/busses/ |
D | i2c-virtio.c | 33 struct virtqueue *vq; member 48 static void virtio_i2c_msg_done(struct virtqueue *vq) in virtio_i2c_msg_done() argument 50 struct virtio_i2c *vi = vq->vdev->priv; in virtio_i2c_msg_done() 55 static int virtio_i2c_prepare_reqs(struct virtqueue *vq, in virtio_i2c_prepare_reqs() argument 98 if (virtqueue_add_sgs(vq, sgs, outcnt, incnt, &reqs[i], GFP_KERNEL)) { in virtio_i2c_prepare_reqs() 107 static int virtio_i2c_complete_reqs(struct virtqueue *vq, in virtio_i2c_complete_reqs() argument 119 req = virtqueue_get_buf(vq, &len); in virtio_i2c_complete_reqs() 142 struct virtqueue *vq = vi->vq; in virtio_i2c_xfer() local 151 count = virtio_i2c_prepare_reqs(vq, reqs, msgs, num); in virtio_i2c_xfer() 165 virtqueue_kick(vq); in virtio_i2c_xfer() [all …]
|
/Linux-v5.15/drivers/remoteproc/ |
D | remoteproc_virtio.c | 27 static bool rproc_virtio_notify(struct virtqueue *vq) in rproc_virtio_notify() argument 29 struct rproc_vring *rvring = vq->priv; in rproc_virtio_notify() 58 if (!rvring || !rvring->vq) in rproc_vq_interrupt() 61 return vring_interrupt(0, rvring->vq); in rproc_vq_interrupt() 67 void (*callback)(struct virtqueue *vq), in rp_find_vq() argument 76 struct virtqueue *vq; in rp_find_vq() local 108 vq = vring_new_virtqueue(id, len, rvring->align, vdev, false, ctx, in rp_find_vq() 110 if (!vq) { in rp_find_vq() 116 rvring->vq = vq; in rp_find_vq() 117 vq->priv = rvring; in rp_find_vq() [all …]
|