/qemu/hw/char/ |
H A D | sclpconsole.c | 113 if (avail >= cons->iov_sclp_rest) { in get_console_data() 115 memcpy(buf, &cons->iov[cons->iov_sclp], cons->iov_sclp_rest); in get_console_data() 117 cons->iov_sclp = 0; in get_console_data() 118 cons->iov_bs = 0; in get_console_data() 119 cons->iov_data_len = 0; in get_console_data() 120 cons->iov_sclp_rest = 0; in get_console_data() 125 memcpy(buf, &cons->iov[cons->iov_sclp], avail); in get_console_data() 127 cons->iov_sclp_rest -= avail; in get_console_data() 128 cons->iov_sclp += avail; in get_console_data() 131 if (cons->notify) { in get_console_data() [all …]
|
H A D | xen_console.c | 67 XENCONS_RING_IDX cons, prod, size; in OBJECT_DECLARE_SIMPLE_TYPE() local 70 cons = intf->out_cons; in OBJECT_DECLARE_SIMPLE_TYPE() 74 size = prod - cons; in OBJECT_DECLARE_SIMPLE_TYPE() 83 while (cons != prod) in OBJECT_DECLARE_SIMPLE_TYPE() 85 MASK_XENCONS_IDX(cons++, intf->out)]; in OBJECT_DECLARE_SIMPLE_TYPE() 88 intf->out_cons = cons; in OBJECT_DECLARE_SIMPLE_TYPE() 120 XENCONS_RING_IDX cons, prod, space; in ring_free_bytes() local 122 cons = intf->in_cons; in ring_free_bytes() 126 space = prod - cons; in ring_free_bytes()
|
H A D | sclpconsole-lm.c | 130 SCLPConsoleLM *cons = SCLPLM_CONSOLE(event); in get_console_data() local 132 len = cons->length; in get_console_data() 138 ebcdic_put(buf, (char *)&cons->buf, len); in get_console_data() 140 cons->length = 0; in get_console_data()
|
/qemu/chardev/ |
H A D | char-ringbuf.c | 40 size_t cons; member 52 return d->prod - d->cons; in DECLARE_INSTANCE_CHECKER() 66 if (d->prod - d->cons > d->size) { in ringbuf_chr_write() 67 d->cons = d->prod - d->size; in ringbuf_chr_write() 80 for (i = 0; i < len && d->cons != d->prod; i++) { in ringbuf_chr_read() 81 buf[i] = d->cbuf[d->cons++ & (d->size - 1)]; in ringbuf_chr_read() 112 d->cons = 0; in qemu_chr_open_ringbuf()
|
H A D | char-mux.c | 196 while (be && d->prod[m] != d->cons[m] && in mux_chr_accept_input() 199 &d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1); in mux_chr_accept_input() 209 if ((d->prod[m] - d->cons[m]) < MUX_BUFFER_SIZE) { in mux_chr_can_read() 232 if (d->prod[m] == d->cons[m] && in mux_chr_read()
|
H A D | chardev-internal.h | 49 int cons[MAX_MUX]; member
|
/qemu/include/hw/xen/interface/io/ |
H A D | ring.h | 445 RING_IDX cons, \ 450 if (prod == cons) \ 454 cons = name##_mask(cons, ring_size); \ 456 if (prod == cons) \ 459 if (prod > cons) \ 460 size = prod - cons; \ 462 size = ring_size - (cons - prod); \
|
/qemu/hw/9pfs/ |
H A D | xen-9p-backend.c | 77 RING_IDX cons, prod, masked_prod, masked_cons; in xen_9pfs_in_sg() local 79 cons = ring->intf->in_cons; in xen_9pfs_in_sg() 83 masked_cons = xen_9pfs_mask(cons, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_in_sg() 103 RING_IDX cons, prod, masked_prod, masked_cons; in xen_9pfs_out_sg() local 105 cons = ring->intf->out_cons; in xen_9pfs_out_sg() 109 masked_cons = xen_9pfs_mask(cons, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_out_sg() 269 RING_IDX cons, prod, masked_prod, masked_cons, queued; in xen_9pfs_receive() local 276 cons = ring->intf->out_cons; in xen_9pfs_receive() 280 queued = xen_9pfs_queued(prod, cons, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_receive() 287 masked_cons = xen_9pfs_mask(cons, XEN_FLEX_RING_SIZE(ring->ring_order)); in xen_9pfs_receive() [all …]
|
/qemu/hw/arm/ |
H A D | smmuv3-internal.h | 221 #define Q_CONS(q) ((q)->cons & INDEX_MASK(q)) 227 #define Q_CONS_WRAP(q) (((q)->cons & WRAP_MASK(q)) >> (q)->log2size) 232 return ((q->cons ^ q->prod) & WRAP_INDEX_MASK(q)) == WRAP_MASK(q); in smmuv3_q_full() 237 return (q->cons & WRAP_INDEX_MASK(q)) == (q->prod & WRAP_INDEX_MASK(q)); in smmuv3_q_empty() 251 q->cons = deposit32(q->cons, 0, q->log2size + 1, q->cons + 1); in queue_cons_incr() 266 s->cmdq.cons = FIELD_DP32(s->cmdq.cons, CMDQ_CONS, ERR, err_type); in smmu_write_cmdq_err()
|
H A D | trace-events | 28 …cmdq_consume(uint32_t prod, uint32_t cons, uint8_t prod_wrap, uint8_t cons_wrap) "prod=%d cons=%d … 30 …mmuv3_cmdq_consume_out(uint32_t prod, uint32_t cons, uint8_t prod_wrap, uint8_t cons_wrap) "prod:%…
|
H A D | smmuv3.c | 297 s->cmdq.cons = 0; in smmuv3_init_regs() 301 s->eventq.cons = 0; in smmuv3_init_regs() 1494 s->cmdq.cons = data; in smmu_writel() 1510 s->eventq.cons = data; in smmu_writel() 1658 *data = s->cmdq.cons; in smmu_readl() 1670 *data = s->eventq.cons; in smmu_readl() 1775 VMSTATE_UINT32(cons, SMMUQueue),
|
/qemu/hw/usb/ |
H A D | dev-audio.c | 582 uint64_t cons; member 592 buf->cons = 0; in streambuf_init() 603 int64_t free = buf->size - (buf->prod - buf->cons); in streambuf_put() 622 int64_t used = buf->prod - buf->cons; in streambuf_get() 629 data = buf->data + (buf->cons % buf->size); in streambuf_get() 630 *len = MIN(buf->prod - buf->cons, in streambuf_get() 631 buf->size - (buf->cons % buf->size)); in streambuf_get() 674 s->out.buf.cons += written; in OBJECT_DECLARE_SIMPLE_TYPE()
|
/qemu/hw/display/ |
H A D | xenfb.c | 676 uint32_t cons, prod; in xenfb_queue_full() local 682 cons = page->in_cons; in xenfb_queue_full() 683 return prod - cons == XENFB_IN_RING_LEN; in xenfb_queue_full() 814 uint32_t prod, cons, out_cons; in xenfb_handle_events() local 823 for (cons = out_cons; cons != prod; cons++) { in xenfb_handle_events() 824 union xenfb_out_event *event = &XENFB_OUT_RING_REF(page, cons); in xenfb_handle_events() 876 page->out_cons = cons; in xenfb_handle_events()
|
H A D | qxl.c | 40 uint32_t cons = (r)->cons & SPICE_RING_INDEX_MASK(r); \ 41 if (cons >= ARRAY_SIZE((r)->items)) { \ 43 "%u >= %zu", cons, ARRAY_SIZE((r)->items)); \ 46 ret = &(r)->items[cons].el; \ 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() 1826 if (ring->prod - ring->cons + 1 == ring->num_items) { 1829 ring->prod, ring->cons);
|
H A D | trace-events | 90 qxl_ring_res_push_rest(int qid, uint32_t ring_has, uint32_t ring_size, uint32_t prod, uint32_t cons…
|
/qemu/hw/net/ |
H A D | xen_nic.c | 111 RING_IDX cons = netdev->tx_ring.req_cons; in net_tx_error() 115 if (cons >= end) { in net_tx_error() 118 txp = RING_GET_REQUEST(&netdev->tx_ring, cons++); in net_tx_error() 120 netdev->tx_ring.req_cons = cons; in net_tx_error()
|
/qemu/include/hw/arm/ |
H A D | smmuv3.h | 30 uint32_t cons; member
|
/qemu/hw/i386/kvm/ |
H A D | xen_xenstore.c | 1096 XENSTORE_RING_IDX cons = qatomic_read(&s->xs->req_cons); in copy_from_ring() local 1103 unsigned int avail = prod - cons; in copy_from_ring() 1104 unsigned int offset = MASK_XENSTORE_IDX(cons); in copy_from_ring() 1128 cons += copylen; in copy_from_ring() 1142 qatomic_set(&s->xs->req_cons, cons); in copy_from_ring() 1154 XENSTORE_RING_IDX cons = qatomic_read(&s->xs->rsp_cons); in copy_to_ring() local 1170 unsigned int avail = cons + XENSTORE_RING_SIZE - prod; in copy_to_ring()
|
/qemu/include/hw/xen/interface/ |
H A D | trace.h | 299 uint32_t cons; /* Offset of next item to be consumed by control tools. */ member
|