From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524065687611431.04406924246337; Wed, 18 Apr 2018 08:34:47 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDD91326227B; Wed, 18 Apr 2018 15:34:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A905E81F0A; Wed, 18 Apr 2018 15:34:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 52C0A180BAD4; Wed, 18 Apr 2018 15:34:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXnUH009045 for ; Wed, 18 Apr 2018 11:33:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1821D1134CD3; Wed, 18 Apr 2018 15:33:49 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92C151134CCD; Wed, 18 Apr 2018 15:33:48 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:32 +0200 Message-Id: <8dc36077733036086b2dd99a924f47eee5c21033.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 1/7] tests: qemu: Add helper code to lookup latest capability file X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 18 Apr 2018 15:34:46 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The helper iterates the directory with files for the capability test and looks up the most recent one for the given architecture. This will allow testing against the newest qemu capabilities so that we can catch regressions in behaviour more easily. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/testutilsqemu.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++= ++++ tests/testutilsqemu.h | 5 ++++ 2 files changed, 68 insertions(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 9671a46f12..3222d7864c 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -674,3 +674,66 @@ testQemuCapsSetGIC(virQEMUCapsPtr qemuCaps, } #endif + + +char * +testQemuGetLatestCapsForArch(const char *dirname, + const char *arch, + const char *suffix) +{ + struct dirent *ent; + DIR *dir =3D NULL; + int rc; + char *fullsuffix =3D NULL; + char *tmp =3D NULL; + unsigned long maxver =3D 0; + unsigned long ver; + const char *maxname =3D NULL; + char *ret =3D NULL; + + if (virAsprintf(&fullsuffix, "%s.%s", arch, suffix) < 0) + goto cleanup; + + if (virDirOpen(&dir, dirname) < 0) + goto cleanup; + + while ((rc =3D virDirRead(dir, &ent, dirname)) > 0) { + VIR_FREE(tmp); + + if ((rc =3D VIR_STRDUP(tmp, STRSKIP(ent->d_name, "caps_"))) < 0) + goto cleanup; + + if (rc =3D=3D 0) + continue; + + if (virFileStripSuffix(tmp, fullsuffix) !=3D 1) + continue; + + if (virParseVersionString(tmp, &ver, false) < 0) { + VIR_TEST_DEBUG("skipping caps file '%s'\n", ent->d_name); + continue; + } + + if (ver > maxver) { + maxname =3D ent->d_name; + maxver =3D ver; + } + } + + if (rc < 0) + goto cleanup; + + if (!maxname) { + VIR_TEST_VERBOSE("failed to find capabilities for '%s' in '%s'\n", + arch, dirname); + goto cleanup; + } + + ignore_value(virAsprintf(&ret, "%s/%s", dirname, maxname)); + + cleanup: + VIR_FREE(tmp); + VIR_FREE(fullsuffix); + virDirClose(&dir); + return ret; +} diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 7ae8324933..efb1baeadd 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -39,4 +39,9 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache, int testQemuCapsSetGIC(virQEMUCapsPtr qemuCaps, int gic); + +char *testQemuGetLatestCapsForArch(const char *dirname, + const char *arch, + const char *suffix); + #endif --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524065693251979.7730824653487; Wed, 18 Apr 2018 08:34:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A9C33AD8A; Wed, 18 Apr 2018 15:34:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3644A81F0E; Wed, 18 Apr 2018 15:34:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E3C5D4CA9C; Wed, 18 Apr 2018 15:34:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXndd009052 for ; Wed, 18 Apr 2018 11:33:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD4801134CD3; Wed, 18 Apr 2018 15:33:49 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 529FC1134CCD; Wed, 18 Apr 2018 15:33:49 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:33 +0200 Message-Id: <1245bb7474dbc9f2258ea0d8aa4165197070bedf.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 2/7] tests: qemuxml2argv: Add infrastructure to pass output file suffix X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 18 Apr 2018 15:34:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" To allow having more than one output file in the qemuxml2argvtest add a suffix member to the testInfo struct which will allow testing the same XML file with multiple capabilities files. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index aba946612f..6fe57c2a99 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -270,6 +270,7 @@ typedef enum { struct testInfo { const char *name; + const char *suffix; virQEMUCapsPtr qemuCaps; const char *migrateFrom; int migrateFd; @@ -442,6 +443,7 @@ testCompareXMLToArgv(const void *data) char *args =3D NULL; char *migrateURI =3D NULL; char *actualargv =3D NULL; + const char *suffix =3D info->suffix; unsigned int flags =3D info->flags; unsigned int parseFlags =3D info->parseFlags; int ret =3D -1; @@ -458,6 +460,9 @@ testCompareXMLToArgv(const void *data) if (!(conn =3D virGetConnect())) goto cleanup; + if (!suffix) + suffix =3D ""; + conn->secretDriver =3D &fakeSecretDriver; conn->storageDriver =3D &fakeStorageDriver; @@ -472,8 +477,8 @@ testCompareXMLToArgv(const void *data) if (virAsprintf(&xml, "%s/qemuxml2argvdata/%s.xml", abs_srcdir, info->name) < 0 || - virAsprintf(&args, "%s/qemuxml2argvdata/%s.args", - abs_srcdir, info->name) < 0) + virAsprintf(&args, "%s/qemuxml2argvdata/%s%s.args", + abs_srcdir, info->name, suffix) < 0) goto cleanup; if (info->migrateFrom && @@ -657,7 +662,7 @@ mymain(void) parseFlags, gic, ...) \ do { \ static struct testInfo info =3D { \ - name, NULL, migrateFrom, migrateFd, (flags), parseFlags, \ + name, NULL, NULL, migrateFrom, migrateFd, (flags), parseFlags,= \ false, NULL \ }; \ info.skipLegacyCPUs =3D skipLegacyCPUs; \ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524065690232799.4166812895584; Wed, 18 Apr 2018 08:34:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3B6C30001DE; Wed, 18 Apr 2018 15:34:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1DA9805E9; Wed, 18 Apr 2018 15:34:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4E139180BAD8; Wed, 18 Apr 2018 15:34:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXoW9009061 for ; Wed, 18 Apr 2018 11:33:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8C6D71134CD3; Wed, 18 Apr 2018 15:33:50 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12E2E1134CCD; Wed, 18 Apr 2018 15:33:49 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:34 +0200 Message-Id: <34ca30a8510ddd4d9aab1c1485974c0153c8d3b9.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 3/7] tests: qemuxml2argv: Add infrastructure for testing with real qemuCaps X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 18 Apr 2018 15:34:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Allow testing of XML->argv conversion with using a real capability map as used in the qemucapabilitiestest. This allows specifying the required qemu version with the test rather than having to enumerate all the required capabilities or allows to use the newest capabilities present. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemuxml2argvtest.c | 69 ++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 69 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6fe57c2a99..3c76d4c6ca 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -593,6 +593,7 @@ mymain(void) int ret =3D 0; char *fakerootdir; bool skipLegacyCPUs =3D false; + char *capslatest_x86_64 =3D NULL; if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) { fprintf(stderr, "Out of memory\n"); @@ -658,6 +659,73 @@ mymain(void) if (VIR_STRDUP_QUIET(driver.config->memoryBackingDir, "/var/lib/libvir= t/qemu/ram") < 0) return EXIT_FAILURE; + if (!(capslatest_x86_64 =3D testQemuGetLatestCapsForArch(abs_srcdir "/= qemucapabilitiesdata", + "x86_64", "xml"= ))) + return EXIT_FAILURE; + + VIR_TEST_VERBOSE("\nlatest caps x86_64: %s\n", capslatest_x86_64); + + +/** + * The following set of macros allows testing of XML -> argv conversion wi= th a + * real set of capabilities gathered from a real qemu copy. It is desired = to use + * these for positive test cases as it provides combinations of flags which + * can be met in real life. + * + * The capabilities are taken from the real capabilities stored in + * tests/qemucapabilitiesdata. + * + * It is suggested to use the DO_TEST_CAPS_LATEST macro which always takes= the + * most recent capability set. In cases when the new code would change beh= aviour + * the test cases should be forked using DO_TEST_CAPS_VER with the appropr= iate + * version. + */ +# define DO_TEST_CAPS_INTERNAL(name, suffix, migrateFrom, flags, parseFlag= s, \ + gic, arch, capsfile) \ + do { \ + static struct testInfo info =3D { \ + name, "." suffix, NULL, migrateFrom, migrateFrom ? 7 : -1,\ + (flags), parseFlags, false, NULL \ + }; \ + info.skipLegacyCPUs =3D skipLegacyCPUs; \ + if (testInitQEMUCaps(&info, gic) < 0) \ + return EXIT_FAILURE; \ + if (!(info.qemuCaps =3D qemuTestParseCapabilitiesArch(virArchFromS= tring(arch), \ + capsfile))) \ + return EXIT_FAILURE; \ + if (virTestRun("QEMU XML-2-ARGV " name "." suffix, \ + testCompareXMLToArgv, &info) < 0) \ + ret =3D -1; \ + virObjectUnref(info.qemuCaps); \ + virObjectUnref(info.vm); \ + } while (0) + +# define TEST_CAPS_PATH abs_srcdir "/qemucapabilitiesdata/caps_" + +# define DO_TEST_CAPS_ARCH_VER_FULL(name, flags, parseFlags, gic, arch, ve= r) \ + DO_TEST_CAPS_INTERNAL(name, arch "-" ver, NULL, flags, parseFlags, gic= , \ + arch, TEST_CAPS_PATH ver "." arch ".xml") + +# define DO_TEST_CAPS_ARCH_VER(name, gic, arch, ver) \ + DO_TEST_CAPS_ARCH_VER_FULL(name, 0, 0, gic, arch, ver) + +# define DO_TEST_CAPS_VER(name, ver) \ + DO_TEST_CAPS_ARCH_VER(name, GIC_NONE, "x86_64", ver) + +# define DO_TEST_CAPS_LATEST(name) \ + DO_TEST_CAPS_INTERNAL(name, "x86_64-latest", NULL, 0, 0, GIC_NONE, "x8= 6_64", \ + capslatest_x86_64) + +/** + * The following test macros should be used only in cases when the tests r= equire + * testing of some non-standard combination of capability flags + */ +# define DO_TEST_CAPS_FULL(name, flags, parseFlags, ver) \ + DO_TEST_CAPS_ARCH(name, NULL, flags, parseFlags, GIC_NONE, "x86_64", v= er) + +# define DO_TEST_CAPS(name, ver) \ + DO_TEST_CAPS_FULL(name, 0, 0, ver) + # define DO_TEST_FULL(name, migrateFrom, migrateFd, flags, \ parseFlags, gic, ...) \ do { \ @@ -2769,6 +2837,7 @@ mymain(void) qemuTestDriverFree(&driver); VIR_FREE(fakerootdir); + VIR_FREE(capslatest_x86_64); return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152406563748410.28809057559863; Wed, 18 Apr 2018 08:33:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A31D9C0587F3; Wed, 18 Apr 2018 15:33:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1327A7F644; Wed, 18 Apr 2018 15:33:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 36A20180215E; Wed, 18 Apr 2018 15:33:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXpQB009069 for ; Wed, 18 Apr 2018 11:33:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4C04A1134CD3; Wed, 18 Apr 2018 15:33:51 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6F0E1134CCD; Wed, 18 Apr 2018 15:33:50 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:35 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 4/7] qemu: domain: Add helper for translating disk cachemode to qemu flags X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 18 Apr 2018 15:33:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Add helper which will map values of disk cache mode to the flags which are accepted by various parts of the qemu block layer. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ src/qemu/qemu_domain.h | 6 ++++ 2 files changed, 81 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 21897cb47a..e2a8450e2e 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -11866,6 +11866,81 @@ qemuDomainPrepareDiskSource(virDomainDiskDefPtr di= sk, } +/** + * qemuDomainDiskCachemodeFlags: + * + * Converts disk cachemode to the cache mode options for qemu. Returns -1 = for + * invalid @cachemode values and fills the flags and returns 0 on success. + * Flags may be NULL. + */ +int +qemuDomainDiskCachemodeFlags(int cachemode, + bool *writeback, + bool *direct, + bool *noflush) +{ + bool dummy; + + if (!writeback) + writeback =3D &dummy; + + if (!direct) + direct =3D &dummy; + + if (!noflush) + noflush =3D &dummy; + + /* Mapping of cache modes to the attributes according to qemu-options.= hx + * =E2=94=82 cache.writeback cache.direct cache.no-fl= ush + * =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=BC=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80= =E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80 + * writeback =E2=94=82 true false false + * none =E2=94=82 true true false + * writethrough =E2=94=82 false false false + * directsync =E2=94=82 false true false + * unsafe =E2=94=82 true false true + */ + switch ((virDomainDiskCache) cachemode) { + case VIR_DOMAIN_DISK_CACHE_DISABLE: /* 'none' */ + *writeback =3D true; + *direct =3D true; + *noflush =3D false; + break; + + case VIR_DOMAIN_DISK_CACHE_WRITETHRU: + *writeback =3D false; + *direct =3D false; + *noflush =3D false; + break; + + case VIR_DOMAIN_DISK_CACHE_WRITEBACK: + *writeback =3D true; + *direct =3D false; + *noflush =3D false; + break; + + case VIR_DOMAIN_DISK_CACHE_DIRECTSYNC: + *writeback =3D false; + *direct =3D true; + *noflush =3D false; + break; + + case VIR_DOMAIN_DISK_CACHE_UNSAFE: + *writeback =3D true; + *direct =3D false; + *noflush =3D true; + break; + + case VIR_DOMAIN_DISK_CACHE_DEFAULT: + case VIR_DOMAIN_DISK_CACHE_LAST: + default: + virReportEnumRangeError(virDomainDiskCache, cachemode); + return -1; + } + + return 0; +} + + void qemuProcessEventFree(struct qemuProcessEvent *event) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 40d9a6f247..2c27dfb9f3 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -994,4 +994,10 @@ qemuDomainPrepareDiskSource(virDomainDiskDefPtr disk, qemuDomainObjPrivatePtr priv, virQEMUDriverConfigPtr cfg); +int +qemuDomainDiskCachemodeFlags(int cachemode, + bool *writeback, + bool *direct, + bool *noflush); + #endif /* __QEMU_DOMAIN_H__ */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524065698200410.63192273123786; Wed, 18 Apr 2018 08:34:58 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4C7330841AB; Wed, 18 Apr 2018 15:34:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E70C805FA; Wed, 18 Apr 2018 15:34:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 52C404CA99; Wed, 18 Apr 2018 15:34:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXqrX009077 for ; Wed, 18 Apr 2018 11:33:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0DD491134CD3; Wed, 18 Apr 2018 15:33:52 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 872321134CCD; Wed, 18 Apr 2018 15:33:51 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:36 +0200 Message-Id: <61d1a11b60ece9535d31a280ce41d36a8f7eaabe.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 5/7] tests: qemuxml2argv: Test formatting of 'write-cache' parameter X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 18 Apr 2018 15:34:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Prepare the tests for adding the new parameter. The parameter was introduced in qemu-2.7.0, so add a forked version of the test case to see that it is formatted properly. This test is also an example how the new testing macros should be used. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- .../disk-drive-write-cache.x86_64-2.6.0.args | 43 ++++++++++++++++++= +++ .../disk-drive-write-cache.x86_64-2.7.0.args | 43 ++++++++++++++++++= +++ .../disk-drive-write-cache.x86_64-latest.args | 45 ++++++++++++++++++= ++++ tests/qemuxml2argvdata/disk-drive-write-cache.xml | 45 ++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 3 ++ 5 files changed, 179 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.= 6.0.args create mode 100644 tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.= 7.0.args create mode 100644 tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-la= test.args create mode 100644 tests/qemuxml2argvdata/disk-drive-write-cache.xml diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.6.0.arg= s b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.6.0.args new file mode 100644 index 0000000000..9af27dbbaf --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.6.0.args @@ -0,0 +1,43 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-2.6,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x2 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ +cache=3Dwriteback \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-s= csi0-0-0,\ +cache=3Dnone \ +-device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-v= irtio-disk0,\ +cache=3Dwritethrough \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-u= sb-disk1,\ +cache=3Ddirectsync \ +-device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ +removable=3Doff \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.arg= s b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.args new file mode 100644 index 0000000000..9af27dbbaf --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.args @@ -0,0 +1,43 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-2.6,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x2 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ +cache=3Dwriteback \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-s= csi0-0-0,\ +cache=3Dnone \ +-device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-v= irtio-disk0,\ +cache=3Dwritethrough \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-u= sb-disk1,\ +cache=3Ddirectsync \ +-device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ +removable=3Doff \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.ar= gs b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.args new file mode 100644 index 0000000000..b4bef87529 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-2.6,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x2 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ +cache=3Dwriteback \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-s= csi0-0-0,\ +cache=3Dnone \ +-device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-v= irtio-disk0,\ +cache=3Dwritethrough \ +-device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ +id=3Dvirtio-disk0 \ +-drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-u= sb-disk1,\ +cache=3Ddirectsync \ +-device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ +removable=3Doff \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.xml b/tests/qemu= xml2argvdata/disk-drive-write-cache.xml new file mode 100644 index 0000000000..6b762909b4 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.xml @@ -0,0 +1,45 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 3c76d4c6ca..74d930ebe2 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1017,6 +1017,9 @@ mymain(void) DO_TEST("disk-drive-cache-v2-none", NONE); DO_TEST("disk-drive-cache-directsync", NONE); DO_TEST("disk-drive-cache-unsafe", NONE); + DO_TEST_CAPS_VER("disk-drive-write-cache", "2.6.0"); + DO_TEST_CAPS_VER("disk-drive-write-cache", "2.7.0"); + DO_TEST_CAPS_LATEST("disk-drive-write-cache"); DO_TEST("disk-drive-network-nbd", NONE); DO_TEST("disk-drive-network-nbd-export", NONE); DO_TEST("disk-drive-network-nbd-ipv6", NONE); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1524065645186188.89830710303102; Wed, 18 Apr 2018 08:34:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3D4885A04; Wed, 18 Apr 2018 15:34:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54C8881F06; Wed, 18 Apr 2018 15:34:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C81CA180215F; Wed, 18 Apr 2018 15:34:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXq4p009082 for ; Wed, 18 Apr 2018 11:33:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id C1B251134CD2; Wed, 18 Apr 2018 15:33:52 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 485FD1134CCD; Wed, 18 Apr 2018 15:33:52 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:37 +0200 Message-Id: <0cf187f06422a1935f4abb8c3ad41bda27197f26.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 6/7] qemu: caps: Add capability for 'write-cache' parameter of disk frontends X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 18 Apr 2018 15:34:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" QEMU translates the cache mode of a disk internally into 3 flags. 'write-cache' is a flag of the frontend while others are flag of the backing storage. Add capability which will allow expressing it via the frontend attribute. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 18 files changed, 22 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 42248dd19a..ad387e698c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -472,6 +472,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 290 */ "query-cpus-fast", + "disk-write-cache", ); @@ -1118,6 +1119,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsVirtioBlk[] =3D { { "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY }, { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM }, { "ats", QEMU_CAPS_VIRTIO_PCI_ATS }, + { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioNet[] =3D= { @@ -1155,11 +1157,13 @@ static struct virQEMUCapsStringFlags virQEMUCapsObj= ectPropsSCSIDisk[] =3D { { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL }, { "wwn", QEMU_CAPS_SCSI_DISK_WWN }, { "share-rw", QEMU_CAPS_DISK_SHARE_RW }, + { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIDEDrive[] =3D { { "wwn", QEMU_CAPS_IDE_DRIVE_WWN }, { "share-rw", QEMU_CAPS_DISK_SHARE_RW }, + { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsPiix4PM[] =3D { @@ -1191,6 +1195,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsQ35PCIHost[] =3D { static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsUSBStorage[] = =3D { { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE }, { "share-rw", QEMU_CAPS_DISK_SHARE_RW }, + { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsKVMPit[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3962c9c443..f08cfc2611 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -456,6 +456,7 @@ typedef enum { /* 290 */ QEMU_CAPS_QUERY_CPUS_FAST, /* query-cpus-fast command */ + QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cach= e param */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.10.0.aarch64.xml index 88616e57f0..527b425dee 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.aarch64.xml @@ -152,6 +152,7 @@ + 2010000 0 303541 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.ppc64.xml index 91f80a277f..3ac6be2d88 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -151,6 +151,7 @@ + 2010000 0 382824 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.s390x.xml index c599b66f56..b682d36c93 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml @@ -112,6 +112,7 @@ + 2010000 0 303326 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.10.0.x86_64.xml index 9e95b68457..8dd30ccbcf 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -195,6 +195,7 @@ + 2010000 0 344938 diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index eb6ae2f39e..6dd392502e 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -117,6 +117,7 @@ + 2011000 0 342058 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index d50a440776..31c5d0dd23 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -156,6 +156,7 @@ + 2011090 0 342346 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index c4cdd248b0..7dead4a1f4 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -153,6 +153,7 @@ + 2011090 0 419215 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index 122801dd30..70ae8f91c7 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -118,6 +118,7 @@ + 2011090 0 0 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 37c9243a58..d809a78380 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -194,6 +194,7 @@ + 2011090 0 390060 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.7.0.s390x.xml index a585af453c..34eed23694 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml @@ -102,6 +102,7 @@ + 2007000 0 216732 diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.7.0.x86_64.xml index 55c121c596..ee4b25d7fd 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml @@ -175,6 +175,7 @@ + 2007000 0 239029 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.8.0.s390x.xml index 1ac60bb403..21046c0546 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -104,6 +104,7 @@ + 2007093 0 241633 diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.8.0.x86_64.xml index 831a768977..c4801ac23a 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -177,6 +177,7 @@ + 2008000 0 255684 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.ppc64.xml index 4998edf7a0..73f42a7392 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml @@ -143,6 +143,7 @@ + 2009000 0 346538 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.9.0.s390x.xml index d29994bbfd..30fce6ecf1 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml @@ -107,6 +107,7 @@ + 2009000 0 265051 diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index d813a96a13..e1dc257a75 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -190,6 +190,7 @@ + 2009000 0 320947 --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 23:38:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152406570419315.183810237009766; Wed, 18 Apr 2018 08:35:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7BF3D3142282; Wed, 18 Apr 2018 15:35:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F9307D660; Wed, 18 Apr 2018 15:35:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BA0B5180596E; Wed, 18 Apr 2018 15:35:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3IFXr2Q009092 for ; Wed, 18 Apr 2018 11:33:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 82BD71134CD3; Wed, 18 Apr 2018 15:33:53 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 091A31134CCD; Wed, 18 Apr 2018 15:33:52 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 18 Apr 2018 17:33:38 +0200 Message-Id: <713ca5060d78377729df3feafa630ff64b97943d.1524065411.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v3 7/7] qemu: Format 'write-cache' parameter for disk frontends X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 18 Apr 2018 15:35:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The disk cache mode translates to various frontend and backend attributes for the qemu block layer. For the frontend device the 'writeback' parameter is used and provided as 'write-cache'. Implement this so that we can later switch to using -blockdev where we will not pass the cachemode directly any more. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_command.c | 27 ++++++++++++++++++= ++++ .../disk-drive-write-cache.x86_64-2.7.0.args | 10 ++++---- .../disk-drive-write-cache.x86_64-latest.args | 10 ++++---- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 238c6ed620..b666f3715f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1824,6 +1824,30 @@ qemuCheckIOThreads(const virDomainDef *def, } +static int +qemuBuildDriveDevCacheStr(virDomainDiskDefPtr disk, + virBufferPtr buf, + virQEMUCapsPtr qemuCaps) +{ + bool wb; + + if (disk->cachemode =3D=3D VIR_DOMAIN_DISK_CACHE_DEFAULT) + return 0; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_WRITE_CACHE)) + return 0; + + if (qemuDomainDiskCachemodeFlags(disk->cachemode, &wb, NULL, NULL) < 0) + return -1; + + virBufferStrcat(buf, ",write-cache=3D", + virTristateSwitchTypeToString(virTristateSwitchFromBoo= l(wb)), + NULL); + + return 0; +} + + char * qemuBuildDriveDevStr(const virDomainDef *def, virDomainDiskDefPtr disk, @@ -2140,6 +2164,9 @@ qemuBuildDriveDevStr(const virDomainDef *def, } } + if (qemuBuildDriveDevCacheStr(disk, &opt, qemuCaps) < 0) + goto error; + if (virBufferCheckError(&opt) < 0) goto error; diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.arg= s b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.args index 9af27dbbaf..7b67f4369c 100644 --- a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.args +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-2.7.0.args @@ -28,16 +28,18 @@ server,nowait \ -device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x2 \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dwriteback \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1,\ +write-cache=3Don \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-s= csi0-0-0,\ cache=3Dnone \ --device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0 \ +-device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0,\ +write-cache=3Don \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-v= irtio-disk0,\ cache=3Dwritethrough \ -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ -id=3Dvirtio-disk0 \ +id=3Dvirtio-disk0,write-cache=3Doff \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-u= sb-disk1,\ cache=3Ddirectsync \ -device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ -removable=3Doff \ +removable=3Doff,write-cache=3Doff \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.ar= gs b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.args index b4bef87529..a63c5b7477 100644 --- a/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-drive-write-cache.x86_64-latest.args @@ -28,18 +28,20 @@ server,nowait \ -device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x2 \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-i= de0-0-0,\ cache=3Dwriteback \ --device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1,\ +write-cache=3Don \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-s= csi0-0-0,\ cache=3Dnone \ --device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0 \ +-device scsi-hd,bus=3Dscsi0.0,scsi-id=3D0,drive=3Ddrive-scsi0-0-0,id=3Dscs= i0-0-0,\ +write-cache=3Don \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-v= irtio-disk0,\ cache=3Dwritethrough \ -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,drive=3Ddrive-vir= tio-disk0,\ -id=3Dvirtio-disk0 \ +id=3Dvirtio-disk0,write-cache=3Doff \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Dqcow2,if=3Dnone,id=3Ddrive-u= sb-disk1,\ cache=3Ddirectsync \ -device usb-storage,bus=3Dusb.0,port=3D1,drive=3Ddrive-usb-disk1,id=3Dusb-= disk1,\ -removable=3Doff \ +removable=3Doff,write-cache=3Doff \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ resourcecontrol=3Ddeny \ -msg timestamp=3Don --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list