/linux-6.6.21/drivers/vdpa/solidrun/ |
D | snet_main.c | 77 if (snet->vqs[i] && snet->vqs[i]->irq != -1) { in snet_free_irqs() 78 devm_free_irq(&pdev->dev, snet->vqs[i]->irq, snet->vqs[i]); in snet_free_irqs() 79 snet->vqs[i]->irq = -1; in snet_free_irqs() 91 snet->vqs[idx]->desc_area = desc_area; in snet_set_vq_address() 92 snet->vqs[idx]->driver_area = driver_area; in snet_set_vq_address() 93 snet->vqs[idx]->device_area = device_area; in snet_set_vq_address() 102 snet->vqs[idx]->num = num; in snet_set_vq_num() 109 if (unlikely(!snet->vqs[idx]->ready)) in snet_kick_vq() 112 iowrite32(SNET_KICK_VAL, snet->vqs[idx]->kick_ptr); in snet_kick_vq() 121 if (unlikely(!snet->vqs[idx]->ready)) in snet_kick_vq_with_data() [all …]
|
/linux-6.6.21/drivers/vdpa/pds/ |
D | vdpa_dev.c | 77 pdsv->vqs[qid].desc_addr = desc_addr; in pds_vdpa_set_vq_address() 78 pdsv->vqs[qid].avail_addr = driver_addr; in pds_vdpa_set_vq_address() 79 pdsv->vqs[qid].used_addr = device_addr; in pds_vdpa_set_vq_address() 88 pdsv->vqs[qid].q_len = num; in pds_vdpa_set_vq_num() 95 iowrite16(qid, pdsv->vqs[qid].notify); in pds_vdpa_kick_vq() 103 pdsv->vqs[qid].event_cb = *cb; in pds_vdpa_set_vq_cb() 119 if (pdsv->vqs[qid].irq == VIRTIO_MSI_NO_VECTOR) in pds_vdpa_release_irq() 122 free_irq(pdsv->vqs[qid].irq, &pdsv->vqs[qid]); in pds_vdpa_release_irq() 123 pdsv->vqs[qid].irq = VIRTIO_MSI_NO_VECTOR; in pds_vdpa_release_irq() 135 __func__, qid, pdsv->vqs[qid].ready, ready); in pds_vdpa_set_vq_ready() [all …]
|
/linux-6.6.21/drivers/virtio/ |
D | virtio_pci_common.c | 203 vp_dev->vqs[index] = info; in vp_setup_vq() 214 struct virtio_pci_vq_info *info = vp_dev->vqs[vq->index]; in vp_del_vq() 238 list_for_each_entry_safe(vq, n, &vdev->vqs, list) { in vp_del_vqs() 240 int v = vp_dev->vqs[vq->index]->msix_vector; in vp_del_vqs() 280 kfree(vp_dev->vqs); in vp_del_vqs() 281 vp_dev->vqs = NULL; in vp_del_vqs() 285 struct virtqueue *vqs[], vq_callback_t *callbacks[], in vp_find_vqs_msix() argument 294 vp_dev->vqs = kcalloc(nvqs, sizeof(*vp_dev->vqs), GFP_KERNEL); in vp_find_vqs_msix() 295 if (!vp_dev->vqs) in vp_find_vqs_msix() 318 vqs[i] = NULL; in vp_find_vqs_msix() [all …]
|
D | virtio_pci_common.h | 62 struct virtio_pci_vq_info **vqs; member 113 struct virtqueue *vqs[], vq_callback_t *callbacks[],
|
D | virtio_vdpa.c | 292 list_for_each_entry_safe(vq, n, &vdev->vqs, list) in virtio_vdpa_del_vqs() 357 struct virtqueue *vqs[], in virtio_vdpa_find_vqs() argument 380 vqs[i] = NULL; in virtio_vdpa_find_vqs() 384 vqs[i] = virtio_vdpa_setup_vq(vdev, queue_idx++, in virtio_vdpa_find_vqs() 387 if (IS_ERR(vqs[i])) { in virtio_vdpa_find_vqs() 388 err = PTR_ERR(vqs[i]); in virtio_vdpa_find_vqs()
|
/linux-6.6.21/drivers/vhost/ |
D | test.c | 38 struct vhost_virtqueue vqs[VHOST_TEST_VQ_MAX]; member 45 struct vhost_virtqueue *vq = &n->vqs[VHOST_TEST_VQ]; in handle_vq() 109 struct vhost_virtqueue **vqs; in vhost_test_open() local 113 vqs = kmalloc_array(VHOST_TEST_VQ_MAX, sizeof(*vqs), GFP_KERNEL); in vhost_test_open() 114 if (!vqs) { in vhost_test_open() 120 vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ]; in vhost_test_open() 121 n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick; in vhost_test_open() 122 vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX, UIO_MAXIOV, in vhost_test_open() 144 *privatep = vhost_test_stop_vq(n, n->vqs + VHOST_TEST_VQ); in vhost_test_stop() 161 kfree(n->dev.vqs); in vhost_test_release() [all …]
|
D | net.c | 134 struct vhost_net_virtqueue vqs[VHOST_NET_VQ_MAX]; member 275 kfree(n->vqs[i].ubuf_info); in vhost_net_clear_ubuf_info() 276 n->vqs[i].ubuf_info = NULL; in vhost_net_clear_ubuf_info() 289 n->vqs[i].ubuf_info = in vhost_net_set_ubuf_info() 291 sizeof(*n->vqs[i].ubuf_info), in vhost_net_set_ubuf_info() 293 if (!n->vqs[i].ubuf_info) in vhost_net_set_ubuf_info() 310 n->vqs[i].done_idx = 0; in vhost_net_vq_reset() 311 n->vqs[i].upend_idx = 0; in vhost_net_vq_reset() 312 n->vqs[i].ubufs = NULL; in vhost_net_vq_reset() 313 n->vqs[i].vhost_hlen = 0; in vhost_net_vq_reset() [all …]
|
D | vsock.c | 48 struct vhost_virtqueue vqs[2]; member 93 struct vhost_virtqueue *tx_vq = &vsock->vqs[VSOCK_VQ_TX]; in vhost_transport_do_send_pkt() 262 vq = &vsock->vqs[VSOCK_VQ_RX]; in vhost_transport_send_pkt_work() 288 vhost_vq_work_queue(&vsock->vqs[VSOCK_VQ_RX], &vsock->send_pkt_work); in vhost_transport_send_pkt() 311 struct vhost_virtqueue *tx_vq = &vsock->vqs[VSOCK_VQ_TX]; in vhost_transport_cancel_pkt() 388 struct vhost_virtqueue *vq = &vsock->vqs[VSOCK_VQ_TX]; in vhost_vsock_more_replies() 564 for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++) { in vhost_vsock_start() 565 vq = &vsock->vqs[i]; in vhost_vsock_start() 587 vhost_vq_work_queue(&vsock->vqs[VSOCK_VQ_RX], &vsock->send_pkt_work); in vhost_vsock_start() 596 for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++) { in vhost_vsock_start() [all …]
|
D | scsi.c | 201 struct vhost_scsi_virtqueue *vqs; member 260 vq = &vs->vqs[i].vq; in vhost_scsi_init_inflight() 265 idx = vs->vqs[i].inflight_idx; in vhost_scsi_init_inflight() 267 old_inflight[i] = &vs->vqs[i].inflights[idx]; in vhost_scsi_init_inflight() 270 vs->vqs[i].inflight_idx = idx ^ 1; in vhost_scsi_init_inflight() 271 new_inflight = &vs->vqs[i].inflights[idx ^ 1]; in vhost_scsi_init_inflight() 423 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_allocate_evt() 453 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_do_evt_work() 504 struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT].vq; in vhost_scsi_evt_work() 1281 ctl_vq = &tmf->vhost->vqs[VHOST_SCSI_VQ_CTL].vq; in vhost_scsi_tmf_resp_work() [all …]
|
D | vhost.c | 348 __vhost_vq_meta_reset(d->vqs[i]); in vhost_vq_meta_reset() 437 vq = dev->vqs[i]; in vhost_dev_alloc_iovecs() 452 vhost_vq_free_iovecs(dev->vqs[i]); in vhost_dev_alloc_iovecs() 461 vhost_vq_free_iovecs(dev->vqs[i]); in vhost_dev_free_iovecs() 504 struct vhost_virtqueue **vqs, int nvqs, in vhost_dev_init() argument 513 dev->vqs = vqs; in vhost_dev_init() 532 vq = dev->vqs[i]; in vhost_dev_init() 612 rcu_assign_pointer(dev->vqs[i]->worker, NULL); in vhost_workers_free() 783 *vq = dev->vqs[idx]; in vhost_get_vq_from_user() 896 __vhost_vq_attach_worker(dev->vqs[i], worker); in vhost_dev_set_owner() [all …]
|
D | vdpa.c | 48 struct vhost_virtqueue *vqs; member 155 ops->kick_vq(v->vdpa, vq - v->vqs); in handle_vq_kick() 182 struct vhost_virtqueue *vq = &v->vqs[qid]; in vhost_vdpa_setup_vq_irq() 208 struct vhost_virtqueue *vq = &v->vqs[qid]; in vhost_vdpa_unsetup_vq_irq() 442 struct vhost_virtqueue *vq = d->vqs[i]; in vhost_vdpa_set_features() 590 vq = &v->vqs[idx]; in vhost_vdpa_vring_ioctl() 1287 kfree(v->vdev.vqs); in vhost_vdpa_cleanup() 1294 struct vhost_virtqueue **vqs; in vhost_vdpa_open() local 1309 vqs = kmalloc_array(nvqs, sizeof(*vqs), GFP_KERNEL); in vhost_vdpa_open() 1310 if (!vqs) { in vhost_vdpa_open() [all …]
|
/linux-6.6.21/drivers/bluetooth/ |
D | virtio_bt.c | 24 struct virtqueue *vqs[VIRTBT_NUM_VQS]; member 31 struct virtqueue *vq = vbt->vqs[VIRTBT_VQ_RX]; in virtbt_add_inbuf() 61 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_open_vdev() 76 for (i = 0; i < ARRAY_SIZE(vbt->vqs); i++) { in virtbt_close_vdev() 77 struct virtqueue *vq = vbt->vqs[i]; in virtbt_close_vdev() 102 err = virtqueue_add_outbuf(vbt->vqs[VIRTBT_VQ_TX], sg, 1, skb, in virtbt_send_frame() 109 virtqueue_kick(vbt->vqs[VIRTBT_VQ_TX]); in virtbt_send_frame() 226 skb = virtqueue_get_buf(vbt->vqs[VIRTBT_VQ_RX], &len); in virtbt_rx_work() 236 virtqueue_kick(vbt->vqs[VIRTBT_VQ_RX]); in virtbt_rx_work() 292 err = virtio_find_vqs(vdev, VIRTBT_NUM_VQS, vbt->vqs, callbacks, in virtbt_probe()
|
/linux-6.6.21/drivers/block/ |
D | virtio_blk.c | 83 struct virtio_blk_vq *vqs; member 135 struct virtio_blk_vq *vq = &vblk->vqs[hctx->queue_num]; in get_virtio_blk_vq() 360 spin_lock_irqsave(&vblk->vqs[qid].lock, flags); in virtblk_done() 363 while ((vbr = virtqueue_get_buf(vblk->vqs[qid].vq, &len)) != NULL) { in virtblk_done() 377 spin_unlock_irqrestore(&vblk->vqs[qid].lock, flags); in virtblk_done() 383 struct virtio_blk_vq *vq = &vblk->vqs[hctx->queue_num]; in virtio_commit_rqs() 445 spin_lock_irqsave(&vblk->vqs[qid].lock, flags); in virtio_queue_rq() 446 err = virtblk_add_req(vblk->vqs[qid].vq, vbr); in virtio_queue_rq() 448 virtqueue_kick(vblk->vqs[qid].vq); in virtio_queue_rq() 454 spin_unlock_irqrestore(&vblk->vqs[qid].lock, flags); in virtio_queue_rq() [all …]
|
/linux-6.6.21/net/vmw_vsock/ |
D | virtio_transport.c | 31 struct virtqueue *vqs[VSOCK_VQ_MAX]; member 100 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_send_pkt_work() 132 struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_send_pkt_work() 205 struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_cancel_pkt() 229 vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_vsock_rx_fill() 259 vq = vsock->vqs[VSOCK_VQ_TX]; in virtio_transport_tx_work() 286 struct virtqueue *vq = vsock->vqs[VSOCK_VQ_RX]; in virtio_transport_more_replies() 302 vq = vsock->vqs[VSOCK_VQ_EVENT]; in virtio_vsock_event_fill_one() 320 virtqueue_kick(vsock->vqs[VSOCK_VQ_EVENT]); in virtio_vsock_event_fill() 364 vq = vsock->vqs[VSOCK_VQ_EVENT]; in virtio_transport_event_work() [all …]
|
/linux-6.6.21/fs/fuse/ |
D | virtio_fs.c | 61 struct virtio_fs_vq *vqs; member 146 return &fs->vqs[vq->index]; in vq_to_fsvq() 168 kfree(vfs->vqs); in release_virtio_fs_obj() 214 fsvq = &fs->vqs[i]; in virtio_fs_drain_all_queues_locked() 238 fsvq = &fs->vqs[i]; in virtio_fs_start_all_queues() 295 struct virtio_fs_vq *fsvq = &fs->vqs[i]; in virtio_fs_free_devs() 686 struct virtqueue **vqs; in virtio_fs_setup_vqs() local 698 fs->vqs = kcalloc(fs->nvqs, sizeof(fs->vqs[VQ_HIPRIO]), GFP_KERNEL); in virtio_fs_setup_vqs() 699 if (!fs->vqs) in virtio_fs_setup_vqs() 702 vqs = kmalloc_array(fs->nvqs, sizeof(vqs[VQ_HIPRIO]), GFP_KERNEL); in virtio_fs_setup_vqs() [all …]
|
/linux-6.6.21/drivers/vdpa/vdpa_user/ |
D | vduse_dev.c | 87 struct vduse_virtqueue **vqs; member 448 struct vduse_virtqueue *vq = dev->vqs[i]; in vduse_dev_reset() 481 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_address() 515 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_kick_vq() 528 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_cb() 540 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_num() 549 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_ready() 557 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_get_vq_ready() 566 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_set_vq_state() 585 struct vduse_virtqueue *vq = dev->vqs[idx]; in vduse_vdpa_get_vq_state() [all …]
|
/linux-6.6.21/drivers/vdpa/vdpa_sim/ |
D | vdpa_sim.c | 95 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_queue_ready() 149 vdpasim_vq_reset(vdpasim, &vdpasim->vqs[i]); in vdpasim_do_reset() 150 vringh_set_iotlb(&vdpasim->vqs[i].vring, &vdpasim->iommu[0], in vdpasim_do_reset() 247 vdpasim->vqs = kcalloc(dev_attr->nvqs, sizeof(struct vdpasim_virtqueue), in vdpasim_create() 249 if (!vdpasim->vqs) in vdpasim_create() 266 vringh_set_iotlb(&vdpasim->vqs[i].vring, &vdpasim->iommu[0], in vdpasim_create() 291 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_set_vq_address() 303 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_set_vq_num() 311 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_kick_vq() 327 struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; in vdpasim_set_vq_cb() [all …]
|
/linux-6.6.21/tools/testing/selftests/arm64/fp/ |
D | sve-probe-vls.c | 22 static unsigned int vqs[SVE_VQ_MAX]; in main() local 53 vqs[nvqs++] = vq; in main() 60 ksft_print_msg("%u\n", 16 * vqs[nvqs]); in main()
|
/linux-6.6.21/drivers/crypto/virtio/ |
D | virtio_crypto_core.c | 102 struct virtqueue **vqs; in virtcrypto_find_vqs() local 116 vqs = kcalloc(total_vqs, sizeof(*vqs), GFP_KERNEL); in virtcrypto_find_vqs() 117 if (!vqs) in virtcrypto_find_vqs() 138 ret = virtio_find_vqs(vi->vdev, total_vqs, vqs, callbacks, names, NULL); in virtcrypto_find_vqs() 142 vi->ctrl_vq = vqs[total_vqs - 1]; in virtcrypto_find_vqs() 146 vi->data_vq[i].vq = vqs[i]; in virtcrypto_find_vqs() 149 virtqueue_get_vring_size(vqs[i])); in virtcrypto_find_vqs() 160 kfree(vqs); in virtcrypto_find_vqs() 170 kfree(vqs); in virtcrypto_find_vqs()
|
/linux-6.6.21/sound/virtio/ |
D | virtio_card.c | 124 struct virtqueue *vqs[VIRTIO_SND_VQ_MAX] = { 0 }; in virtsnd_find_vqs() local 129 rc = virtio_find_vqs(vdev, VIRTIO_SND_VQ_MAX, vqs, callbacks, names, in virtsnd_find_vqs() 137 snd->queues[i].vqueue = vqs[i]; in virtsnd_find_vqs() 140 virtqueue_disable_cb(vqs[VIRTIO_SND_VQ_EVENT]); in virtsnd_find_vqs() 142 n = virtqueue_get_vring_size(vqs[VIRTIO_SND_VQ_EVENT]); in virtsnd_find_vqs() 150 virtsnd_event_send(vqs[VIRTIO_SND_VQ_EVENT], in virtsnd_find_vqs()
|
/linux-6.6.21/arch/arm64/kvm/ |
D | guest.c | 310 #define vq_present(vqs, vq) (!!((vqs)[vq_word(vq)] & vq_mask(vq))) argument 315 u64 vqs[KVM_ARM64_SVE_VLS_WORDS]; in get_sve_vls() local 323 memset(vqs, 0, sizeof(vqs)); in get_sve_vls() 328 vqs[vq_word(vq)] |= vq_mask(vq); in get_sve_vls() 330 if (copy_to_user((void __user *)reg->addr, vqs, sizeof(vqs))) in get_sve_vls() 339 u64 vqs[KVM_ARM64_SVE_VLS_WORDS]; in set_sve_vls() local 350 if (copy_from_user(vqs, (const void __user *)reg->addr, sizeof(vqs))) in set_sve_vls() 355 if (vq_present(vqs, vq)) in set_sve_vls() 369 if (vq_present(vqs, vq) != sve_vq_available(vq)) in set_sve_vls()
|
/linux-6.6.21/drivers/gpio/ |
D | gpio-virtio.c | 465 struct virtqueue *vqs[2] = { NULL, NULL }; in virtio_gpio_alloc_vqs() local 468 ret = virtio_find_vqs(vdev, vgpio->irq_lines ? 2 : 1, vqs, cbs, names, NULL); in virtio_gpio_alloc_vqs() 474 if (!vqs[0]) { in virtio_gpio_alloc_vqs() 478 vgpio->request_vq = vqs[0]; in virtio_gpio_alloc_vqs() 480 if (vgpio->irq_lines && !vqs[1]) { in virtio_gpio_alloc_vqs() 484 vgpio->event_vq = vqs[1]; in virtio_gpio_alloc_vqs() 489 if (vqs[0] || vqs[1]) in virtio_gpio_alloc_vqs()
|
/linux-6.6.21/drivers/remoteproc/ |
D | remoteproc_virtio.c | 171 list_for_each_entry_safe(vq, n, &vdev->vqs, list) { in __rproc_virtio_del_vqs() 184 struct virtqueue *vqs[], in rproc_virtio_find_vqs() argument 194 vqs[i] = NULL; in rproc_virtio_find_vqs() 198 vqs[i] = rp_find_vq(vdev, queue_idx++, callbacks[i], names[i], in rproc_virtio_find_vqs() 200 if (IS_ERR(vqs[i])) { in rproc_virtio_find_vqs() 201 ret = PTR_ERR(vqs[i]); in rproc_virtio_find_vqs()
|
/linux-6.6.21/drivers/gpu/drm/virtio/ |
D | virtgpu_kms.c | 126 struct virtqueue *vqs[2]; in virtio_gpu_init() local 210 ret = virtio_find_vqs(vgdev->vdev, 2, vqs, callbacks, names, NULL); in virtio_gpu_init() 215 vgdev->ctrlq.vq = vqs[0]; in virtio_gpu_init() 216 vgdev->cursorq.vq = vqs[1]; in virtio_gpu_init()
|
/linux-6.6.21/include/linux/ |
D | virtio_config.h | 107 struct virtqueue *vqs[], vq_callback_t *callbacks[], 225 struct virtqueue *vqs[], vq_callback_t *callbacks[], in virtio_find_vqs() argument 229 return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, NULL, desc); in virtio_find_vqs() 234 struct virtqueue *vqs[], vq_callback_t *callbacks[], in virtio_find_vqs_ctx() argument 238 return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, ctx, in virtio_find_vqs_ctx()
|