From aa0f670f9d558c518a5890cbfa7f969e1d2841aa Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 10 Jun 2020 15:09:00 +0200 Subject: [PATCH 1/8] qemu: Probe for a few params supported by migrate-set-parameters These parameters were originally set via dedicated commands which are now deprecated. We want to use migrate-set-parameters instead if possible. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 6 ++++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 ++ tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 2 ++ tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 3 +++ tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 3 +++ tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 3 +++ tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 3 +++ tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 3 +++ 38 files changed, 108 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 18bf37b569..fb7726235d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -571,6 +571,9 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 360 */ "tpm-tis-device", + "migration-param.bandwidth", + "migration-param.downtime", + "migration-param.xbzrle-cache-size", ); @@ -1451,6 +1454,9 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "blockdev-add/arg-type/+nvme", QEMU_CAPS_DRIVE_NVME }, { "query-named-block-nodes/arg-type/flat", QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT }, { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY }, + { "migrate-set-parameters/arg-type/max-bandwidth", QEMU_CAPS_MIGRATION_PARAM_BANDWIDTH }, + { "migrate-set-parameters/arg-type/downtime-limit", QEMU_CAPS_MIGRATION_PARAM_DOWNTIME }, + { "migrate-set-parameters/arg-type/xbzrle-cache-size", QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 8e16fc0e78..0ac92d77c3 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -552,6 +552,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 360 */ QEMU_CAPS_DEVICE_TPM_TIS_DEVICE, /* -device tpm-tis-device */ + QEMU_CAPS_MIGRATION_PARAM_BANDWIDTH, /* max-bandwidth field in migrate-set-parameters */ + QEMU_CAPS_MIGRATION_PARAM_DOWNTIME, /* downtime-limit field in migrate-set-parameters */ + QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE, /* xbzrle-cache-size field in migrate-set-parameters */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml index f598b4678a..e253df4077 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml @@ -140,6 +140,8 @@ + + 2010000 0 61700287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml index b95a9d42ad..8df611353f 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -140,6 +140,8 @@ + + 2010000 0 42900287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml index 04ac872985..27ce348b80 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -107,6 +107,8 @@ + + 2010000 0 39100287 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml index 7ebe97b6ab..368985a611 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -183,6 +183,8 @@ + + 2010000 0 43100287 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml index 6d36a6e484..c5bcf1c818 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -114,6 +114,9 @@ + + + 2011000 0 39100288 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml index b8eb3abd40..717ef46f78 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -189,6 +189,9 @@ + + + 2011000 0 43100288 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml index 64d8d4951c..fbee7661a1 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -156,6 +156,9 @@ + + + 2012000 0 61700289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml index 38a3103c4a..31a643f5d1 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -154,6 +154,9 @@ + + + 2011090 0 42900289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml index 21a168dd3b..d0ea4d780a 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -126,6 +126,9 @@ + + + 2012000 0 39100289 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index 0c30cc75da..3db7162a34 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -198,6 +198,9 @@ + + + 2011090 0 43100289 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml index d204b82030..7becf1bfb6 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -96,6 +96,8 @@ + + 2007093 0 39100246 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml index 489b67f99a..2a0b1f61de 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -160,6 +160,8 @@ + + 2008000 0 43100246 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml index 3bc6ec8dab..9141e29757 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml @@ -132,6 +132,8 @@ + + 2009000 0 42900247 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml index 9a6d94d37b..bcc7d4bd4e 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -101,6 +101,8 @@ + + 2009000 0 39100247 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 83fc6cde97..5cd82aa979 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -177,6 +177,8 @@ + + 2009000 0 43100247 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml index 9a0b9c05c2..6916da2047 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -156,6 +156,9 @@ + + + 2012050 0 42900239 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml index 6814a2f9c6..802b624073 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -96,6 +96,9 @@ + + + 3000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml index b81f5825cc..a16db0912d 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -96,6 +96,9 @@ + + + 3000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml index 85cda12076..6992e10237 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml @@ -129,6 +129,9 @@ + + + 3000000 0 39100239 diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 517e27d815..9fdfc634ff 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -204,6 +204,9 @@ + + + 3000000 0 43100239 diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml index 6801023208..4039923e5f 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml @@ -161,6 +161,9 @@ + + + 3000091 0 42900240 diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml index d901715ffc..02fc245fca 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -207,6 +207,9 @@ + + + 3000092 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml index 6fd1880ae2..278f2d9135 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -170,6 +170,9 @@ + + + 4000000 0 61700240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml index f7e69fcc97..897ca08af0 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -175,6 +175,9 @@ + + + 4000000 0 42900240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml index 6a567239b9..1993d52d42 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -171,6 +171,9 @@ + + + 4000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml index d6686b7c68..348138ab5a 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -171,6 +171,9 @@ + + + 4000000 0 0 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml index 9dc29832f9..1542ed6c68 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml @@ -137,6 +137,9 @@ + + + 4000000 0 39100240 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml index ae4004ad3c..9292313570 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -212,6 +212,9 @@ + + + 4000000 0 43100240 diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml index d9bdeb2516..d07a27b4f8 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -218,6 +218,9 @@ + + + 4001000 0 43100241 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index de16451b8b..fb3d5996c4 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -180,6 +180,9 @@ + + + 4001050 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 99ec98e8cd..daea978d9f 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -180,6 +180,9 @@ + + + 4001050 0 42900242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index fa3c2ef3e4..d007ae65d6 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -139,6 +139,9 @@ + + + 4001050 0 39100242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index c1b73f4ad5..2d5b2ad0f0 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -224,6 +224,9 @@ + + + 4002000 0 43100242 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index 53fcd750d9..be0be79fda 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -182,6 +182,9 @@ + + + 4002050 0 61700241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index 2fb5bb49a9..3ee17a66a4 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -190,6 +190,9 @@ + + + 4002050 0 42900241 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index f43090c9e7..73f9319199 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -227,6 +227,9 @@ + + + 4002050 0 43100241 -- 2.27.0