[PATCH 2/5] qemu: add disk queue count ABI stability check

Hiroki Narukawa posted 5 patches 4 years, 5 months ago
[PATCH 2/5] qemu: add disk queue count ABI stability check
Posted by Hiroki Narukawa 4 years, 5 months ago
virtio-blk num-queue is visible to guest OS, so this must be kept while live migration.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
---
 src/conf/domain_conf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index dbefc98ee8..6cc1f78ec2 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -20766,6 +20766,13 @@ virDomainDiskDefCheckABIStability(virDomainDiskDef *src,
         return false;
     }
 
+    if (src->queues != dst->queues) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target disk queue count %u does not match source %u"),
+                       dst->queues, src->queues);
+        return false;
+    }
+
     if (!virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
         return false;
 
-- 
2.17.1

Re: [PATCH 2/5] qemu: add disk queue count ABI stability check
Posted by Peter Krempa 4 years, 4 months ago
On Thu, Sep 09, 2021 at 12:34:45 +0900, Hiroki Narukawa wrote:

In summary:

ABI stability checks are not qemu specific so I'll update the summary.

> virtio-blk num-queue is visible to guest OS, so this must be kept while live migration.
> 
> Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
> ---
>  src/conf/domain_conf.c | 7 +++++++
>  1 file changed, 7 insertions(+)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>