/qemu/util/ |
A D | fifo8.c | 27 fifo->data = g_new(uint8_t, capacity); in fifo8_create() 28 fifo->capacity = capacity; in fifo8_create() 39 assert(fifo->num < fifo->capacity); in fifo8_push() 48 assert(fifo->num + num <= fifo->capacity); in fifo8_push_all() 52 if (start + num <= fifo->capacity) { in fifo8_push_all() 55 avail = fifo->capacity - start; in fifo8_push_all() 69 fifo->head %= fifo->capacity; in fifo8_pop() 90 num = MIN(fifo->capacity - head, max); in fifo8_peekpop_bufptr() 95 fifo->head %= fifo->capacity; in fifo8_peekpop_bufptr() 167 return (fifo->num == fifo->capacity); in fifo8_is_full() [all …]
|
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 …]
|
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/ |
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/ |
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 …]
|
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/ |
A D | channel-buffer.h | 41 size_t capacity; /* Total allocated memory */ member 57 qio_channel_buffer_new(size_t capacity);
|
/qemu/qapi/ |
A D | cxl.json | 393 # capacity, as defined in Compute Express Link (CXL) Specification, 397 # capacity and is free to do this using any combination of 401 # memory capacity but must do so as a single contiguous 431 # @cxl-add-dynamic-capacity: 447 # which extents comprise the added capacity. 465 { 'command': 'cxl-add-dynamic-capacity', 486 # @prescriptive: Extent list of capacity to release is included in 497 # @cxl-release-dynamic-capacity: 499 # Initiate release of dynamic capacity extents from a host. This 518 # the released capacity. [all …]
|
/qemu/include/qemu/ |
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()
|
A D | fifo8.h | 8 uint32_t capacity; member 21 void fifo8_create(Fifo8 *fifo, uint32_t capacity);
|
A D | buffer.h | 37 size_t capacity; member
|
/qemu/block/export/ |
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() 311 config.capacity = in vduse_blk_exp_create()
|
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/ |
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()
|
A D | crypto-tls-x509-helpers.c | 478 size_t capacity = 1024, offset = 0; in test_tls_write_cert_chain() local 479 char *buffer = g_new0(char, capacity); in test_tls_write_cert_chain() 483 size_t len = capacity - offset; in test_tls_write_cert_chain() 490 capacity = offset + len; in test_tls_write_cert_chain()
|
/qemu/hw/char/ |
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/ |
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()
|
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/ |
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/ |
A D | vhost-user-blk.c | 534 off_t capacity; in vub_initialize_config() local 536 capacity = lseek(fd, 0, SEEK_END); in vub_initialize_config() 537 config->capacity = capacity >> 9; in vub_initialize_config()
|
/qemu/include/standard-headers/linux/ |
A D | virtio_blk.h | 60 __virtio64 capacity; member
|
/qemu/migration/ |
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/ |
A D | virtio-blk.c | 690 uint64_t capacity = bs->total_sectors << BDRV_SECTOR_BITS; in virtio_blk_handle_zone_mgmt() local 697 len = capacity; in virtio_blk_handle_zone_mgmt() 701 if (bs->bl.zone_size > capacity - offset) { in virtio_blk_handle_zone_mgmt() 703 len = capacity - bs->bl.zone_size * (bs->bl.nr_zones - 1ull); in virtio_blk_handle_zone_mgmt() 1139 uint64_t capacity; in virtio_blk_update_config() local 1143 blk_get_geometry(s->blk, &capacity); in virtio_blk_update_config() 1145 virtio_stq_p(vdev, &blkcfg.capacity, capacity); in virtio_blk_update_config()
|
/qemu/pc-bios/s390-ccw/ |
A D | virtio-blkdev.c | 218 return vdev->config.blk.capacity / factor; in virtio_get_blocks()
|
A D | virtio.h | 153 uint64_t capacity; /* in 512-byte sectors */ member
|