[PATCH 0/4] bhyve: support queue configuration for NVMe disks
Roman Bogorodskiy (4): conf: domain_validate: make disk queue configuration driver specific bhyve: support queue configuration for NVMe disks bhyve: domain: refactor bhyveDomainDeviceDefValidate() bhyve: domain: improve disks validation src/bhyve/bhyve_command.c | 16 ++- src/bhyve/bhyve_domain.c | 110 +++++++++++++----- src/conf/domain_validate.c | 12 -- src/qemu/qemu_driver.c | 15 +++ src/qemu/qemu_validate.c | 14 +++ .../bhyvexml2argv-disk-virtio-queue-opts.xml | 23 ++++ .../bhyvexml2argvdata/bhyvexml2argv-nvme.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-nvme.xml | 2 +- tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-nvme.xml | 2 +- 10 files changed, 148 insertions(+), 49 deletions(-) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml -- 2.51.0
Currently, virDomainDiskDefValidate() allows to configure disks' number of queues and queue size for virtio disks only. However, the bhyve driver allows to configure these for the NVMe disks, so make this check driver-specific. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/conf/domain_validate.c | 12 ------------ src/qemu/qemu_driver.c | 15 +++++++++++++++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 17955decc0..8085d782c5 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -835,18 +835,6 @@ virDomainDiskDefValidate(const virDomainDef *def, return -1; } - if (disk->queues) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queues attribute in disk driver element is only supported for virtio bus")); - return -1; - } - - if (disk->queue_size) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queue_size attribute in disk driver is only supported for virtio bus")); - return -1; - } - if (disk->event_idx != VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("disk event_idx mode supported only for virtio bus")); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a1b1edcbbf..88c2b4edc3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6745,6 +6745,21 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, _("target %1$s already exists"), disk->dst); return -1; } + + if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + } + if (virDomainDiskTranslateSourcePool(disk) < 0) return -1; if (qemuCheckDiskConfigAgainstDomain(vmdef, disk) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 747e54bf44..5008391707 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3698,6 +3698,20 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, } } + if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + } + return 0; } -- 2.51.0
On Mon, Nov 10, 2025 at 18:55:39 +0100, Roman Bogorodskiy wrote:
Currently, virDomainDiskDefValidate() allows to configure disks' number of queues and queue size for virtio disks only. However, the bhyve driver allows to configure these for the NVMe disks, so make this check driver-specific.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/conf/domain_validate.c | 12 ------------ src/qemu/qemu_driver.c | 15 +++++++++++++++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 17955decc0..8085d782c5 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -835,18 +835,6 @@ virDomainDiskDefValidate(const virDomainDef *def, return -1; }
- if (disk->queues) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queues attribute in disk driver element is only supported for virtio bus")); - return -1; - } - - if (disk->queue_size) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queue_size attribute in disk driver is only supported for virtio bus")); - return -1; - } - if (disk->event_idx != VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("disk event_idx mode supported only for virtio bus")); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a1b1edcbbf..88c2b4edc3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6745,6 +6745,21 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, _("target %1$s already exists"), disk->dst); return -1; } + + if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + }
This is dead code; virDomainDeviceDefParse calls virDomainDeviceDefValidate which calls the driver specific callback.
+ if (virDomainDiskTranslateSourcePool(disk) < 0) return -1; if (qemuCheckDiskConfigAgainstDomain(vmdef, disk) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 747e54bf44..5008391707 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3698,6 +3698,20 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, } }
+ if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + } + return 0; }
-- 2.51.0
On 11/10/25 19:46, Peter Krempa via Devel wrote:
On Mon, Nov 10, 2025 at 18:55:39 +0100, Roman Bogorodskiy wrote:
Currently, virDomainDiskDefValidate() allows to configure disks' number of queues and queue size for virtio disks only. However, the bhyve driver allows to configure these for the NVMe disks, so make this check driver-specific.
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/conf/domain_validate.c | 12 ------------ src/qemu/qemu_driver.c | 15 +++++++++++++++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 17955decc0..8085d782c5 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -835,18 +835,6 @@ virDomainDiskDefValidate(const virDomainDef *def, return -1; }
- if (disk->queues) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queues attribute in disk driver element is only supported for virtio bus")); - return -1; - } - - if (disk->queue_size) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queue_size attribute in disk driver is only supported for virtio bus")); - return -1; - } - if (disk->event_idx != VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("disk event_idx mode supported only for virtio bus")); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a1b1edcbbf..88c2b4edc3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6745,6 +6745,21 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, _("target %1$s already exists"), disk->dst); return -1; } + + if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + }
This is dead code; virDomainDeviceDefParse calls virDomainDeviceDefValidate which calls the driver specific callback.
Yeah, just drop this hunk.
+ if (virDomainDiskTranslateSourcePool(disk) < 0) return -1; if (qemuCheckDiskConfigAgainstDomain(vmdef, disk) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 747e54bf44..5008391707 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3698,6 +3698,20 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskDef *disk, } }
+ if (disk->bus != VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only supported for virtio bus")); + return -1; + } + } + return 0; }
-- 2.51.0
Michal
bhyve supports queue configuration for the NVMe disks: maxq Max number of queues. qsz Max elements in each queue. Map that to the disk driver's "queues" and "queue_size" attributes respectfully, so: <driver name='file' type='raw' queues='2' queue_size='256'/> results in: -s N:0,nvme,/tmp/disk.img,maxq=2,qsz=256 Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_command.c | 16 ++++++++++++++-- tests/bhyvexml2argvdata/bhyvexml2argv-nvme.args | 2 +- tests/bhyvexml2argvdata/bhyvexml2argv-nvme.xml | 2 +- .../bhyvexml2xmloutdata/bhyvexml2xmlout-nvme.xml | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 0ceac618e8..8bfd5a6f93 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -371,6 +371,9 @@ bhyveBuildNVMeControllerArgStr(const virDomainDef *def, size_t i; for (i = 0; i < def->ndisks; i++) { + g_autofree char *nvme_opts = NULL; + + g_auto(virBuffer) opt = VIR_BUFFER_INITIALIZER; virDomainDiskDef *disk = def->disks[i]; if (disk->bus != VIR_DOMAIN_DISK_BUS_NVME) @@ -389,10 +392,19 @@ bhyveBuildNVMeControllerArgStr(const virDomainDef *def, disk_source = virDomainDiskGetSource(disk); + if (disk->queues) + virBufferAsprintf(&opt, ",maxq=%d", disk->queues); + if (disk->queue_size) + virBufferAsprintf(&opt, ",qsz=%d", disk->queue_size); + + nvme_opts = virBufferContentAndReset(&opt); + virCommandAddArg(cmd, "-s"); - virCommandAddArgFormat(cmd, "%d:0,nvme,%s", + virCommandAddArgFormat(cmd, "%d:0,nvme,%s%s", controller->info.addr.pci.slot, - disk_source); + disk_source, + NULLSTR_EMPTY(nvme_opts)); + } return 0; diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.args b/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.args index bd39db1fe6..80877717f2 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.args +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.args @@ -5,5 +5,5 @@ bhyve \ -H \ -P \ -s 0:0,hostbridge \ --s 2:0,nvme,/tmp/freebsd.img \ +-s 2:0,nvme,/tmp/freebsd.img,maxq=2,qsz=256 \ bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.xml index 8daaa11e85..5401ed6ad8 100644 --- a/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.xml +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-nvme.xml @@ -8,7 +8,7 @@ </os> <devices> <disk type='file'> - <driver name='file' type='raw'/> + <driver name='file' type='raw' queues='2' queue_size='256'/> <source file='/tmp/freebsd.img'/> <target dev='nvme0n1' bus='nvme'/> </disk> diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-nvme.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-nvme.xml index d4ab69b15f..40a1ea1c5e 100644 --- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-nvme.xml +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-nvme.xml @@ -14,7 +14,7 @@ <on_crash>destroy</on_crash> <devices> <disk type='file' device='disk'> - <driver name='file' type='raw'/> + <driver name='file' type='raw' queues='2' queue_size='256'/> <source file='/tmp/freebsd.img'/> <target dev='nvme0n1' bus='nvme'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> -- 2.51.0
Refactor bhyveDomainDeviceDefValidate() to use switch/case instead of series of ifs which makes it easier to follow. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_domain.c | 103 +++++++++++++++++++++++++++------------ 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index 63d61b9f85..16ca4b1d0f 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -248,13 +248,15 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, void *opaque G_GNUC_UNUSED, void *parseOpaque G_GNUC_UNUSED) { - if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER && - dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_ISA && - dev->data.controller->idx != 0) { - return -1; - } + switch (dev->type) { + case VIR_DOMAIN_DEVICE_CONTROLLER: + if (dev->data.controller->type == VIR_DOMAIN_CONTROLLER_TYPE_ISA && + dev->data.controller->idx != 0) { + return -1; + } + break; - if (dev->type == VIR_DOMAIN_DEVICE_RNG) { + case VIR_DOMAIN_DEVICE_RNG: if (dev->data.rng->model == VIR_DOMAIN_RNG_MODEL_VIRTIO) { if (dev->data.rng->backend == VIR_DOMAIN_RNG_BACKEND_RANDOM) { if (STRNEQ(dev->data.rng->source.file, "/dev/random")) { @@ -272,39 +274,76 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, _("Only 'virio' RNG device model is supported")); return -1; } - } else if (dev->type == VIR_DOMAIN_DEVICE_CHR && - dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) { - virDomainChrDef *chr = dev->data.chr; - if (chr->source->type != VIR_DOMAIN_CHR_TYPE_NMDM && - chr->source->type != VIR_DOMAIN_CHR_TYPE_TCP) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Only 'nmdm' and 'tcp' console types are supported")); - return -1; - } - if (chr->target.port > 3) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Only four serial ports are supported")); - return -1; - } - if (chr->source->type == VIR_DOMAIN_CHR_TYPE_TCP) { - if (chr->source->data.tcp.listen == false) { + break; + + case VIR_DOMAIN_DEVICE_CHR: + if (dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL) { + virDomainChrDef *chr = dev->data.chr; + if (chr->source->type != VIR_DOMAIN_CHR_TYPE_NMDM && + chr->source->type != VIR_DOMAIN_CHR_TYPE_TCP) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Only listening TCP sockets are supported")); + _("Only 'nmdm' and 'tcp' console types are supported")); return -1; } - - if (chr->source->data.tcp.protocol != VIR_DOMAIN_CHR_TCP_PROTOCOL_RAW) { + if (chr->target.port > 3) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Only 'raw' protocol is supported for TCP sockets")); + _("Only four serial ports are supported")); return -1; } + if (chr->source->type == VIR_DOMAIN_CHR_TYPE_TCP) { + if (chr->source->data.tcp.listen == false) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Only listening TCP sockets are supported")); + return -1; + } + + if (chr->source->data.tcp.protocol != VIR_DOMAIN_CHR_TCP_PROTOCOL_RAW) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Only 'raw' protocol is supported for TCP sockets")); + return -1; + } + } } - } else if (dev->type == VIR_DOMAIN_DEVICE_DISK && - dev->data.disk->rotation_rate && - dev->data.disk->bus != VIR_DOMAIN_DISK_BUS_SATA) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("rotation rate is only valid for SATA bus")); - return -1; + break; + + case VIR_DOMAIN_DEVICE_DISK: { + virDomainDiskDef *disk = dev->data.disk; + + if (disk->rotation_rate && + disk->bus != VIR_DOMAIN_DISK_BUS_SATA) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("rotation rate is only valid for SATA bus")); + return -1; + } + + break; + } + case VIR_DOMAIN_DEVICE_AUDIO: + case VIR_DOMAIN_DEVICE_CRYPTO: + case VIR_DOMAIN_DEVICE_FS: + case VIR_DOMAIN_DEVICE_GRAPHICS: + case VIR_DOMAIN_DEVICE_HOSTDEV: + case VIR_DOMAIN_DEVICE_HUB: + case VIR_DOMAIN_DEVICE_INPUT: + case VIR_DOMAIN_DEVICE_IOMMU: + case VIR_DOMAIN_DEVICE_LAST: + case VIR_DOMAIN_DEVICE_LEASE: + case VIR_DOMAIN_DEVICE_MEMBALLOON: + case VIR_DOMAIN_DEVICE_MEMORY: + case VIR_DOMAIN_DEVICE_NET: + case VIR_DOMAIN_DEVICE_NONE: + case VIR_DOMAIN_DEVICE_NVRAM: + case VIR_DOMAIN_DEVICE_PANIC: + case VIR_DOMAIN_DEVICE_PSTORE: + case VIR_DOMAIN_DEVICE_REDIRDEV: + case VIR_DOMAIN_DEVICE_SHMEM: + case VIR_DOMAIN_DEVICE_SMARTCARD: + case VIR_DOMAIN_DEVICE_SOUND: + case VIR_DOMAIN_DEVICE_TPM: + case VIR_DOMAIN_DEVICE_VIDEO: + case VIR_DOMAIN_DEVICE_VSOCK: + case VIR_DOMAIN_DEVICE_WATCHDOG: + break; } return 0; -- 2.51.0
Do not allow to configure queues and queue size for non-NVMe disks. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- src/bhyve/bhyve_domain.c | 7 ++++++ .../bhyvexml2argv-disk-virtio-queue-opts.xml | 23 +++++++++++++++++++ tests/bhyvexml2argvtest.c | 1 + 3 files changed, 31 insertions(+) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index 16ca4b1d0f..4c9ed29333 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -316,6 +316,13 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev, return -1; } + if ((disk->queues || disk->queue_size) && + disk->bus != VIR_DOMAIN_DISK_BUS_NVME) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue configuration is only valid for NVMe bus")); + return -1; + } + break; } case VIR_DOMAIN_DEVICE_AUDIO: diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml new file mode 100644 index 0000000000..1119c37b2b --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml @@ -0,0 +1,23 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory>219136</memory> + <vcpu>1</vcpu> + <os> + <type>hvm</type> + </os> + <devices> + <disk type='file'> + <driver name='file' type='raw' queues='4' queue_size='512'/> + <source file='/tmp/freebsd.img'/> + <target dev='vda' bus='virtio'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </disk> + <interface type='bridge'> + <mac address='52:54:00:bc:85:fe'/> + <model type='virtio'/> + <source bridge="virbr0"/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </interface> + </devices> +</domain> diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index f7411ee094..2a785ef8aa 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -267,6 +267,7 @@ mymain(void) DO_TEST_FAILURE("2-nvme-same-controller"); DO_TEST("sata-rotation-rate"); DO_TEST_FAILURE("disk-virtio-rotation-rate"); + DO_TEST_FAILURE("disk-virtio-queue-opts"); /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); -- 2.51.0
On 11/10/25 18:55, Roman Bogorodskiy wrote:
Roman Bogorodskiy (4): conf: domain_validate: make disk queue configuration driver specific bhyve: support queue configuration for NVMe disks bhyve: domain: refactor bhyveDomainDeviceDefValidate() bhyve: domain: improve disks validation
src/bhyve/bhyve_command.c | 16 ++- src/bhyve/bhyve_domain.c | 110 +++++++++++++----- src/conf/domain_validate.c | 12 -- src/qemu/qemu_driver.c | 15 +++ src/qemu/qemu_validate.c | 14 +++ .../bhyvexml2argv-disk-virtio-queue-opts.xml | 23 ++++ .../bhyvexml2argvdata/bhyvexml2argv-nvme.args | 2 +- .../bhyvexml2argvdata/bhyvexml2argv-nvme.xml | 2 +- tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-nvme.xml | 2 +- 10 files changed, 148 insertions(+), 49 deletions(-) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-disk-virtio-queue-opts.xml
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (3)
-
Michal Prívozník -
Peter Krempa -
Roman Bogorodskiy