[PATCH 40/48] qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

Michal Privoznik posted 48 patches 3 years, 3 months ago
[PATCH 40/48] qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
Posted by Michal Privoznik 3 years, 3 months ago
Introduced in QEMU's commit of v2.7.0-rc0~83^2 the .num-queues
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_validate.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 243ec29c71..4a01fe4d14 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -2977,13 +2977,6 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
         break;
 
     case VIR_DOMAIN_DISK_BUS_VIRTIO:
-        if (disk->queues &&
-            !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES)) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("num-queues property isn't supported by this "
-                             "QEMU binary"));
-            return -1;
-        }
         if (disk->queue_size > 0 &&
             !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE)) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-- 
2.37.4
Re: [PATCH 40/48] qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
Posted by Ján Tomko 3 years, 3 months ago
On a Tuesday in 2022, Michal Privoznik wrote:
>Introduced in QEMU's commit of v2.7.0-rc0~83^2 the .num-queues
>attribute of virtio-blk device is always available for all QEMU
>versions we support (4.2.0, currently). Therefore, we can assume
>the capability is always set and thus doesn't need to be checked
>for.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> src/qemu/qemu_validate.c | 7 -------
> 1 file changed, 7 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano