/openbmc/linux/drivers/platform/mellanox/ |
H A D | mlxbf-tmfifo.c | 26 /* Vring size. */ 71 * @num: vring size (number of descriptors) 72 * @align: vring alignment size 73 * @index: vring index 74 * @vdev_id: vring virtio id (VIRTIO_ID_xxx) 98 /* Check whether vring is in drop mode. */ 186 * @vring: Tx/Rx ring 203 struct mlxbf_tmfifo_vring *vring[2]; member 249 struct mlxbf_tmfifo_vring *vring; in mlxbf_tmfifo_free_vrings() local 253 vring = &tm_vdev->vrings[i]; in mlxbf_tmfifo_free_vrings() [all …]
|
/openbmc/u-boot/drivers/virtio/ |
H A D | virtio_ring.c | 28 desc = vq->vring.desc; in virtqueue_add() 80 avail = vq->avail_idx_shadow & (vq->vring.num - 1); in virtqueue_add() 81 vq->vring.avail->ring[avail] = cpu_to_virtio16(vq->vdev, head); in virtqueue_add() 89 vq->vring.avail->idx = cpu_to_virtio16(vq->vdev, vq->avail_idx_shadow); in virtqueue_add() 119 vring_avail_event(&vq->vring)), new, old); in virtqueue_kick_prepare() 121 needs_kick = !(vq->vring.used->flags & cpu_to_virtio16(vq->vdev, in virtqueue_kick_prepare() 142 while (vq->vring.desc[i].flags & nextflag) { in detach_buf() 143 i = virtio16_to_cpu(vq->vdev, vq->vring.desc[i].next); in detach_buf() 147 vq->vring.desc[i].next = cpu_to_virtio16(vq->vdev, vq->free_head); in detach_buf() 157 vq->vring.used->idx); in more_used() [all …]
|
/openbmc/linux/drivers/net/wireless/ath/wil6210/ |
H A D | txrx.c | 71 struct wil_ring *vring = &wil->ring_tx[i]; in wil_is_tx_idle() local 72 int vring_index = vring - wil->ring_tx; in wil_is_tx_idle() 78 if (!vring->va || !txdata->enabled) { in wil_is_tx_idle() 86 while (!wil_ring_is_empty(vring)) { in wil_is_tx_idle() 94 "tx vring is not empty -> NAPI\n"); in wil_is_tx_idle() 99 if (!vring->va || !txdata->enabled) in wil_is_tx_idle() 110 static int wil_vring_alloc(struct wil6210_priv *wil, struct wil_ring *vring) in wil_vring_alloc() argument 113 size_t sz = vring->size * sizeof(vring->va[0]); in wil_vring_alloc() 118 BUILD_BUG_ON(sizeof(vring->va[0]) != 32); in wil_vring_alloc() 120 vring->swhead = 0; in wil_vring_alloc() [all …]
|
H A D | trace.h | 212 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 frags), 213 TP_ARGS(vring, index, len, frags), 215 __field(u8, vring) 221 __entry->vring = vring; 226 TP_printk("vring %d index %d len %d frags %d", 227 __entry->vring, __entry->index, __entry->len, __entry->frags) 231 TP_PROTO(u8 vring, u16 index, unsigned int len, u8 err), 232 TP_ARGS(vring, index, len, err), 234 __field(u8, vring) 240 __entry->vring = vring; [all …]
|
/openbmc/qemu/hw/virtio/ |
H A D | vhost-shadow-virtqueue.c | 42 /* SVQ trust that the guest vring is little endian */ in vhost_svq_valid_features() 127 * Write descriptors to SVQ vring 145 vring_desc_t *descs = svq->vring.desc; in vhost_svq_vring_write_descs() 181 vring_avail_t *avail = svq->vring.avail; in vhost_svq_add_split() 209 avail_idx = svq->shadow_avail_idx & (svq->vring.num - 1); in vhost_svq_add_split() 231 uint16_t avail_event = *(uint16_t *)(&svq->vring.used->ring[svq->vring.num]); in vhost_svq_kick() 234 needs_kick = !(svq->vring.used->flags & VRING_USED_F_NO_NOTIFY); in vhost_svq_kick() 363 uint16_t *used_idx = &svq->vring.used->idx; in vhost_svq_more_used() 380 * callbacks. True if SVQ used vring has no more pending buffers. 385 uint16_t *used_event = (uint16_t *)&svq->vring.avail->ring[svq->vring.num]; in vhost_svq_enable_notification() [all …]
|
H A D | virtio.c | 56 * The alignment to use between consumer and producer parts of vring. 104 typedef struct VRing struct 113 } VRing; argument 122 VRing vring; member 222 caches = qatomic_read(&vq->vring.caches); in virtio_virtqueue_reset_region_cache() 223 qatomic_rcu_set(&vq->vring.caches, NULL); in virtio_virtqueue_reset_region_cache() 232 VRingMemoryRegionCaches *old = vq->vring.caches; in virtio_init_region_cache() 239 addr = vq->vring.desc; in virtio_init_region_cache() 256 vq->vring.used, size, true); in virtio_init_region_cache() 264 vq->vring.avail, size, false); in virtio_init_region_cache() [all …]
|
H A D | vhost-shadow-virtqueue.h | 51 /* Shadow vring */ 52 struct vring vring; member 81 /* SVQ vring descriptors state */ 111 /* Size of SVQ vring free descriptors */
|
/openbmc/linux/drivers/vhost/ |
H A D | vringh.c | 37 /* Returns vring->num if empty, -ve on error. */ 46 err = getu16(vrh, &avail_idx, &vrh->vring.avail->idx); in __vringh_get_head() 49 &vrh->vring.avail->idx); in __vringh_get_head() 54 return vrh->vring.num; in __vringh_get_head() 59 i = *last_avail_idx & (vrh->vring.num - 1); in __vringh_get_head() 61 err = getu16(vrh, &head, &vrh->vring.avail->ring[i]); in __vringh_get_head() 64 *last_avail_idx, &vrh->vring.avail->ring[i]); in __vringh_get_head() 68 if (head >= vrh->vring.num) { in __vringh_get_head() 70 head, vrh->vring.num); in __vringh_get_head() 251 *descs = vrh->vring.desc; in return_from_indirect() [all …]
|
/openbmc/linux/drivers/virtio/ |
H A D | virtio_ring.c | 91 struct vring vring; member 112 * vring. 125 } vring; member 357 * making all of the arch DMA ops work on the vring device itself 523 struct vring_virtqueue *vring = to_vvq(vq); in virtqueue_add_desc_split() local 524 struct vring_desc_extra *extra = vring->split.desc_extra; in virtqueue_add_desc_split() 580 WARN_ON_ONCE(total_sg > vq->split.vring.num && !vq->indirect); in virtqueue_add_split() 591 desc = vq->split.vring.desc; in virtqueue_add_split() 647 vq->split.desc_extra[prev & (vq->split.vring.num - 1)].flags &= in virtqueue_add_split() 662 virtqueue_add_desc_split(_vq, vq->split.vring.desc, in virtqueue_add_split() [all …]
|
/openbmc/u-boot/include/ |
H A D | virtio_ring.h | 77 struct vring { struct 91 * @vring: actual memory layout for this queue argument 104 struct vring vring; member 114 * Alignment requirements for vring elements. 128 static inline void vring_init(struct vring *vr, unsigned int num, void *p, in vring_init() 247 * virtqueue_get_vring_size - get the size of the virtqueue's vring 249 * @vq: the struct virtqueue containing the vring of interest 250 * @return: the size of the vring in a virtqueue. 255 * virtqueue_get_desc_addr - get the vring descriptor table address 257 * @vq: the struct virtqueue containing the vring of interest [all …]
|
/openbmc/linux/drivers/vdpa/ifcvf/ |
H A D | ifcvf_main.c | 32 struct vring_info *vring = arg; in ifcvf_vq_intr_handler() local 34 if (vring->cb.callback) in ifcvf_vq_intr_handler() 35 return vring->cb.callback(vring->cb.private); in ifcvf_vq_intr_handler() 43 struct vring_info *vring; in ifcvf_vqs_reused_intr_handler() local 47 vring = &vf->vring[i]; in ifcvf_vqs_reused_intr_handler() 48 if (vring->cb.callback) in ifcvf_vqs_reused_intr_handler() 49 vring->cb.callback(vring->cb.private); in ifcvf_vqs_reused_intr_handler() 78 if (vf->vring[i].irq != -EINVAL) { in ifcvf_free_per_vq_irq() 79 devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); in ifcvf_free_per_vq_irq() 80 vf->vring[i].irq = -EINVAL; in ifcvf_free_per_vq_irq() [all …]
|
/openbmc/linux/drivers/vdpa/virtio_pci/ |
H A D | vp_vdpa.c | 37 struct vp_vring *vring; member 102 int irq = vp_vdpa->vring[idx].irq; in vp_vdpa_get_vq_irq() 117 if (vp_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) { in vp_vdpa_free_irq() 119 devm_free_irq(&pdev->dev, vp_vdpa->vring[i].irq, in vp_vdpa_free_irq() 120 &vp_vdpa->vring[i]); in vp_vdpa_free_irq() 121 vp_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR; in vp_vdpa_free_irq() 139 struct vp_vring *vring = arg; in vp_vdpa_vq_handler() local 141 if (vring->cb.callback) in vp_vdpa_vq_handler() 142 return vring->cb.callback(vring->cb.private); in vp_vdpa_vq_handler() 176 snprintf(vp_vdpa->vring[i].msix_name, VP_VDPA_NAME_SIZE, in vp_vdpa_request_irq() [all …]
|
/openbmc/linux/drivers/vdpa/alibaba/ |
H A D | eni_vdpa.c | 41 struct eni_vring *vring; member 104 int irq = eni_vdpa->vring[idx].irq; in eni_vdpa_get_vq_irq() 119 if (eni_vdpa->vring[i].irq != VIRTIO_MSI_NO_VECTOR) { in eni_vdpa_free_irq() 121 devm_free_irq(&pdev->dev, eni_vdpa->vring[i].irq, in eni_vdpa_free_irq() 122 &eni_vdpa->vring[i]); in eni_vdpa_free_irq() 123 eni_vdpa->vring[i].irq = VIRTIO_MSI_NO_VECTOR; in eni_vdpa_free_irq() 141 struct eni_vring *vring = arg; in eni_vdpa_vq_handler() local 143 if (vring->cb.callback) in eni_vdpa_vq_handler() 144 return vring->cb.callback(vring->cb.private); in eni_vdpa_vq_handler() 178 snprintf(eni_vdpa->vring[i].msix_name, ENI_MSIX_NAME_SIZE, in eni_vdpa_request_irq() [all …]
|
/openbmc/qemu/qapi/ |
H A D | virtio.json | 512 # @vring-num: VirtQueue vring.num 514 # @vring-num-default: VirtQueue vring.num_default 516 # @vring-align: VirtQueue vring.align 518 # @vring-desc: VirtQueue vring.desc (descriptor area) 520 # @vring-avail: VirtQueue vring.avail (driver area) 522 # @vring-used: VirtQueue vring.used (device area) 541 'vring-num': 'uint32', 542 'vring-num-default': 'uint32', 543 'vring-align': 'uint32', 544 'vring-desc': 'uint64', [all …]
|
/openbmc/qemu/subprojects/libvduse/ |
H A D | libvduse.c | 97 VduseRing vring; member 233 vq->used_idx = le16toh(vq->vring.used->idx); in vduse_queue_check_inflights() 426 return le16toh(vq->vring.avail->flags); in vring_avail_flags() 431 vq->shadow_avail_idx = le16toh(vq->vring.avail->idx); in vring_avail_idx() 438 return le16toh(vq->vring.avail->ring[i]); in vring_avail_ring() 443 return vring_avail_ring(vq, vq->vring.num); in vring_get_used_event() 453 *head = vring_avail_ring(vq, idx % vq->vring.num); in vduse_queue_get_head() 456 if (*head >= vq->vring.num) { in vduse_queue_get_head() 528 if (unlikely(!vq->vring.avail)) { in vduse_queue_empty() 569 if (unlikely(!vq->vring.avail)) { in vduse_queue_notify() [all …]
|
/openbmc/linux/tools/perf/pmu-events/arch/x86/ivytown/ |
H A D | uncore-io.json | 83 "BriefDescription": "R2 AD Ring in Use; Counterclockwise and Even on VRing 0", 92 "BriefDescription": "R2 AD Ring in Use; Counterclockwise and Odd on VRing 0", 101 "BriefDescription": "R2 AD Ring in Use; Counterclockwise and Even on VRing 1", 110 "BriefDescription": "R2 AD Ring in Use; Counterclockwise and Odd on VRing 1", 128 "BriefDescription": "R2 AD Ring in Use; Clockwise and Even on VRing 0", 137 "BriefDescription": "R2 AD Ring in Use; Clockwise and Odd on VRing 0", 146 "BriefDescription": "R2 AD Ring in Use; Clockwise and Even on VRing 1", 155 "BriefDescription": "R2 AD Ring in Use; Clockwise and Odd on VRing 1", 173 "BriefDescription": "R2 AK Ring in Use; Counterclockwise and Even on VRing 0", 182 "BriefDescription": "R2 AK Ring in Use; Counterclockwise and Odd on VRing 0", [all …]
|
/openbmc/qemu/docs/interop/ |
H A D | vhost-user.rst | 100 A vring state description 111 A vring descriptor index for split virtqueues 115 | vring index | index in avail ring | 118 :vring index: 32-bit index of the respective virtqueue 128 Vring descriptor indices for packed virtqueues 132 | vring index | descriptor indices | 135 :vring index: 32-bit index of the respective virtqueue 148 A vring address description 155 :index: a 32-bit vring index 157 :flags: a 32-bit vring flags [all …]
|
/openbmc/linux/tools/virtio/ |
H A D | vringh_test.c | 116 err = get_user(avail_idx, &vrh->vring.avail->idx); in vringh_get_head() 126 i = vrh->last_avail_idx & (vrh->vring.num - 1); in vringh_get_head() 128 err = get_user(*head, &vrh->vring.avail->ring[i]); in vringh_get_head() 188 vring_init(&vrh.vring, RINGSIZE, host_map, ALIGN); in parallel_test() 190 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in parallel_test() 494 vring_init(&vrh.vring, RINGSIZE, __user_addr_min, ALIGN); in main() 496 vrh.vring.desc, vrh.vring.avail, vrh.vring.used); in main() 652 assert(vrh.vring.used->idx % RINGSIZE != 0); in main() 667 struct vring vring; in main() local 687 vring_init(&vring, RINGSIZE, __user_addr_min, ALIGN); in main() [all …]
|
/openbmc/linux/drivers/vdpa/vdpa_sim/ |
H A D | vdpa_sim_net.c | 74 vringh_complete_iotlb(&vq->vring, vq->head, len); in vdpasim_net_complete() 80 if (vringh_need_notify_iotlb(&vq->vring) > 0) in vdpasim_net_complete() 81 vringh_notify(&vq->vring); in vdpasim_net_complete() 115 read = vringh_iov_pull_iotlb(&cvq->vring, &cvq->in_iov, in vdpasim_handle_ctrl_mac() 144 err = vringh_getdesc_iotlb(&cvq->vring, &cvq->in_iov, in vdpasim_handle_cvq() 151 read = vringh_iov_pull_iotlb(&cvq->vring, &cvq->in_iov, &ctrl, in vdpasim_handle_cvq() 174 write = vringh_iov_push_iotlb(&cvq->vring, &cvq->out_iov, in vdpasim_handle_cvq() 176 vringh_complete_iotlb(&cvq->vring, cvq->head, write); in vdpasim_handle_cvq() 220 err = vringh_getdesc_iotlb(&txq->vring, &txq->out_iov, NULL, in vdpasim_net_work() 229 read = vringh_iov_pull_iotlb(&txq->vring, &txq->out_iov, in vdpasim_net_work() [all …]
|
H A D | vdpa_sim.c | 82 static void vdpasim_vq_notify(struct vringh *vring) in vdpasim_vq_notify() argument 85 container_of(vring, struct vdpasim_virtqueue, vring); in vdpasim_vq_notify() 96 uint16_t last_avail_idx = vq->vring.last_avail_idx; 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() 112 vq->vring.last_avail_idx = last_avail_idx; in vdpasim_queue_ready() 123 vq->vring.last_used_idx = last_avail_idx; in vdpasim_queue_ready() 124 vq->vring.notify = vdpasim_vq_notify; in vdpasim_queue_ready() 136 vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features, in vdpasim_vq_reset() 139 vq->vring.notify = NULL; in vdpasim_vq_reset() [all …]
|
H A D | vdpa_sim_blk.c | 123 ret = vringh_getdesc_iotlb(&vq->vring, &vq->out_iov, &vq->in_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() 202 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, in vdpasim_blk_handle_req() 215 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, in vdpasim_blk_handle_req() 245 bytes = vringh_iov_pull_iotlb(&vq->vring, &vq->out_iov, &range, in vdpasim_blk_handle_req() 307 bytes = vringh_iov_push_iotlb(&vq->vring, &vq->in_iov, &status, 1); in vdpasim_blk_handle_req() 319 vringh_complete_iotlb(&vq->vring, vq->head, pushed); in vdpasim_blk_handle_req() 349 if (vringh_need_notify_iotlb(&vq->vring) > 0) in vdpasim_blk_work() 350 vringh_notify(&vq->vring); in vdpasim_blk_work()
|
/openbmc/linux/include/linux/ |
H A D | vringh.h | 3 * Linux host-side vring helpers; for when the kernel needs to access 4 * someone else's vring. 47 /* The vring (note: it may contain user pointers!) */ 48 struct vring vring; member 50 /* IOTLB for this vring */ 64 * struct vringh_config_ops - ops for creating a host vring from a virtio driver 69 * callbacks: array of driver callbacks, for each host vring 80 /* The memory the vring can access, and what offset to apply. */
|
/openbmc/qemu/pc-bios/s390-ccw/ |
H A D | virtio.h | 99 struct VRing { struct 110 typedef struct VRing VRing; argument 235 VRing *vrings; 271 bool vring_notify(VRing *vr); 273 void vring_send_buf(VRing *vr, void *p, int len, int flags); 274 int vr_poll(VRing *vr);
|
/openbmc/linux/drivers/remoteproc/ |
H A D | remoteproc_virtio.c | 119 if (id >= ARRAY_SIZE(rvdev->vring)) in rp_find_vq() 131 rvring = &rvdev->vring[id]; in rp_find_vq() 135 /* zero vring */ in rp_find_vq() 139 dev_dbg(dev, "vring%d: va %pK qsz %d notifyid %d\n", in rp_find_vq() 159 /* Update vring in resource table */ in rp_find_vq() 161 rsc->vring[id].da = mem->da; in rp_find_vq() 299 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_get() 317 cfg = &rsc->vring[rsc->num_of_vrings]; in rproc_virtio_set() 443 /* Reference the vdev and vring allocations */ in rproc_add_virtio_dev() 542 /* allocate the vring resources */ in rproc_virtio_probe() [all …]
|
/openbmc/linux/arch/arm/boot/dts/ti/keystone/ |
H A D | keystone-k2hk.dtsi | 167 interrupt-names = "vring", "exception"; 183 interrupt-names = "vring", "exception"; 199 interrupt-names = "vring", "exception"; 215 interrupt-names = "vring", "exception"; 231 interrupt-names = "vring", "exception"; 247 interrupt-names = "vring", "exception"; 263 interrupt-names = "vring", "exception"; 279 interrupt-names = "vring", "exception";
|