/qemu/hw/virtio/ |
H A D | iothread-vq-mapping.c | 15 num_queues, Error **errp) in iothread_vq_mapping_validate() argument 17 g_autofree unsigned long *vqs = bitmap_new(num_queues); in iothread_vq_mapping_validate() 46 if (vq->value >= num_queues) { in iothread_vq_mapping_validate() 49 vq->value, name, num_queues); in iothread_vq_mapping_validate() 62 for (uint16_t i = 0; i < num_queues; i++) { in iothread_vq_mapping_validate() 78 uint16_t num_queues, in iothread_vq_mapping_apply() argument 85 if (!iothread_vq_mapping_validate(list, num_queues, errp)) { in iothread_vq_mapping_apply() 105 assert(vq->value < num_queues); in iothread_vq_mapping_apply() 110 for (unsigned i = cur_iothread; i < num_queues; in iothread_vq_mapping_apply()
|
H A D | vhost-user-scsi-pci.c | 58 if (conf->num_queues == VIRTIO_SCSI_AUTO_NUM_QUEUES) { in vhost_user_scsi_pci_realize() 59 conf->num_queues = in vhost_user_scsi_pci_realize() 64 vpci_dev->nvectors = conf->num_queues + VIRTIO_SCSI_VQ_NUM_FIXED + 1; in vhost_user_scsi_pci_realize()
|
H A D | vhost-user-blk-pci.c | 57 if (dev->vdev.num_queues == VHOST_USER_BLK_AUTO_NUM_QUEUES) { in vhost_user_blk_pci_realize() 58 dev->vdev.num_queues = virtio_pci_optimal_num_queues(0); in vhost_user_blk_pci_realize() 62 vpci_dev->nvectors = dev->vdev.num_queues + 1; in vhost_user_blk_pci_realize()
|
H A D | vhost-scsi-pci.c | 52 if (conf->num_queues == VIRTIO_SCSI_AUTO_NUM_QUEUES) { in vhost_scsi_pci_realize() 53 conf->num_queues = in vhost_scsi_pci_realize() 58 vpci_dev->nvectors = conf->num_queues + VIRTIO_SCSI_VQ_NUM_FIXED + 1; in vhost_scsi_pci_realize()
|
H A D | virtio-blk-pci.c | 55 if (conf->num_queues == VIRTIO_BLK_AUTO_NUM_QUEUES) { in virtio_blk_pci_realize() 56 conf->num_queues = virtio_pci_optimal_num_queues(0); in virtio_blk_pci_realize() 60 vpci_dev->nvectors = conf->num_queues + 1; in virtio_blk_pci_realize()
|
H A D | virtio-scsi-pci.c | 53 if (conf->num_queues == VIRTIO_SCSI_AUTO_NUM_QUEUES) { in virtio_scsi_pci_realize() 54 conf->num_queues = in virtio_scsi_pci_realize() 59 vpci_dev->nvectors = conf->num_queues + VIRTIO_SCSI_VQ_NUM_FIXED + 1; in virtio_scsi_pci_realize()
|
H A D | vdpa-dev.c | 90 v->num_queues = vhost_vdpa_device_get_u32(v->vhostfd, in vhost_vdpa_device_realize() 96 if (!v->num_queues || v->num_queues > VIRTIO_QUEUE_MAX) { in vhost_vdpa_device_realize() 98 v->num_queues, VIRTIO_QUEUE_MAX); in vhost_vdpa_device_realize() 102 v->dev.nvqs = v->num_queues; in vhost_vdpa_device_realize() 180 for (i = 0; i < s->num_queues; i++) { in vhost_vdpa_device_unrealize()
|
/qemu/hw/scsi/ |
H A D | virtio-scsi-dataplane.c | 52 s->vq_aio_context = g_new(AioContext *, vs->conf.num_queues + in virtio_scsi_dataplane_setup() 70 vs->conf.num_queues, errp)) { in virtio_scsi_dataplane_setup() 77 for (uint16_t i = 0; i < vs->conf.num_queues; i++) { in virtio_scsi_dataplane_setup() 85 for (unsigned i = 0; i < vs->conf.num_queues; i++) { in virtio_scsi_dataplane_setup() 162 rc = k->set_guest_notifiers(qbus->parent, vs->conf.num_queues + 2, true); in virtio_scsi_dataplane_start() 188 for (i = 0; i < vs->conf.num_queues; i++) { in virtio_scsi_dataplane_start() 208 for (i = 0; i < vs->conf.num_queues; i++) { in virtio_scsi_dataplane_start() 229 k->set_guest_notifiers(qbus->parent, vs->conf.num_queues + 2, false); in virtio_scsi_dataplane_start() 259 for (i = 0; i < vs->conf.num_queues + VIRTIO_SCSI_VQ_NUM_FIXED; i++) { in virtio_scsi_dataplane_stop() 274 for (i = 0; i < vs->conf.num_queues + 2; i++) { in virtio_scsi_dataplane_stop() [all …]
|
H A D | virtio-scsi.c | 263 assert(n < vs->conf.num_queues); in virtio_scsi_save_request() 278 assert(n < vs->conf.num_queues); in virtio_scsi_load_request() 405 for (uint32_t i = 0; i < s->parent_obj.conf.num_queues; i++) { in virtio_scsi_flush_defer_tmf_to_aio_context() 563 for (uint32_t i = 0; i < s->parent_obj.conf.num_queues; i++) { in virtio_scsi_do_tmf() 957 virtio_stl_p(vdev, &scsiconf->num_queues, s->conf.num_queues); in virtio_scsi_get_config() 1202 s->parent_obj.conf.num_queues; in virtio_scsi_drained_begin() 1230 s->parent_obj.conf.num_queues; in virtio_scsi_drained_end() 1285 if (s->conf.num_queues == VIRTIO_SCSI_AUTO_NUM_QUEUES) { in virtio_scsi_common_realize() 1286 s->conf.num_queues = 1; in virtio_scsi_common_realize() 1288 if (s->conf.num_queues == 0 || in virtio_scsi_common_realize() [all …]
|
H A D | vhost-user-scsi.c | 158 vsc->dev.num_queues = vs->conf.num_queues; in vhost_user_scsi_connect() 159 vsc->dev.nvqs = VIRTIO_SCSI_VQ_NUM_FIXED + vs->conf.num_queues; in vhost_user_scsi_connect() 286 VIRTIO_SCSI_VQ_NUM_FIXED + vs->conf.num_queues); in vhost_user_scsi_realize() 351 DEFINE_PROP_UINT32("num_queues", VirtIOSCSICommon, conf.num_queues,
|
/qemu/block/export/ |
H A D | vduse-blk.c | 32 uint16_t num_queues; member 219 for (uint16_t i = 0; i < vblk_exp->num_queues; i++) { in vduse_blk_stop_virtqueues() 231 for (uint16_t i = 0; i < vblk_exp->num_queues; i++) { in vduse_blk_start_virtqueues() 274 uint16_t num_queues = VDUSE_DEFAULT_NUM_QUEUE; in vduse_blk_exp_create() local 281 num_queues = vblk_opts->num_queues; in vduse_blk_exp_create() 282 if (num_queues == 0) { in vduse_blk_exp_create() 304 vblk_exp->num_queues = num_queues; in vduse_blk_exp_create() 316 config.num_queues = cpu_to_le16(num_queues); in vduse_blk_exp_create() 334 if (num_queues > 1) { in vduse_blk_exp_create() 342 features, num_queues, in vduse_blk_exp_create() [all …]
|
H A D | vhost-user-blk-server.c | 237 uint16_t num_queues) in vu_blk_initialize_config() argument 246 config->num_queues = cpu_to_le16(num_queues); in vu_blk_initialize_config() 323 uint16_t num_queues = VHOST_USER_BLK_NUM_QUEUES_DEFAULT; in vu_blk_exp_create() local 337 num_queues = vu_opts->num_queues; in vu_blk_exp_create() 339 if (num_queues == 0) { in vu_blk_exp_create() 349 logical_block_size, num_queues); in vu_blk_exp_create() 357 num_queues, &vu_blk_iface, errp)) { in vu_blk_exp_create()
|
/qemu/hw/block/ |
H A D | vhost-user-blk.c | 66 virtio_stw_p(vdev, &s->blkcfg.num_queues, s->num_queues); in vhost_user_blk_update_config() 279 if (s->num_queues > 1) { in vhost_user_blk_get_features() 342 s->dev.num_queues = s->num_queues; in vhost_user_blk_connect() 343 s->dev.nvqs = s->num_queues; in vhost_user_blk_connect() 459 if (s->num_queues == VHOST_USER_BLK_AUTO_NUM_QUEUES) { in vhost_user_blk_device_realize() 460 s->num_queues = 1; in vhost_user_blk_device_realize() 462 if (!s->num_queues || s->num_queues > VIRTIO_QUEUE_MAX) { in vhost_user_blk_device_realize() 485 s->virtqs = g_new(VirtQueue *, s->num_queues); in vhost_user_blk_device_realize() 486 for (i = 0; i < s->num_queues; i++) { in vhost_user_blk_device_realize() 492 s->vhost_vqs = g_new0(struct vhost_virtqueue, s->num_queues); in vhost_user_blk_device_realize() [all …]
|
H A D | virtio-blk.c | 1067 uint16_t num_queues = s->conf.num_queues; in virtio_blk_dma_restart_cb() local 1076 vq_rq = g_new0(VirtIOBlockReq *, num_queues); in virtio_blk_dma_restart_cb() 1088 assert(idx < num_queues); in virtio_blk_dma_restart_cb() 1095 for (uint16_t i = 0; i < num_queues; i++) { in virtio_blk_dma_restart_cb() 1180 virtio_stw_p(vdev, &blkcfg.num_queues, s->conf.num_queues); in virtio_blk_update_config() 1266 if (s->conf.num_queues > 1) { in virtio_blk_get_features() 1318 if (s->conf.num_queues > 1) { in virtio_blk_save_device() 1336 unsigned nvqs = s->conf.num_queues; in virtio_blk_load_device() 1386 for (uint16_t i = 0; i < s->conf.num_queues; i++) { in virtio_blk_ioeventfd_detach() 1396 for (uint16_t i = 0; i < s->conf.num_queues; i++) { in virtio_blk_ioeventfd_attach() [all …]
|
/qemu/subprojects/libvduse/ |
H A D | libvduse.c | 128 uint16_t num_queues; member 981 for (i = 0; i < dev->num_queues; i++) { in vduse_dev_start_dataplane() 988 size_t log_size = dev->num_queues * vduse_vq_log_size(VIRTQUEUE_MAX_SIZE); in vduse_dev_stop_dataplane() 991 for (i = 0; i < dev->num_queues; i++) { in vduse_dev_stop_dataplane() 1033 for (i = 0; i < dev->num_queues; i++) { in vduse_dev_handler() 1113 size_t log_size = dev->num_queues * vduse_vq_log_size(VIRTQUEUE_MAX_SIZE); in vduse_set_reconnect_log_file() 1123 for (i = 0; i < dev->num_queues; i++) { in vduse_set_reconnect_log_file() 1132 static int vduse_dev_init_vqs(VduseDev *dev, uint16_t num_queues) in vduse_dev_init_vqs() argument 1137 vqs = calloc(sizeof(VduseVirtq), num_queues); in vduse_dev_init_vqs() 1142 for (i = 0; i < num_queues; i++) { in vduse_dev_init_vqs() [all …]
|
H A D | libvduse.h | 199 VduseDev *vduse_dev_create_by_fd(int fd, uint16_t num_queues, 213 VduseDev *vduse_dev_create_by_name(const char *name, uint16_t num_queues, 234 uint16_t num_queues, uint32_t config_size,
|
/qemu/tests/qtest/fuzz/ |
H A D | virtio_scsi_fuzz.c | 33 int num_queues; member 53 vs->num_queues = qvirtio_config_readl(dev, 0); in qvirtio_scsi_init() 55 for (i = 0; i < vs->num_queues + 2; i++) { in qvirtio_scsi_init() 98 vqa.queue = vqa.queue % queues->num_queues; in virtio_scsi_fuzz()
|
H A D | virtio_blk_fuzz.c | 32 int num_queues; member 53 vs->num_queues = 1; in qvirtio_blk_init() 95 vqa.queue = vqa.queue % queues->num_queues; in virtio_blk_fuzz()
|
/qemu/tests/qtest/ |
H A D | virtio-scsi-test.c | 33 int num_queues; member 43 for (i = 0; i < vs->num_queues + 2; i++) { in qvirtio_scsi_pci_free() 136 vs->num_queues = qvirtio_config_readl(dev, 0); in qvirtio_scsi_init() 138 g_assert_cmpint(vs->num_queues, <, MAX_NUM_QUEUES); in qvirtio_scsi_init() 140 for (i = 0; i < vs->num_queues + 2; i++) { in qvirtio_scsi_init()
|
H A D | vhost-user-blk-test.c | 709 uint16_t num_queues; in multiqueue() local 756 num_queues = qvirtio_config_readw(dev8, in multiqueue() 757 offsetof(struct virtio_blk_config, num_queues)); in multiqueue() 758 g_assert_cmpint(num_queues, ==, 8); in multiqueue() 896 int num_queues) in start_vhost_user_blk() argument 922 i, img_path, i, fd, i, num_queues); in start_vhost_user_blk()
|
/qemu/hw/vmapple/ |
H A D | virtio-blk.c | 139 if (conf->num_queues == VIRTIO_BLK_AUTO_NUM_QUEUES) { in vmapple_virtio_blk_pci_realize() 140 conf->num_queues = virtio_pci_optimal_num_queues(0); in vmapple_virtio_blk_pci_realize() 144 vpci_dev->nvectors = conf->num_queues + 1; in vmapple_virtio_blk_pci_realize()
|
/qemu/include/hw/virtio/ |
H A D | iothread-vq-mapping.h | 33 uint16_t num_queues,
|
H A D | vhost-user-blk.h | 35 uint16_t num_queues; member
|
H A D | vdpa-dev.h | 32 uint32_t num_queues; member
|
H A D | virtio-scsi.h | 53 uint32_t num_queues; member
|