diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 470902a4cf..2c7186c14f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -711,6 +711,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 460 */ "sev-snp-guest", /* QEMU_CAPS_SEV_SNP_GUEST */ + "netdev.user", /* QEMU_CAPS_NETDEV_USER */ ); @@ -1575,6 +1576,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX }, { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKED_REASONS }, { "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG }, + { "netdev_add/arg-type/+user", QEMU_CAPS_NETDEV_USER }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; @@ -5404,6 +5406,11 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps) */ if (qemuCaps->version < 5002000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_FIPS); + + /* We are not able to detect this for old QEMU. Assume the capability is + * there. */ + if (qemuCaps->version < 5000000) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_NETDEV_USER); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ef71e8511e..d3d4e24e58 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -690,6 +690,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 460 */ QEMU_CAPS_SEV_SNP_GUEST, /* -object sev-snp-guest */ + QEMU_CAPS_NETDEV_USER, /* -netdev user */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml index 33d06fface..5aa5c7aeef 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml @@ -106,6 +106,7 @@ + 4002000 61700242 v4.1.0-2221-g36609b4fa3 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml index 80f503fc46..1248897aba 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0_ppc64.xml @@ -106,6 +106,7 @@ + 4002000 42900242 v4.1.0-2198-g9e583f2 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0_s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0_s390x.xml index 20d458e55d..f63db59bcd 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0_s390x.xml @@ -72,6 +72,7 @@ + 4002000 39100242 qemu-4.2.0-20200115.0.1e4aa2da.fc31 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0_x86_64.xml index 40e3211c57..a91b34b49f 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0_x86_64.xml @@ -144,6 +144,7 @@ + 4002000 43100242 v4.2.0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml index 1044a49742..b443541c23 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml @@ -118,6 +118,7 @@ + 5000000 61700241 v5.0.0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0_ppc64.xml index 1806e6316e..47f35c536a 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0_ppc64.xml @@ -121,6 +121,7 @@ + 5000000 42900241 v5.0.0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml index f68d88f39b..9b14ff1fff 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0_riscv64.xml @@ -113,6 +113,7 @@ + 5000000 0 v5.0.0 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0_x86_64.xml index 1741c003cb..84a18b516a 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0_x86_64.xml @@ -153,6 +153,7 @@ + 5000000 43100241 v5.0.0 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0_sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0_sparc.xml index dce3a97aa5..ffa167508e 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0_sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0_sparc.xml @@ -45,6 +45,7 @@ + 5001000 0 qemu-5.1.0-5.fc33 diff --git a/tests/qemucapabilitiesdata/caps_5.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0_x86_64.xml index c863baa71c..ac3079f1ca 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0_x86_64.xml @@ -157,6 +157,7 @@ + 5001000 43100242 v5.1.0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml index 905726f7c1..ae426c5f7f 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml @@ -126,6 +126,7 @@ + 5002000 61700243 v5.2.0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0_ppc64.xml index be3d464df3..d7615208b3 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_ppc64.xml @@ -126,6 +126,7 @@ + 5002000 42900243 v5.2.0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml index 9280e92fd8..c3452815b4 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_riscv64.xml @@ -118,6 +118,7 @@ + 5002000 0 v5.2.0 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0_s390x.xml index 0a18f55960..22b2fbeb69 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_s390x.xml @@ -83,6 +83,7 @@ + 5002000 39100243 qemu-5.2.0-20201215.0.ba93e22c.fc32 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml index da6229f8e2..4cd05fa7ec 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0_x86_64.xml @@ -160,6 +160,7 @@ + 5002000 43100243 v5.2.0 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml index 97bbcdeb68..83439f3d63 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml @@ -137,6 +137,7 @@ + 6000000 61700242 v6.0.0 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0_s390x.xml index 94a8406f0a..332b8091ee 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0_s390x.xml @@ -93,6 +93,7 @@ + 6000000 39100242 qemu-6.0.0-20210517.1.4ff77070.fc33 diff --git a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml index ffaa7c2a71..dc55e0ab3f 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0_x86_64.xml @@ -172,6 +172,7 @@ + 6000000 43100242 v6.0.0 diff --git a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml index 22a1fc3ac7..1d5b8ea9d2 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0_x86_64.xml @@ -178,6 +178,7 @@ + 6001000 43100243 v6.1.0 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml index a7a6f54019..25049e1ab8 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml @@ -150,6 +150,7 @@ + 6001050 61700244 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml index 719e7120a3..e321481949 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0_ppc64.xml @@ -138,6 +138,7 @@ + 6002000 42900244 v6.2.0 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml index 010f142dee..f8f8bd95f4 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0_x86_64.xml @@ -180,6 +180,7 @@ + 6002000 43100244 v6.2.0 diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_aarch64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.0.0_aarch64+hvf.xml index ab21278e50..69d0701dc9 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_aarch64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_aarch64+hvf.xml @@ -158,6 +158,7 @@ + 6002092 61700243 v7.0.0-rc2 diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml index f53c3ddcd8..eaed5601ed 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml @@ -158,6 +158,7 @@ + 6002092 61700243 v7.0.0-rc2 diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml index 2efa4d6259..a49d45a68a 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_ppc64.xml @@ -156,6 +156,7 @@ + 7000000 42900243 v7.0.0 diff --git a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml index 843225b19d..5c57ae8eb8 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0_x86_64.xml @@ -186,6 +186,7 @@ + 7000000 43100243 v7.0.0 diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml index 3fda8bf6ea..5aeb56bac6 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml @@ -157,6 +157,7 @@ + 7001000 42900244 v7.1.0 diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml index 0d43787fa9..3c589a4d61 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml @@ -190,6 +190,7 @@ + 7001000 43100244 v7.1.0 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml b/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml index 7a73f762de..c5e1b23fb7 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml @@ -152,6 +152,7 @@ + 7002000 0 qemu-7.2.0-6.fc37 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml index 5ba0c24a4d..f78e596fcc 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml @@ -194,6 +194,7 @@ + 7002000 43100245 v7.2.0 diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml index 887cb02fa0..9b37253d4f 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml @@ -194,6 +194,7 @@ + 7002000 43100245 v7.2.0 diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml index 9af900aaa3..03c0e99da5 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml @@ -140,6 +140,7 @@ + 7002050 0 v7.2.0-333-g222059a0fc diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml index 62a42c3ab6..bd391ca0b6 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml @@ -198,6 +198,7 @@ + 8000000 43100244 v8.0.0 diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml index 744261be10..c2211bfb12 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml @@ -121,6 +121,7 @@ + 8001000 39100245 v8.1.0 diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml index 907fc39b99..4b7809f635 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml @@ -200,6 +200,7 @@ + 8001000 43100245 v8.1.0 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml index 925bfef44f..b856bc55b3 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml @@ -167,6 +167,7 @@ + 8002000 61700246 v8.2.0 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml index ea3a76d175..1b95b2de85 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_armv7l.xml @@ -174,6 +174,7 @@ + 8002000 0 qemu-8.2.0-7.fc39 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml index 618a7075df..aaf8f32485 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_loongarch64.xml @@ -157,6 +157,7 @@ + 8002000 106300246 v8.2.0 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml b/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml index acf18d5896..e86088332e 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_s390x.xml @@ -122,6 +122,7 @@ + 8002000 39100246 v8.2.0 diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml index 5d7755a65e..a1a5d6fd0f 100644 --- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml @@ -203,6 +203,7 @@ + 8002000 43100246 v8.2.0 diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml index 204d243247..ab841db53b 100644 --- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml @@ -205,6 +205,7 @@ + 9000000 43100245 v9.0.0 diff --git a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml index e0332ce1e8..05cba09035 100644 --- a/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml @@ -203,6 +203,7 @@ + 9000050 43100246 v9.0.0-1388-g80e8f06021-dirty