/qemu/util/ |
H A D | fifo8.c | 19 void fifo8_create(Fifo8 *fifo, uint32_t capacity) in fifo8_create() argument 21 fifo->data = g_new(uint8_t, capacity); in fifo8_create() 22 fifo->capacity = capacity; in fifo8_create() 34 assert(fifo->num < fifo->capacity); in fifo8_push() 43 assert(fifo->num + num <= fifo->capacity); in fifo8_push_all() 47 if (start + num <= fifo->capacity) { in fifo8_push_all() 50 avail = fifo->capacity - start; in fifo8_push_all() 64 fifo->head %= fifo->capacity; in fifo8_pop() 81 fifo->head %= fifo->capacity; in fifo8_peekpop_buf() 113 return (fifo->num == fifo->capacity); in fifo8_is_full() [all …]
|
H A D | buffer.c | 42 size_t old = buffer->capacity; in buffer_adj_size() 43 buffer->capacity = buffer_req_size(buffer, len); in buffer_adj_size() 44 buffer->buffer = g_realloc(buffer->buffer, buffer->capacity); in buffer_adj_size() 46 old, buffer->capacity); in buffer_adj_size() 83 if (new < buffer->capacity >> 3 && in buffer_shrink() 93 if ((buffer->capacity - buffer->offset) < len) { in buffer_reserve() 116 trace_buffer_free(buffer->name ?: "unnamed", buffer->capacity); in buffer_free() 120 buffer->capacity = 0; in buffer_free() 148 to->capacity = from->capacity; in buffer_move_empty() 152 from->capacity = 0; in buffer_move_empty() [all …]
|
H A D | qemu-option.c | 66 size_t capacity = 0, length; in get_opt_value() local 76 *value = g_renew(char, *value, capacity + length + 1); in get_opt_value() 77 strncpy(*value + capacity, p, length); in get_opt_value() 78 (*value)[capacity + length] = '\0'; in get_opt_value() 79 capacity += length; in get_opt_value()
|
/qemu/io/ |
H A D | channel-buffer.c | 29 qio_channel_buffer_new(size_t capacity) in qio_channel_buffer_new() argument 35 if (capacity) { in qio_channel_buffer_new() 36 ioc->data = g_new0(uint8_t, capacity); in qio_channel_buffer_new() 37 ioc->capacity = capacity; in qio_channel_buffer_new() 48 ioc->capacity = ioc->usage = ioc->offset = 0; in qio_channel_buffer_finalize() 97 if ((bioc->offset + towrite) > bioc->capacity) { in qio_channel_buffer_writev() 98 bioc->capacity = bioc->offset + towrite; in qio_channel_buffer_writev() 99 bioc->data = g_realloc(bioc->data, bioc->capacity); in qio_channel_buffer_writev() 147 bioc->capacity = bioc->usage = bioc->offset = 0; in qio_channel_buffer_close()
|
/qemu/tests/qtest/ |
H A D | virtio-blk-test.c | 118 uint64_t capacity; in test_basic() local 133 capacity = qvirtio_config_readq(dev, 0); in test_basic() 356 uint64_t capacity; in indirect() local 370 capacity = qvirtio_config_readq(dev, 0); in indirect() 439 uint64_t capacity; in config() local 448 capacity = qvirtio_config_readq(dev, 0); in config() 459 capacity = qvirtio_config_readq(dev, 0); in config() 472 uint64_t capacity; in msix() local 495 capacity = qvirtio_config_readq(dev, 0); in msix() 580 uint64_t capacity; in idx() local [all …]
|
H A D | vhost-user-blk-test.c | 220 uint64_t capacity; in test_basic() local 235 capacity = qvirtio_config_readq(dev, 0); in test_basic() 236 g_assert_cmpint(capacity, ==, TEST_IMAGE_SIZE / 512); in test_basic() 465 uint64_t capacity; in indirect() local 479 capacity = qvirtio_config_readq(dev, 0); in indirect() 480 g_assert_cmpint(capacity, ==, TEST_IMAGE_SIZE / 512); in indirect() 550 uint64_t capacity; in idx() local 575 capacity = qvirtio_config_readq(dev, 0); in idx() 576 g_assert_cmpint(capacity, ==, TEST_IMAGE_SIZE / 512); in idx()
|
/qemu/include/io/ |
H A D | channel-buffer.h | 41 size_t capacity; /* Total allocated memory */ member 57 qio_channel_buffer_new(size_t capacity);
|
/qemu/include/qemu/ |
H A D | fifo8.h | 8 uint32_t capacity; member 22 void fifo8_create(Fifo8 *fifo, uint32_t capacity);
|
H A D | fifo32.h | 33 static inline void fifo32_create(Fifo32 *fifo, uint32_t capacity) in fifo32_create() argument 35 fifo8_create(&fifo->fifo, capacity * sizeof(uint32_t)); in fifo32_create()
|
H A D | buffer.h | 37 size_t capacity; member
|
/qemu/block/export/ |
H A D | vduse-blk.c | 210 config.capacity = in vduse_blk_resize() 212 vduse_dev_update_config(vblk_exp->dev, sizeof(config.capacity), in vduse_blk_resize() 213 offsetof(struct virtio_blk_config, capacity), in vduse_blk_resize() 214 (char *)&config.capacity); in vduse_blk_resize() 314 config.capacity = in vduse_blk_exp_create()
|
H A D | vhost-user-blk-server.c | 239 config->capacity = in vu_blk_initialize_config() 276 vexp->blkcfg.capacity = cpu_to_le64(new_size >> VIRTIO_BLK_SECTOR_BITS); in vu_blk_exp_resize()
|
/qemu/tests/unit/ |
H A D | test-crypto-block.c | 196 g_assert_cmpint(offset + buflen, <=, header->capacity); in test_block_read_func() 211 g_assert_cmpint(header->capacity, ==, 0); in test_block_init_func() 228 g_assert_cmpint(buflen + offset, <=, header->capacity); in test_block_write_func() 291 g_assert_cmpint(header.capacity, >, 0); in test_block() 293 g_assert_cmpint(header.capacity, ==, 0); in test_block()
|
H A D | crypto-tls-x509-helpers.c | 473 size_t capacity = 1024, offset = 0; in test_tls_write_cert_chain() local 474 char *buffer = g_new0(char, capacity); in test_tls_write_cert_chain() 478 size_t len = capacity - offset; in test_tls_write_cert_chain() 485 capacity = offset + len; in test_tls_write_cert_chain()
|
/qemu/hw/char/ |
H A D | xen_console.c | 44 size_t capacity; member 78 if ((buffer->capacity - buffer->size) < size) { in OBJECT_DECLARE_SIMPLE_TYPE() 79 buffer->capacity += (size + 1024); in OBJECT_DECLARE_SIMPLE_TYPE() 80 buffer->data = g_realloc(buffer->data, buffer->capacity); in OBJECT_DECLARE_SIMPLE_TYPE() 100 buffer->size = buffer->capacity = buffer->max_capacity; in OBJECT_DECLARE_SIMPLE_TYPE()
|
/qemu/ui/ |
H A D | vnc-enc-zlib.c | 107 zstream->avail_out = vs->output.capacity - vs->output.offset; in vnc_zlib_stop() 117 vs->output.offset = vs->output.capacity - zstream->avail_out; in vnc_zlib_stop()
|
H A D | vnc-enc-zrle.c | 102 zstream->avail_out = vs->zrle->zlib.capacity; in zrle_compress_data() 111 vs->zrle->zlib.offset = vs->zrle->zlib.capacity - zstream->avail_out; in zrle_compress_data()
|
/qemu/tcg/ |
H A D | region.c | 912 size_t guard_size, capacity; in tcg_code_capacity() local 916 capacity = region.total_size; in tcg_code_capacity() 917 capacity -= (region.n - 1) * guard_size; in tcg_code_capacity() 918 capacity -= region.n * TCG_HIGHWATER; in tcg_code_capacity() 920 return capacity; in tcg_code_capacity()
|
/qemu/contrib/vhost-user-blk/ |
H A D | vhost-user-blk.c | 535 off_t capacity; in vub_initialize_config() local 537 capacity = lseek(fd, 0, SEEK_END); in vub_initialize_config() 538 config->capacity = capacity >> 9; in vub_initialize_config()
|
/qemu/include/standard-headers/linux/ |
H A D | virtio_blk.h | 60 __virtio64 capacity; member
|
/qemu/migration/ |
H A D | colo.c | 706 if (value > bioc->capacity) { in colo_incoming_process_checkpoint() 707 bioc->capacity = value; in colo_incoming_process_checkpoint() 708 bioc->data = g_realloc(bioc->data, bioc->capacity); in colo_incoming_process_checkpoint()
|
/qemu/hw/block/ |
H A D | virtio-blk.c | 826 uint64_t capacity = bs->total_sectors << BDRV_SECTOR_BITS; in virtio_blk_handle_zone_mgmt() local 833 len = capacity; in virtio_blk_handle_zone_mgmt() 837 if (bs->bl.zone_size > capacity - offset) { in virtio_blk_handle_zone_mgmt() 839 len = capacity - bs->bl.zone_size * (bs->bl.nr_zones - 1); in virtio_blk_handle_zone_mgmt() 1275 uint64_t capacity; in virtio_blk_update_config() local 1279 blk_get_geometry(s->blk, &capacity); in virtio_blk_update_config() 1281 virtio_stq_p(vdev, &blkcfg.capacity, capacity); in virtio_blk_update_config()
|
/qemu/pc-bios/s390-ccw/ |
H A D | virtio-blkdev.c | 218 return vdev->config.blk.capacity / factor; in virtio_get_blocks()
|
H A D | virtio.h | 153 uint64_t capacity; /* in 512-byte sectors */ member
|
/qemu/block/ |
H A D | blkio.c | 935 uint64_t capacity; in blkio_co_getlength() local 939 ret = blkio_get_uint64(s->blkio, "capacity", &capacity); in blkio_co_getlength() 945 return capacity; in blkio_co_getlength()
|