Home
last modified time | relevance | path

Searched refs:ring (Results 1 – 25 of 59) sorted by relevance

123

/qemu/hw/net/rocker/
H A Drocker_desc.c101 return ring->head == ring->tail; in desc_ring_empty()
137 ring->head = ring->tail = 0; in desc_ring_set_size()
144 ring->info[i].ring = ring; in desc_ring_set_size()
187 return desc_read(ring, ring->tail); in __desc_ring_fetch_desc()
196 return desc_read(ring, ring->tail); in desc_ring_fetch_desc()
202 DescInfo *info = &ring->info[ring->tail]; in __desc_ring_post_desc()
205 desc_write(ring, ring->tail); in __desc_ring_post_desc()
206 ring->tail = (ring->tail + 1) % ring->size; in __desc_ring_post_desc()
240 while (ring->head != ring->tail) { in ring_pump()
242 err = ring->consume(ring->r, info); in ring_pump()
[all …]
H A Drocker_desc.h30 int desc_ring_index(DescRing *ring);
32 uint64_t desc_ring_get_base_addr(DescRing *ring);
34 uint32_t desc_ring_get_size(DescRing *ring);
36 uint32_t desc_ring_get_head(DescRing *ring);
37 uint32_t desc_ring_get_tail(DescRing *ring);
40 uint32_t desc_ring_get_credits(DescRing *ring);
42 DescInfo *desc_ring_fetch_desc(DescRing *ring);
43 bool desc_ring_post_desc(DescRing *ring, int status);
47 unsigned desc_ring_get_msix_vector(DescRing *ring);
49 void desc_ring_free(DescRing *ring);
[all …]
H A Drocker.c145 return (desc_ring_index(ring) - 2) / 2 + 1; in rocker_get_pport_by_tx_ring()
480 DescRing *ring = r->rings[ROCKER_RING_EVENT]; in rocker_event_link_changed() local
481 DescInfo *info = desc_ring_fetch_desc(ring); in rocker_event_link_changed()
521 if (desc_ring_post_desc(ring, err)) { in rocker_event_link_changed()
531 DescRing *ring = r->rings[ROCKER_RING_EVENT]; in rocker_event_mac_vlan_seen() local
549 info = desc_ring_fetch_desc(ring); in rocker_event_mac_vlan_seen()
584 if (desc_ring_post_desc(ring, err)) { in rocker_event_mac_vlan_seen()
603 DescInfo *info = desc_ring_fetch_desc(ring); in rx_produce()
680 if (desc_ring_post_desc(ring, err)) { in rx_produce()
1364 DescRing *ring = desc_ring_alloc(r, i); in pci_rocker_realize() local
[all …]
/qemu/hw/9pfs/
H A Dxen-9p-backend.c86 in_sg[0].iov_base = ring->ring.in + masked_prod; in xen_9pfs_in_sg()
90 in_sg[0].iov_base = ring->ring.in + masked_prod; in xen_9pfs_in_sg()
92 in_sg[1].iov_base = ring->ring.in; in xen_9pfs_in_sg()
112 out_sg[0].iov_base = ring->ring.out + masked_cons; in xen_9pfs_out_sg()
118 out_sg[0].iov_base = ring->ring.out + masked_cons; in xen_9pfs_out_sg()
121 out_sg[1].iov_base = ring->ring.out; in xen_9pfs_out_sg()
127 out_sg[0].iov_base = ring->ring.out + masked_cons; in xen_9pfs_out_sg()
193 xen_9pfs_out_sg(ring, ring->sg, &num, pdu->idx); in xen_9pfs_init_out_iov_from_pdu()
216 xen_9pfs_in_sg(ring, ring->sg, &num, pdu->idx, size); in xen_9pfs_init_in_iov_from_pdu()
239 ring->intf->out_cons = ring->out_cons; in xen_9pfs_push_and_notify()
[all …]
/qemu/net/
H A Dnetmap.c161 struct netmap_ring *ring = s->tx; in netmap_receive_iov() local
162 unsigned int tail = ring->tail; in netmap_receive_iov()
170 last = i = ring->head; in netmap_receive_iov()
177 ring->cur = tail; in netmap_receive_iov()
197 ring->cur = tail; in netmap_receive_iov()
221 ring->head = ring->cur = i; in netmap_receive_iov()
252 unsigned int tail = ring->tail; in netmap_send()
256 while (ring->head != tail) { in netmap_send()
257 uint32_t i = ring->head; in netmap_send()
274 ring->cur = i; in netmap_send()
[all …]
/qemu/hw/usb/
H A Dhost-libusb.c555 ring->host = s; in usb_host_iso_alloc()
556 ring->ep = ep; in usb_host_iso_alloc()
564 xfer->ring = ring; in usb_host_iso_alloc()
583 return ring; in usb_host_iso_alloc()
588 USBHostIsoRing *ring; in usb_host_iso_find() local
592 return ring; in usb_host_iso_find()
634 QTAILQ_REMOVE(&ring->host->isorings, ring, next); in usb_host_iso_free()
635 g_free(ring); in usb_host_iso_free()
640 USBHostIsoRing *ring; in usb_host_iso_free_all() local
681 if (ring == NULL) { in usb_host_iso_data_in()
[all …]
H A Dhcd-xhci.c268 XHCIRing ring; member
276 XHCIRing ring; member
691 ring->ccs = 1; in xhci_ring_init()
735 ring->ccs = !ring->ccs; in xhci_ring_fetch()
1056 ring = &sctx->ring; in xhci_set_ep_state()
1059 ctx2[0] |= sctx->ring.dequeue | sctx->ring.ccs; in xhci_set_ep_state()
1064 ring = &epctx->ring; in xhci_set_ep_state()
1066 if (ring) { in xhci_set_ep_state()
1067 ctx[2] = ring->dequeue | ring->ccs; in xhci_set_ep_state()
1952 ring = &stctx->ring; in xhci_kick_epctx()
[all …]
H A Dxen-usb.c589 struct usbif_conn_back_ring *ring = &usbif->conn_ring; in usbback_hotplug_notify() local
600 if ((RING_SIZE(ring) - ring->rsp_prod_pvt - ring->req_cons) == 0) { in usbback_hotplug_notify()
608 RING_COPY_REQUEST(ring, ring->req_cons, &req); in usbback_hotplug_notify()
609 ring->req_cons++; in usbback_hotplug_notify()
610 ring->sring->req_event = ring->req_cons + 1; in usbback_hotplug_notify()
612 res = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt); in usbback_hotplug_notify()
616 ring->rsp_prod_pvt++; in usbback_hotplug_notify()
617 RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(ring, notify); in usbback_hotplug_notify()
/qemu/docs/specs/
H A Dvmw_pvscsi-spec.rst37 Request ring (``struct PVSCSIRingReqDesc *req_ring``)
38 ring for OS to device requests
40 Completion ring (``struct PVSCSIRingCmpDesc *cmp_ring``)
41 ring for device request completions
43 Message ring (``struct PVSCSIRingMsgDesc *msg_ring``)
44 ring for messages from device. This ring is optional and the
55 Completion interrupts (completion ring notifications):
60 Message interrupts (message ring notifications):
96 b. Flush request ring using ``PVSCSI_REG_OFFSET_KICK_NON_RW_IO``
102 a. Fill next free request ring descriptor
H A Drocker.txt129 0 Command descriptor ring completion
130 1 Event descriptor ring completion
133 4-255 Tx and Rx descriptor ring completion
172 packed within ring. Each descriptor in each ring must also be aligned on an 8
183 Where x is descriptor ring index:
185 index ring
202 written past TAIL. To do so would wrap the ring. An empty ring is when HEAD
210 [0] CTRL_RESET Reset the descriptor ring
482 event ring. The TLV structure for events is:
915 of ring
[all …]
/qemu/block/
H A Dio_uring.c55 struct io_uring ring; member
148 while (io_uring_peek_cqe(&s->ring, &cqes) == 0) { in luring_process_completions()
158 io_uring_cqe_seen(&s->ring, cqes); in luring_process_completions()
241 struct io_uring_sqe *sqes = io_uring_get_sqe(&s->ring); in ioq_submit()
249 ret = io_uring_submit(&s->ring); in ioq_submit()
298 return io_uring_cq_ready(&s->ring); in qemu_luring_poll_cb()
410 aio_set_fd_handler(old_context, s->ring.ring_fd, in luring_detach_aio_context()
420 aio_set_fd_handler(s->aio_context, s->ring.ring_fd, in luring_attach_aio_context()
429 struct io_uring *ring = &s->ring; in luring_init() local
433 rc = io_uring_queue_init(MAX_ENTRIES, ring, 0); in luring_init()
[all …]
H A Dlinux-aio.c146 struct aio_ring *ring = (struct aio_ring *)ctx; in io_getevents_peek() local
147 unsigned int head = ring->head, tail = ring->tail; in io_getevents_peek()
150 nr = tail >= head ? tail - head : ring->nr - head; in io_getevents_peek()
151 *events = ring->io_events + head; in io_getevents_peek()
168 struct aio_ring *ring = (struct aio_ring *)ctx; in io_getevents_commit() local
171 ring->head = (ring->head + nr) % ring->nr; in io_getevents_commit()
/qemu/include/standard-headers/linux/
H A Dvirtio_ring.h115 __virtio16 ring[]; member
132 vring_used_elem_t ring[]; member
194 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
195 #define vring_avail_event(vr) (*(__virtio16 *)&(vr)->used->ring[(vr)->num])
203 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) in vring_init()
/qemu/util/
H A Dfdmon-io_uring.c82 struct io_uring *ring = &ctx->fdmon_io_uring; in get_sqe() local
83 struct io_uring_sqe *sqe = io_uring_get_sqe(ring); in get_sqe()
92 ret = io_uring_submit(ring); in get_sqe()
96 sqe = io_uring_get_sqe(ring); in get_sqe()
257 struct io_uring *ring = &ctx->fdmon_io_uring; in process_cq_ring() local
263 io_uring_for_each_cqe(ring, head, cqe) { in process_cq_ring()
271 io_uring_cq_advance(ring, num_cqes); in process_cq_ring()
/qemu/hw/intc/
H A Dxive.c43 switch (ring) { in exception_mask()
55 switch (ring) { in xive_tctx_output()
70 uint8_t *regs = &tctx->regs[ring]; in xive_tctx_accept()
98 uint8_t *regs = &tctx->regs[ring]; in xive_tctx_notify()
101 switch (ring) { in xive_tctx_notify()
131 uint8_t *regs = &tctx->regs[ring]; in xive_tctx_set_cppr()
141 tctx->regs[ring + TM_CPPR] = cppr; in xive_tctx_set_cppr()
144 xive_tctx_notify(tctx, ring); in xive_tctx_set_cppr()
153 xive_tctx_notify(tctx, ring); in xive_tctx_ipb_update()
652 ring[TM_NSR], ring[TM_CPPR], ring[TM_IPB], ring[TM_LSMFB], in xive_tctx_ring_print()
[all …]
/qemu/hw/display/
H A Dqxl.c402 QXLReleaseRing *ring; in init_qxl_ram() local
416 prod = ring->prod & SPICE_RING_INDEX_MASK(ring); in init_qxl_ram()
617 QXLCommandRing *ring; in interface_get_command() local
698 if (ring->prod - ring->cons + 1 == ring->num_items) { in qxl_push_free_res()
715 trace_qxl_ring_res_push_rest(d->id, ring->prod - ring->cons, in qxl_push_free_res()
716 ring->num_items, ring->prod, ring->cons); in qxl_push_free_res()
722 prod = ring->prod & SPICE_RING_INDEX_MASK(ring); in qxl_push_free_res()
761 prod = ring->prod & SPICE_RING_INDEX_MASK(ring); in interface_release_resource()
791 QXLCursorRing *ring; in interface_get_cursor_command() local
1826 if (ring->prod - ring->cons + 1 == ring->num_items) {
[all …]
/qemu/hw/virtio/
H A Dvhost-backend.c114 struct vhost_vring_state *ring) in vhost_kernel_set_vring_endian() argument
116 return vhost_kernel_call(dev, VHOST_SET_VRING_ENDIAN, ring); in vhost_kernel_set_vring_endian()
120 struct vhost_vring_state *ring) in vhost_kernel_set_vring_num() argument
122 return vhost_kernel_call(dev, VHOST_SET_VRING_NUM, ring); in vhost_kernel_set_vring_num()
126 struct vhost_vring_state *ring) in vhost_kernel_set_vring_base() argument
128 return vhost_kernel_call(dev, VHOST_SET_VRING_BASE, ring); in vhost_kernel_set_vring_base()
132 struct vhost_vring_state *ring) in vhost_kernel_get_vring_base() argument
134 return vhost_kernel_call(dev, VHOST_GET_VRING_BASE, ring); in vhost_kernel_get_vring_base()
H A Dvhost-vdpa.c1007 trace_vhost_vdpa_set_dev_vring_base(dev, ring->index, ring->num, in vhost_vdpa_set_dev_vring_base()
1009 return vhost_vdpa_call(dev, VHOST_SET_VRING_BASE, ring); in vhost_vdpa_set_dev_vring_base()
1420 struct vhost_vring_state *ring) in vhost_vdpa_set_vring_num() argument
1422 trace_vhost_vdpa_set_vring_num(dev, ring->index, ring->num); in vhost_vdpa_set_vring_num()
1423 return vhost_vdpa_call(dev, VHOST_SET_VRING_NUM, ring); in vhost_vdpa_set_vring_num()
1427 struct vhost_vring_state *ring) in vhost_vdpa_set_vring_base() argument
1439 return vhost_vdpa_set_dev_vring_base(dev, ring); in vhost_vdpa_set_vring_base()
1449 ring->num = virtio_queue_get_last_avail_idx(dev->vdev, ring->index); in vhost_vdpa_get_vring_base()
1450 trace_vhost_vdpa_get_vring_base(dev, ring->index, ring->num, true); in vhost_vdpa_get_vring_base()
1462 ret = vhost_vdpa_call(dev, VHOST_GET_VRING_BASE, ring); in vhost_vdpa_get_vring_base()
[all …]
/qemu/hw/net/
H A Dvmxnet3.c148 ring->pa = pa; in DECLARE_CLASS_CHECKERS()
149 ring->size = size; in DECLARE_CLASS_CHECKERS()
152 ring->next = 0; in DECLARE_CLASS_CHECKERS()
166 if (++ring->next >= ring->size) { in vmxnet3_ring_inc()
167 ring->next = 0; in vmxnet3_ring_inc()
168 ring->gen ^= 1; in vmxnet3_ring_inc()
175 ring->next = ring->size - 1; in vmxnet3_ring_dec()
176 ring->gen ^= 1; in vmxnet3_ring_dec()
182 return ring->pa + ring->next * ring->cell_size; in vmxnet3_ring_curr_cell_pa()
199 return ring->next; in vmxnet3_ring_curr_cell_idx()
[all …]
/qemu/audio/
H A Dpwaudio.c52 struct spa_ringbuffer ring; member
113 avail = spa_ringbuffer_get_read_index(&v->ring, &index); in playback_on_process()
128 spa_ringbuffer_read_data(&v->ring, in playback_on_process()
133 spa_ringbuffer_read_update(&v->ring, index); in playback_on_process()
184 spa_ringbuffer_write_data(&v->ring, in capture_on_process()
189 spa_ringbuffer_write_update(&v->ring, index); in capture_on_process()
237 avail = spa_ringbuffer_get_read_index(&v->ring, &index); in qpw_read()
245 spa_ringbuffer_read_data(&v->ring, in qpw_read()
249 spa_ringbuffer_read_update(&v->ring, index); in qpw_read()
315 spa_ringbuffer_write_data(&v->ring, in qpw_write()
[all …]
/qemu/include/hw/xen/interface/io/
H A Dring.h52 (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \
53 sizeof(((struct _s##_sring *)0)->ring[0])))
58 (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
113 union __name##_sring_entry ring[1]; /* variable-length */ \
233 (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req))
236 (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))
H A Dconsole.h15 #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1)) argument
/qemu/pc-bios/s390-ccw/
H A Dvirtio-net.c105 len = rxvq->used->ring[rx_last_idx % rxvq->num].len - sizeof(VirtioNetHdr); in recv()
110 id = rxvq->used->ring[rx_last_idx % rxvq->num].id % rxvq->num; in recv()
129 rxvq->avail->ring[rxvq->avail->idx % rxvq->num] = id; in recv()
/qemu/include/hw/virtio/
H A Dvhost-backend.h75 struct vhost_vring_state *ring);
77 struct vhost_vring_state *ring);
79 struct vhost_vring_state *ring);
81 struct vhost_vring_state *ring);
/qemu/target/xtensa/
H A Dmmu_helper.c476 unsigned ring = get_ring(env, entry[wi][ei].asid); in xtensa_tlb_lookup() local
477 if (ring < 4) { in xtensa_tlb_lookup()
485 *pring = ring; in xtensa_tlb_lookup()
537 uint8_t ring; in HELPER() local
538 int res = xtensa_tlb_lookup(env, v, dtlb, &wi, &ei, &ring); in HELPER()
542 if (ring >= xtensa_get_ring(env)) { in HELPER()
741 static unsigned mpu_attr_to_access(uint32_t attr, unsigned ring) in mpu_attr_to_access() argument
773 rv = access[ring != 0][(attr & XTENSA_MPU_ACC_RIGHTS_MASK) >> in mpu_attr_to_access()
811 uint8_t ring; in get_physical_addr_mmu() local
820 ring = (pte >> 4) & 0x3; in get_physical_addr_mmu()
[all …]

123