From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344166; cv=none; d=zoho.com; s=zohoarc; b=mJhIyDANNdRS446/xCKRvSL7ZzI2xPzOxGnTS6d8oX++MlFQGJua8OrALDAg/LnhI+Jls7lX45HtRiBmDweVBsarspkW2v7mdns2pPKRXj8hNOy9f9cdEfiiXpX6XNT5U9WpJSASyj00mcceRIIE26j50sGT6oetoN2tChv5GmI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344166; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ovJBzktn0ObTUcvdqXhsoWzgqdfIuUL5ySArmW9O6Kk=; b=hKWb3R4ElJP4FTd1zB4TmzBPYY9qcuSqWBXxVXSddO45xftTMzj8PP3YpaO2rB52WYNjCoqMTHjnqFH8xiY78xlk/IFJGWTT5I9RsW2NJSSQjRaFKnmMJMzL4vljpD047fz6vcxPmFA+8qzNPjGmGHrCvDpkMCmUW3RLrTAiUTs= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344166642548.4447234688865; Mon, 15 Apr 2019 09:02:46 -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 05D0C30833A1; Mon, 15 Apr 2019 16:02:45 +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 D702F5C22B; Mon, 15 Apr 2019 16:02:44 +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 8A1E83FA46; Mon, 15 Apr 2019 16:02:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2IEc002790 for ; Mon, 15 Apr 2019 12:02:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CBAE1001E89; Mon, 15 Apr 2019 16:02:18 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 156291001E75 for ; Mon, 15 Apr 2019 16:02:17 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:54 +0200 Message-Id: <865ca1c844bbf4e3cc6e136ff63db73feecd4903.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/21] tests: qemumonitorjson: Rename schema validation test cases 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-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.44]); Mon, 15 Apr 2019 16:02:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Rename DO_TEST_QAPI_SCHEMA to DO_TEST_QAPI_VALIDATE. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemumonitorjsontest.c | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 055e201611..e3d23a8800 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2840,7 +2840,7 @@ struct testQAPISchemaData { static int -testQAPISchema(const void *opaque) +testQAPISchemaValidate(const void *opaque) { const struct testQAPISchemaData *data =3D opaque; virBuffer debug =3D VIR_BUFFER_INITIALIZER; @@ -3056,42 +3056,42 @@ mymain(void) #undef DO_TEST_BLOCK_NODE_DETECT -#define DO_TEST_QAPI_SCHEMA(nme, rootquery, scc, jsonstr) \ +#define DO_TEST_QAPI_VALIDATE(nme, rootquery, scc, jsonstr) \ do { \ qapiData.name =3D nme; \ qapiData.query =3D rootquery; \ qapiData.success =3D scc; \ qapiData.json =3D jsonstr; \ - if (virTestRun("qapi schema " nme, testQAPISchema, &qapiData) < 0)\ + if (virTestRun("qapi schema validate" nme, testQAPISchemaValidate,= &qapiData) < 0)\ ret =3D -1; \ } while (0) - DO_TEST_QAPI_SCHEMA("string", "trace-event-get-state/arg-type", true, - "{\"name\":\"test\"}"); - DO_TEST_QAPI_SCHEMA("all attrs", "trace-event-get-state/arg-type", tru= e, - "{\"name\":\"test\", \"vcpu\":123}"); - DO_TEST_QAPI_SCHEMA("attr type mismatch", "trace-event-get-state/arg-t= ype", false, - "{\"name\":123}"); - DO_TEST_QAPI_SCHEMA("missing mandatory attr", "trace-event-get-state/a= rg-type", false, - "{\"vcpu\":123}"); - DO_TEST_QAPI_SCHEMA("attr name not present", "trace-event-get-state/ar= g-type", false, - "{\"name\":\"test\", \"blah\":123}"); - DO_TEST_QAPI_SCHEMA("variant", "blockdev-add/arg-type", true, - "{\"driver\":\"file\", \"filename\":\"ble\"}"); - DO_TEST_QAPI_SCHEMA("variant wrong", "blockdev-add/arg-type", false, - "{\"driver\":\"filefilefilefile\", \"filename\":\"= ble\"}"); - DO_TEST_QAPI_SCHEMA("variant missing mandatory", "blockdev-add/arg-typ= e", false, - "{\"driver\":\"file\", \"pr-manager\":\"ble\"}"); - DO_TEST_QAPI_SCHEMA("variant missing discriminator", "blockdev-add/arg= -type", false, - "{\"node-name\":\"dfgfdg\"}"); - DO_TEST_QAPI_SCHEMA("alternate 1", "blockdev-add/arg-type", true, - "{\"driver\":\"qcow2\"," - "\"file\": { \"driver\":\"file\", \"filename\":\"= ble\"}}"); - DO_TEST_QAPI_SCHEMA("alternate 2", "blockdev-add/arg-type", true, - "{\"driver\":\"qcow2\",\"file\": \"somepath\"}"); - DO_TEST_QAPI_SCHEMA("alternate 2", "blockdev-add/arg-type", false, - "{\"driver\":\"qcow2\",\"file\": 1234}"); + DO_TEST_QAPI_VALIDATE("string", "trace-event-get-state/arg-type", true, + "{\"name\":\"test\"}"); + DO_TEST_QAPI_VALIDATE("all attrs", "trace-event-get-state/arg-type", t= rue, + "{\"name\":\"test\", \"vcpu\":123}"); + DO_TEST_QAPI_VALIDATE("attr type mismatch", "trace-event-get-state/arg= -type", false, + "{\"name\":123}"); + DO_TEST_QAPI_VALIDATE("missing mandatory attr", "trace-event-get-state= /arg-type", false, + "{\"vcpu\":123}"); + DO_TEST_QAPI_VALIDATE("attr name not present", "trace-event-get-state/= arg-type", false, + "{\"name\":\"test\", \"blah\":123}"); + DO_TEST_QAPI_VALIDATE("variant", "blockdev-add/arg-type", true, + "{\"driver\":\"file\", \"filename\":\"ble\"}"); + DO_TEST_QAPI_VALIDATE("variant wrong", "blockdev-add/arg-type", false, + "{\"driver\":\"filefilefilefile\", \"filename\":= \"ble\"}"); + DO_TEST_QAPI_VALIDATE("variant missing mandatory", "blockdev-add/arg-t= ype", false, + "{\"driver\":\"file\", \"pr-manager\":\"ble\"}"); + DO_TEST_QAPI_VALIDATE("variant missing discriminator", "blockdev-add/a= rg-type", false, + "{\"node-name\":\"dfgfdg\"}"); + DO_TEST_QAPI_VALIDATE("alternate 1", "blockdev-add/arg-type", true, + "{\"driver\":\"qcow2\"," + "\"file\": { \"driver\":\"file\", \"filename\":\= "ble\"}}"); + DO_TEST_QAPI_VALIDATE("alternate 2", "blockdev-add/arg-type", true, + "{\"driver\":\"qcow2\",\"file\": \"somepath\"}"); + DO_TEST_QAPI_VALIDATE("alternate 2", "blockdev-add/arg-type", false, + "{\"driver\":\"qcow2\",\"file\": 1234}"); if (!(metaschema =3D testQEMUSchemaGetLatest()) || !(metaschemastr =3D virJSONValueToString(metaschema, false))) { @@ -3100,11 +3100,11 @@ mymain(void) goto cleanup; } - DO_TEST_QAPI_SCHEMA("schema-meta", "query-qmp-schema/ret-type", true, + DO_TEST_QAPI_VALIDATE("schema-meta", "query-qmp-schema/ret-type", true, metaschemastr); -#undef DO_TEST_QAPI_SCHEMA +#undef DO_TEST_QAPI_VALIDATE cleanup: VIR_FREE(metaschemastr); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344171; cv=none; d=zoho.com; s=zohoarc; b=h2WYfj6EEE/7ZwspKzvq6oZEvGVnzj6v/hQJkweqXIopW/sktZs3DCGtENUR4CQX2c5A9e4muw/SC5oGFfZrM/YNUT5Pef1NpdtGplPSuUMRuvZUx6RJcM6hdhejArYo2FmipCyRQXUhHQJc7oOUVRMvV1BpmJqlMh2aOEVkQJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344171; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=KmAlKsJ/iXEBnCKkMO2HiPfUez6emE5VXAjNWq4QnGM=; b=MpNhHcVn0pHvAFyb5+lS4iNeniIJuurAoyT4OE6CiuRXl9VfEyxdAeSI0refooIYjRWUfbdp9o4KDCmE3gDu3A7wyBPfPtaYB3EdbJnmLcG02dHXn4S75YSn45xXpdP34UUxKiyizQPNs2tKFqiftqsyvLbhmlJP3hYFat6lt94= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344171485226.74192826077137; Mon, 15 Apr 2019 09:02:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B34C930031BE; Mon, 15 Apr 2019 16:02: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 86C8019C79; Mon, 15 Apr 2019 16:02: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 43F17181AC90; Mon, 15 Apr 2019 16:02:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Jj8002849 for ; Mon, 15 Apr 2019 12:02:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5EED01001E75; Mon, 15 Apr 2019 16:02:19 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id DAFB51001947 for ; Mon, 15 Apr 2019 16:02:18 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:55 +0200 Message-Id: <1b165b8afb291af082f990b8cf11726ad0027e49.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/21] qemu: qapi: Use automatic memory cleanup 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-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 15 Apr 2019 16:02:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 427809e9e3..90df50ec77 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -207,7 +207,7 @@ virQEMUQAPISchemaPathGet(const char *query, virHashTablePtr schema, virJSONValuePtr *entry) { - char **elems =3D NULL; + VIR_AUTOSTRINGLIST elems =3D NULL; *entry =3D NULL; @@ -216,13 +216,11 @@ virQEMUQAPISchemaPathGet(const char *query, if (!*elems) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("malformed query st= ring")); - virStringListFree(elems); return -1; } *entry =3D virQEMUQAPISchemaTraverse(*elems, elems + 1, schema); - virStringListFree(elems); return 0; } @@ -270,21 +268,16 @@ virQEMUQAPISchemaEntryProcess(size_t pos ATTRIBUTE_UN= USED, virHashTablePtr virQEMUQAPISchemaConvert(virJSONValuePtr schemareply) { - virHashTablePtr schema; - virHashTablePtr ret =3D NULL; + VIR_AUTOPTR(virHashTable) schema =3D NULL; + VIR_AUTOPTR(virJSONValue) schemajson =3D schemareply; if (!(schema =3D virHashCreate(512, virJSONValueHashFree))) - goto cleanup; + return NULL; - if (virJSONValueArrayForeachSteal(schemareply, + if (virJSONValueArrayForeachSteal(schemajson, virQEMUQAPISchemaEntryProcess, schema) < 0) - goto cleanup; - - VIR_STEAL_PTR(ret, schema); + return NULL; - cleanup: - virJSONValueFree(schemareply); - virHashFree(schema); - return ret; + VIR_RETURN_PTR(schema); } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344174; cv=none; d=zoho.com; s=zohoarc; b=VN5Dce3CTFEvf5QgNelrKWfuQg/5dx4cDx2gCeojLj2VNNtnk7vRsUvxyOA/589P1oJKGbQnmKXNzUn/fbyPlTqLuqPOw27nB009xbF7q2oe/+3eEnbs1Yqll+6vPnneLGbjoJFZNubGsZVoWrX6TWvcRnB6V3utJqZXoZe5mXY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344174; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=J8mM2YDV7e/Ry2LxH+Mw8CJd07obWc6VaIr91nnYe14=; b=gJuUe1FqR+p6KMFdc3ZoiMxHB9yM//K39UpzduucaAT8bAXRCiIPpiCR7b+3Hk+ID9D2d8dMNWtAAYnbHBPJlKeWv2XkRt22JPjbP2GxHqnpGyzw8zyKtTqLPT8JUCP5eHdPfP2lXvcjpde2waw393xKMOs8RRX24B/PXiP1uLI= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344174136843.8549484415097; Mon, 15 Apr 2019 09:02:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6113F3092661; Mon, 15 Apr 2019 16:02:52 +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 2B93060148; Mon, 15 Apr 2019 16:02:52 +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 BE9233FA50; Mon, 15 Apr 2019 16:02:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2K8R002908 for ; Mon, 15 Apr 2019 12:02:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 311561001DE8; Mon, 15 Apr 2019 16:02:20 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC5701001947 for ; Mon, 15 Apr 2019 16:02:19 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:56 +0200 Message-Id: <9de8d79f84c1f565beb2227b513032e25621499b.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/21] tests: qemumonitorjson: Add tests for QAPI schema query 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-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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 15 Apr 2019 16:02:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" While we technically test the query strings in the qemucapabilitiestest this was done to help refactor and extend the QAPI schema query infrastructure. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemumonitorjsontest.c | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index e3d23a8800..bcd7d37b03 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2836,9 +2836,30 @@ struct testQAPISchemaData { const char *query; const char *json; bool success; + int rc; + bool replyobj; }; +static int +testQAPISchemaQuery(const void *opaque) +{ + const struct testQAPISchemaData *data =3D opaque; + virJSONValuePtr replyobj =3D NULL; + int rc; + + rc =3D virQEMUQAPISchemaPathGet(data->query, data->schema, &replyobj); + + if (data->rc !=3D rc || data->replyobj !=3D !!replyobj) { + VIR_TEST_VERBOSE("\n success: expected '%d' got '%d', replyobj: ex= pected '%d' got '%d'", + data->rc, rc, data->replyobj, !!replyobj); + return -1; + } + + return 0; +} + + static int testQAPISchemaValidate(const void *opaque) { @@ -3056,6 +3077,30 @@ mymain(void) #undef DO_TEST_BLOCK_NODE_DETECT +#define DO_TEST_QAPI_QUERY(nme, qry, scc, rplobj) \ + do { \ + qapiData.name =3D nme; \ + qapiData.query =3D qry; \ + qapiData.rc =3D scc; \ + qapiData.replyobj =3D rplobj; \ + if (virTestRun("qapi schema query" nme, testQAPISchemaQuery, &qapi= Data) < 0)\ + ret =3D -1; \ + } while (0) + + DO_TEST_QAPI_QUERY("command", "blockdev-add", 0, true); + DO_TEST_QAPI_QUERY("event", "RTC_CHANGE", 0, true); + DO_TEST_QAPI_QUERY("object property", "screendump/arg-type/device", 0,= true); + DO_TEST_QAPI_QUERY("optional property", "block-commit/arg-type/*top", = 0, true); + DO_TEST_QAPI_QUERY("variant", "blockdev-add/arg-type/+file", 0, true); + DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 0, true); + + DO_TEST_QAPI_QUERY("nonexistent command", "nonexistent", 0, false); + DO_TEST_QAPI_QUERY("nonexistent attr", "screendump/arg-type/nonexisten= t", 0, false); + DO_TEST_QAPI_QUERY("nonexistent variant", "blockdev-add/arg-type/+none= xistent", 0, false); + +#undef DO_TEST_QAPI_QUERY + + #define DO_TEST_QAPI_VALIDATE(nme, rootquery, scc, jsonstr) \ do { \ qapiData.name =3D nme; \ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344177; cv=none; d=zoho.com; s=zohoarc; b=d1J4LYz65wUhrl0YM/2pSQ6uEvRspZ+8TrSQQHN6r00HHkJK5EEV96O2uG5NGIxzeU3QpLBJW93XWaCcSM0JSr1ytyeJ82dx7QJ557JXA2haMXVWm/3tDpQnFYEFXxO6mG2mStOAwbBHsI0uCCf9iiGpQ65gVaQGDTvUMlkGtFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344177; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=zMQaqX/7VZjQhvJfvJkCOEUIFVInmnxL7ABxpI31zp0=; b=PpqGqcbsiWD+v6enzIY4e7zkywBopG+UyS5pEoZtO/pSzYf207QkbfCJWt/IwUhtyrlFzaUfNpjZ8B0+0GmKcv8h//rwSxi2Kl3n2Ugzam+jD2L7BtutVknIKQqG3GjLbIniZ/aZHt4BnY5RGTDMS1F0gJ/IT5NqGbscIEhCpRY= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155534417793825.573935819171083; Mon, 15 Apr 2019 09:02: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 0C3EEC07662A; Mon, 15 Apr 2019 16:02:56 +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 D66605C22D; Mon, 15 Apr 2019 16:02: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 919AB181B9F1; Mon, 15 Apr 2019 16:02:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2L0E002966 for ; Mon, 15 Apr 2019 12:02:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 023D21001E75; Mon, 15 Apr 2019 16:02:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7F3CE1001DE8 for ; Mon, 15 Apr 2019 16:02:20 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:57 +0200 Message-Id: <5c72b5bf467b200ec20f7adf8fcff59b5c6f9a98.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/21] qemu: qapi: Fix return value of impossible case in virQEMUQAPISchemaTraverse 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-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]); Mon, 15 Apr 2019 16:02:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The return statement after the infinite loop without a break is there to appease the compiler. Make it return NULL as it would be a failure if control flow reaches that point. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 90df50ec77..de663d4408 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -164,7 +164,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, query++; } - return base; + return NULL; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344158; cv=none; d=zoho.com; s=zohoarc; b=gQ48SSEUUS4eFAqpLC/ESkQL3F3AhW4FUprf0eUmfHEX4jX2cJGxr+tGzzhjSu5hq1YxUVFOMciQic+b81vZWjNwjUUCMRnEfVgvtUXWItrT0XmjkbUBaBVaHyqF1kCyKesyBFuywrN+k/eX2FXwkJnXnZ7bAVa/2hFbuZF1FyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344158; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=l9iRI/eyk0R3WKH9lbWKGwOPuKbLZALcGBNlTwiSJ4I=; b=EjJhPoaxAqV6BATklgww8o9Jz49Ea6f34m2T05QWGbKxNhyCCZmJlD72a/AUZb7dTwC2OfjSjtnydA9/W7Avnm8UdstqB2nvp2lgxwqCO1MMhegFwK3GaBA1wx7vgXZdH0zmbXyQwpEwmoi+FQKd5loTr2P1u9P9PeiQi4Ij8es= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15553441585201023.1750086755708; Mon, 15 Apr 2019 09:02:38 -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 6901730832CC; Mon, 15 Apr 2019 16:02:33 +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 373B5608C6; Mon, 15 Apr 2019 16:02:32 +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 D2CF63FA4A; Mon, 15 Apr 2019 16:02:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2LXL003032 for ; Mon, 15 Apr 2019 12:02:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id C79AD1001E75; Mon, 15 Apr 2019 16:02:21 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FB841001947 for ; Mon, 15 Apr 2019 16:02:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:58 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/21] qemu: qapi: Return schema entry via argument in virQEMUQAPISchemaTraverse 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-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.44]); Mon, 15 Apr 2019 16:02:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" To allow for boolean query string, let's return the queried schema entry via argument rather than a return value. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index de663d4408..7155f2d084 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -101,10 +101,11 @@ virQEMUQAPISchemaObjectGetType(const char *field, } -static virJSONValuePtr +static int virQEMUQAPISchemaTraverse(const char *baseName, char **query, - virHashTablePtr schema) + virHashTablePtr schema, + virJSONValuePtr *type) { virJSONValuePtr base; virJSONValuePtr obj; @@ -114,18 +115,20 @@ virQEMUQAPISchemaTraverse(const char *baseName, while (1) { if (!(base =3D virHashLookup(schema, baseName))) - return NULL; + return 0; - if (!*query) - return base; + if (!*query) { + *type =3D base; + return 0; + } if (!(metatype =3D virJSONValueObjectGetString(base, "meta-type"))) - return NULL; + return 0; /* flatten arrays by default */ if (STREQ(metatype, "array")) { if (!(baseName =3D virJSONValueObjectGetString(base, "element-= type"))) - return NULL; + return 0; continue; } else if (STREQ(metatype, "object")) { @@ -145,26 +148,26 @@ virQEMUQAPISchemaTraverse(const char *baseName, if (modifier =3D=3D '*' && !virJSONValueObjectHasKey(obj, "default")) - return NULL; + return 0; baseName =3D virQEMUQAPISchemaTypeFromObject(obj); } if (!baseName) - return NULL; + return 0; } else if (STREQ(metatype, "command") || STREQ(metatype, "event")) { if (!(baseName =3D virJSONValueObjectGetString(base, *query))) - return NULL; + return 0; } else { /* alternates, basic types and enums can't be entered */ - return NULL; + return 0; } query++; } - return NULL; + return 0; } @@ -219,7 +222,8 @@ virQEMUQAPISchemaPathGet(const char *query, return -1; } - *entry =3D virQEMUQAPISchemaTraverse(*elems, elems + 1, schema); + if (virQEMUQAPISchemaTraverse(elems[0], elems + 1, schema, entry) < 0) + return -1; return 0; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344161; cv=none; d=zoho.com; s=zohoarc; b=PEQEFPJ/Gk9yI+Cb4roRuIlpcVA7wdI2ffaHVz5V6thYyxgKnUhoBmdd3+4Ej2ILHu/QYB2HVRrkCRuCf+3U5j8viCDcCSwi8OZN/iJEKKhzW0GVhF1FgjWV6I0Yo3olmy6CdB3WFwIojl84oJMLMNE1c3qe0OOVspXKkOExe2w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344161; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=kY1V1lU9CY9ljk7soH5sbvoaH3sGo2hT2l9KUTF3Czg=; b=fb2Fsn6DzMWVf2xBibeqpPMzTPD8O1ZkquxOHHcmahR4G1iuy1o8yS1M+ap57wAcPiLJeReBkiDfVkz+GcNGipPZFfdyhqdnFvtsGK1ipJl+UEVJCQaal53wNISwn9DtSxvQNbBI2QNJCRZOeFY3iy7Sj/QtJQMrLHi0lXHRnJ4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155534416112316.46574423484242; Mon, 15 Apr 2019 09:02:41 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C4CF30024DC; Mon, 15 Apr 2019 16:02:34 +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 B4CDD5D9D4; Mon, 15 Apr 2019 16:02:30 +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 56D11181AC45; Mon, 15 Apr 2019 16:02:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Mxr003084 for ; Mon, 15 Apr 2019 12:02:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 996791001E89; Mon, 15 Apr 2019 16:02:22 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 218E81001E75 for ; Mon, 15 Apr 2019 16:02:21 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:01:59 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/21] qemu: qapi: Modify values returned by virQEMUQAPISchemaPathGet 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-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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 15 Apr 2019 16:02:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Return 1 if the schema entry was found optionally returning it rather than depending on the returned object. Some callers don't care which schema object belongs to the query, but rather only want to know whether it exists. Additionally this will allow introducing boolean queries for checking if enum values exist. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 26 ++++++++++---------------- tests/qemumonitorjsontest.c | 12 ++++++------ 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 7155f2d084..23cbac4405 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -118,8 +118,9 @@ virQEMUQAPISchemaTraverse(const char *baseName, return 0; if (!*query) { - *type =3D base; - return 0; + if (type) + *type =3D base; + return 1; } if (!(metatype =3D virJSONValueObjectGetString(base, "meta-type"))) @@ -175,7 +176,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, * virQEMUQAPISchemaPathGet: * @query: string specifying the required data type (see below) * @schema: hash table containing the schema data - * @entry: filled with the located schema object requested by @query + * @entry: filled with the located schema object requested by @query (opti= onal) * * Retrieves the requested schema entry specified by @query to @entry. The * @query parameter has the following syntax which is very closely tied to= the @@ -201,8 +202,8 @@ virQEMUQAPISchemaTraverse(const char *baseName, * The above types can be chained arbitrarily using slashes to construct a= ny * path into the schema tree. * - * Returns 0 on success (including if the requested schema was not found) = and - * fills @entry appropriately. On failure returns -1 and sets an appropria= te + * Returns 1 if @query was found in @schema filling @entry if non-NULL, 0 = if + * @query was not found in @schema and -1 on other errors along with an ap= propriate * error message. */ int @@ -212,7 +213,8 @@ virQEMUQAPISchemaPathGet(const char *query, { VIR_AUTOSTRINGLIST elems =3D NULL; - *entry =3D NULL; + if (entry) + *entry =3D NULL; if (!(elems =3D virStringSplit(query, "/", 0))) return -1; @@ -222,10 +224,7 @@ virQEMUQAPISchemaPathGet(const char *query, return -1; } - if (virQEMUQAPISchemaTraverse(elems[0], elems + 1, schema, entry) < 0) - return -1; - - return 0; + return virQEMUQAPISchemaTraverse(elems[0], elems + 1, schema, entry); } @@ -233,12 +232,7 @@ bool virQEMUQAPISchemaPathExists(const char *query, virHashTablePtr schema) { - virJSONValuePtr entry; - - if (virQEMUQAPISchemaPathGet(query, schema, &entry)) - return false; - - return !!entry; + return virQEMUQAPISchemaPathGet(query, schema, NULL) =3D=3D 1; } static int diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index bcd7d37b03..339ee20b29 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3087,12 +3087,12 @@ mymain(void) ret =3D -1; \ } while (0) - DO_TEST_QAPI_QUERY("command", "blockdev-add", 0, true); - DO_TEST_QAPI_QUERY("event", "RTC_CHANGE", 0, true); - DO_TEST_QAPI_QUERY("object property", "screendump/arg-type/device", 0,= true); - DO_TEST_QAPI_QUERY("optional property", "block-commit/arg-type/*top", = 0, true); - DO_TEST_QAPI_QUERY("variant", "blockdev-add/arg-type/+file", 0, true); - DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 0, true); + DO_TEST_QAPI_QUERY("command", "blockdev-add", 1, true); + DO_TEST_QAPI_QUERY("event", "RTC_CHANGE", 1, true); + DO_TEST_QAPI_QUERY("object property", "screendump/arg-type/device", 1,= true); + DO_TEST_QAPI_QUERY("optional property", "block-commit/arg-type/*top", = 1, true); + DO_TEST_QAPI_QUERY("variant", "blockdev-add/arg-type/+file", 1, true); + DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 1, true); DO_TEST_QAPI_QUERY("nonexistent command", "nonexistent", 0, false); DO_TEST_QAPI_QUERY("nonexistent attr", "screendump/arg-type/nonexisten= t", 0, false); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344166; cv=none; d=zoho.com; s=zohoarc; b=gbpcUA53tAAlEW/Xfl/dS2aZbjxVSKWlNWYZ6BDGFg+WMiAiL7unN6ef+W5pIs31WL/8OjDywY1QZ73U8BJHALNegoMbHz1At1BKXGRpfOrWbVmnIq7Fr5R+XnJMrZUdgQGLJA8zmNSFymbRke58AYjIHZvYcxeJlPBP38EsbMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344166; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=M/cYgAbUCwv7Yccna9152WRKuiZ88NTJ56AVx5vlnwI=; b=ipZLrVwk31HuEpADtVoGVSsiQrxSRKtO4GSDEd33AQSbVGqsg3n1Q+oTqt8BSyLyBMkEnKH94JZ0kzsCCMXJRbn7yWLnVIr/IzWgmytYYKkftynlrto2ajyzgkxR02Su3PTVIONkqoxZeMPmhGbxFAsOWtJCneBObY1fYLp9DgY= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15553441666801002.5295774174083; Mon, 15 Apr 2019 09:02:46 -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 F37DD87621; Mon, 15 Apr 2019 16:02:44 +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 BFFA2608C2; Mon, 15 Apr 2019 16:02:44 +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 75962181AC48; Mon, 15 Apr 2019 16:02:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2NGV003120 for ; Mon, 15 Apr 2019 12:02:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6CBE01001DE8; Mon, 15 Apr 2019 16:02:23 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id E74DC1001947 for ; Mon, 15 Apr 2019 16:02:22 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:00 +0200 Message-Id: <81f0048328c9889d3b3b18fdf94a303e12b2896f.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/21] qemu: qapi: Convert virQEMUQAPISchemaTraverse to recursive lookup 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-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.26]); Mon, 15 Apr 2019 16:02:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 88 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 23cbac4405..2652061f4e 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -107,68 +107,66 @@ virQEMUQAPISchemaTraverse(const char *baseName, virHashTablePtr schema, virJSONValuePtr *type) { - virJSONValuePtr base; + virJSONValuePtr curtype; virJSONValuePtr obj; const char *metatype; + const char *querytype =3D NULL; const char *querystr; char modifier; - while (1) { - if (!(base =3D virHashLookup(schema, baseName))) - return 0; - - if (!*query) { - if (type) - *type =3D base; - return 1; - } - - if (!(metatype =3D virJSONValueObjectGetString(base, "meta-type"))) - return 0; + if (!(curtype =3D virHashLookup(schema, baseName))) + return 0; - /* flatten arrays by default */ - if (STREQ(metatype, "array")) { - if (!(baseName =3D virJSONValueObjectGetString(base, "element-= type"))) - return 0; + if (!*query) { + if (type) + *type =3D curtype; - continue; - } else if (STREQ(metatype, "object")) { - querystr =3D *query; - modifier =3D **query; + return 1; + } - if (!c_isalpha(modifier)) - querystr++; + if (!(metatype =3D virJSONValueObjectGetString(curtype, "meta-type"))) + return 0; - if (modifier =3D=3D '+') { - baseName =3D virQEMUQAPISchemaObjectGetType("variants", - querystr, - "case", base); - } else { - obj =3D virQEMUQAPISchemaObjectGet("members", querystr, - "name", base); + /* flatten arrays by default */ + if (STREQ(metatype, "array")) { + if (!(querytype =3D virJSONValueObjectGetString(curtype, "element-= type"))) + return 0; + } else if (STREQ(metatype, "object")) { + querystr =3D *query; + modifier =3D **query; - if (modifier =3D=3D '*' && - !virJSONValueObjectHasKey(obj, "default")) - return 0; + if (!c_isalpha(modifier)) + querystr++; - baseName =3D virQEMUQAPISchemaTypeFromObject(obj); - } + if (modifier =3D=3D '+') { + querytype =3D virQEMUQAPISchemaObjectGetType("variants", + querystr, + "case", curtype); + } else { + obj =3D virQEMUQAPISchemaObjectGet("members", querystr, + "name", curtype); - if (!baseName) + if (modifier =3D=3D '*' && + !virJSONValueObjectHasKey(obj, "default")) return 0; - } else if (STREQ(metatype, "command") || - STREQ(metatype, "event")) { - if (!(baseName =3D virJSONValueObjectGetString(base, *query))) - return 0; - } else { - /* alternates, basic types and enums can't be entered */ - return 0; - } + querytype =3D virQEMUQAPISchemaTypeFromObject(obj); + } query++; + } else if (STREQ(metatype, "command") || + STREQ(metatype, "event")) { + if (!(querytype =3D virJSONValueObjectGetString(curtype, *query))) + return 0; + query++; + } else { + /* alternates, basic types and enums can't be entered */ + return 0; } - return 0; + if (!querytype) + return 0; + + return virQEMUQAPISchemaTraverse(querytype, query, schema, type); } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344172; cv=none; d=zoho.com; s=zohoarc; b=lmAroidHYi4uIZg4lyOnSsb1RuYDPPQE82bSGreNwHYvD0cb6+AFHjPNSPc/C2TBbv2J5jI+V1UgPz0P5SbjeHkru9tW0DwH7Uio8xZbBly5LzPQgD5dkyDaSktf+/NYjZDWJPveyYtKhSiEQ/4W5AyEBixonnKf5EXzr5EAhWA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344172; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=oFcvOeCch/cnH38QCQOocQqZj7VzvWqpUB8/GHOOQDQ=; b=iMhmzLo9jW1epTvPnFEBsvm7oQBMFQWo8KwbLFjfBrZdXyjiyKzfeu+yrLpMVW/OhHDCDgEV1PhvoQk8kKDFOKDdV0xSi4958T0jLBTNMK+210eFKEnHEF84DBRwYaVPwZV5raNXJgwyDF9FWWB+qBr7KgaRLTehuNYTh4LQbe4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344172711838.2546456487476; Mon, 15 Apr 2019 09:02:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B43153003BE1; Mon, 15 Apr 2019 16:02:48 +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 8E85F1001DE8; Mon, 15 Apr 2019 16:02: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 459CC3FA4B; Mon, 15 Apr 2019 16:02:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2O9r003165 for ; Mon, 15 Apr 2019 12:02:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3C58A1001E75; Mon, 15 Apr 2019 16:02:24 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8FC51001E89 for ; Mon, 15 Apr 2019 16:02:23 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:01 +0200 Message-Id: <4e88bc69be2d8700717cf555524c4c6f7cd746d5.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/21] qemu: qapi: Separate virQEMUQAPISchemaTraverse into functions by object type 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-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 15 Apr 2019 16:02:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Simplify virQEMUQAPISchemaTraverse by separating out the necessary operations for given 'meta-type' into separate functions. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 117 ++++++++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 2652061f4e..5995e5006e 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -105,68 +105,107 @@ static int virQEMUQAPISchemaTraverse(const char *baseName, char **query, virHashTablePtr schema, - virJSONValuePtr *type) + virJSONValuePtr *type); + + +static int +virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, + char **query, + virHashTablePtr schema, + virJSONValuePtr *type) { - virJSONValuePtr curtype; virJSONValuePtr obj; - const char *metatype; const char *querytype =3D NULL; - const char *querystr; - char modifier; + const char *querystr =3D *query; + char modifier =3D *querystr; + + if (!c_isalpha(modifier)) + querystr++; + + if (modifier =3D=3D '+') { + querytype =3D virQEMUQAPISchemaObjectGetType("variants", + querystr, + "case", cur); + } else { + obj =3D virQEMUQAPISchemaObjectGet("members", querystr, "name", cu= r); + + if (modifier =3D=3D '*' && + !virJSONValueObjectHasKey(obj, "default")) + return 0; + + querytype =3D virQEMUQAPISchemaTypeFromObject(obj); + } - if (!(curtype =3D virHashLookup(schema, baseName))) + return virQEMUQAPISchemaTraverse(querytype, query + 1, schema, type); +} + + +static int +virQEMUQAPISchemaTraverseArray(virJSONValuePtr cur, + char **query, + virHashTablePtr schema, + virJSONValuePtr *type) +{ + const char *querytype; + + /* arrays are just flattened by default */ + if (!(querytype =3D virJSONValueObjectGetString(cur, "element-type"))) + return 0; + + return virQEMUQAPISchemaTraverse(querytype, query, schema, type); +} + + +static int +virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, + char **query, + virHashTablePtr schema, + virJSONValuePtr *type) +{ + const char *querytype; + + if (!(querytype =3D virJSONValueObjectGetString(cur, *query))) + return 0; + + return virQEMUQAPISchemaTraverse(querytype, query + 1, schema, type); +} + + +static int +virQEMUQAPISchemaTraverse(const char *baseName, + char **query, + virHashTablePtr schema, + virJSONValuePtr *type) +{ + virJSONValuePtr cur; + const char *metatype; + + if (!(cur =3D virHashLookup(schema, baseName))) return 0; if (!*query) { if (type) - *type =3D curtype; + *type =3D cur; return 1; } - if (!(metatype =3D virJSONValueObjectGetString(curtype, "meta-type"))) + if (!(metatype =3D virJSONValueObjectGetString(cur, "meta-type"))) return 0; - /* flatten arrays by default */ if (STREQ(metatype, "array")) { - if (!(querytype =3D virJSONValueObjectGetString(curtype, "element-= type"))) - return 0; + return virQEMUQAPISchemaTraverseArray(cur, query, schema, type); } else if (STREQ(metatype, "object")) { - querystr =3D *query; - modifier =3D **query; - - if (!c_isalpha(modifier)) - querystr++; - - if (modifier =3D=3D '+') { - querytype =3D virQEMUQAPISchemaObjectGetType("variants", - querystr, - "case", curtype); - } else { - obj =3D virQEMUQAPISchemaObjectGet("members", querystr, - "name", curtype); - - if (modifier =3D=3D '*' && - !virJSONValueObjectHasKey(obj, "default")) - return 0; - - querytype =3D virQEMUQAPISchemaTypeFromObject(obj); - } - query++; + return virQEMUQAPISchemaTraverseObject(cur, query, schema, type); } else if (STREQ(metatype, "command") || STREQ(metatype, "event")) { - if (!(querytype =3D virJSONValueObjectGetString(curtype, *query))) - return 0; - query++; + return virQEMUQAPISchemaTraverseCommand(cur, query, schema, type); } else { /* alternates, basic types and enums can't be entered */ return 0; } - if (!querytype) - return 0; - - return virQEMUQAPISchemaTraverse(querytype, query, schema, type); + return 0; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344174; cv=none; d=zoho.com; s=zohoarc; b=APPKco9UTwSyEwu6jMf/8eGXthGLHPgLEmkdwb9seiV3UsFt+4aMjNI2X8mMjJOxwzclxzCtWxChBHm+ZQznDCWBRQ69y3FAWVQRX9ZF39fD2ITSHiie1fiZ8SuKvC2Z//aFDLomWy3ApxrKxMGBATJVTVcQGVGzL//jHXGatjg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344174; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=CXUkV0/RYC2j+yW/bzSmSwyn++sAILh8fwdLfnKRV+8=; b=GCkOjZsdFceTVFfteD7vp6oU3QnUlhnjeHZNqbQzP23+oAYGKp4ezz8gL6peuyxbWrsb6FPV51GOX7mSWeW7w2cRs2SEQ1TCkMZa3EU9NpqM5L3LC5xQUZnuBX+exmjZmX/EUrYm7vOiP8xjf5aQB82JnL+5utC7DAtBP+Bn69s= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344174150974.5284072568851; Mon, 15 Apr 2019 09:02:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CAC1307D933; Mon, 15 Apr 2019 16:02:52 +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 34A285D9E2; Mon, 15 Apr 2019 16:02:52 +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 D6545181B9E2; Mon, 15 Apr 2019 16:02:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2POB003209 for ; Mon, 15 Apr 2019 12:02:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0F71D1001E89; Mon, 15 Apr 2019 16:02:25 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B5A41001947 for ; Mon, 15 Apr 2019 16:02:24 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:02 +0200 Message-Id: <38178025870d94f31ad5a3ab5a4398b66f85d20a.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/21] qemu: qapi: Optimize out some helper functions 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-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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 15 Apr 2019 16:02:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" virQEMUQAPISchemaTypeFromObject and virQEMUQAPISchemaTypeFromObject can be very easily folded into virQEMUQAPISchemaTraverseObject removing the need for the helpers. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 45 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 5995e5006e..24dc340ef9 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -69,38 +69,6 @@ virQEMUQAPISchemaObjectGet(const char *field, } -static const char * -virQEMUQAPISchemaTypeFromObject(virJSONValuePtr obj) -{ - if (!obj) - return NULL; - - return virJSONValueObjectGetString(obj, "type"); -} - - -/** - * virQEMUQAPISchemaObjectGetType: - * @field: name of the object containing the requested type - * @name: name of the requested type - * @namefield: name of the object property holding @name - * @elem: QAPI schema entry JSON object - * - * Helper that selects the type of a QMP schema object member or it's vari= ant - * member. Returns the type string on success or NULL on error. - */ -static const char * -virQEMUQAPISchemaObjectGetType(const char *field, - const char *name, - const char *namefield, - virJSONValuePtr elem) -{ - virJSONValuePtr obj =3D virQEMUQAPISchemaObjectGet(field, name, namefi= eld, elem); - - return virQEMUQAPISchemaTypeFromObject(obj); -} - - static int virQEMUQAPISchemaTraverse(const char *baseName, char **query, @@ -115,7 +83,6 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, virJSONValuePtr *type) { virJSONValuePtr obj; - const char *querytype =3D NULL; const char *querystr =3D *query; char modifier =3D *querystr; @@ -123,20 +90,20 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, querystr++; if (modifier =3D=3D '+') { - querytype =3D virQEMUQAPISchemaObjectGetType("variants", - querystr, - "case", cur); + obj =3D virQEMUQAPISchemaObjectGet("variants", querystr, "case", c= ur); } else { obj =3D virQEMUQAPISchemaObjectGet("members", querystr, "name", cu= r); if (modifier =3D=3D '*' && !virJSONValueObjectHasKey(obj, "default")) return 0; - - querytype =3D virQEMUQAPISchemaTypeFromObject(obj); } - return virQEMUQAPISchemaTraverse(querytype, query + 1, schema, type); + if (!obj) + return 0; + + return virQEMUQAPISchemaTraverse(virJSONValueObjectGetString(obj, "typ= e"), + query + 1, schema, type); } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344177; cv=none; d=zoho.com; s=zohoarc; b=dTeoRmRn24V9WEuZ4XJQJR1QojOcHD0Nl1GDK1tkDhsfD9PON0yX0cwW7gjkx9J2TZJFEUUb7xgKwhXq67nWAO36p5V+rYeyqOZzCoEooQl4N4APdNWsuDK1u3/h9MWpZ/uAv47k4BDiSxTPRBLDXLQaChBAGQxU3wlO/GpR4Wc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344177; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=WJI8El+o7u+MMz3mfCx99EqGptYJ6Ns+S6QhOXhedQc=; b=OdY4qKC7pCU80p3Iy7gL4PqxMLzfWHNnSbFvh9FfEu5m8uKGybQ0mUDi2l9Gzeo+mqMLw0fww2WcftBQbrb64VwF/izg7FGsjoA6MsCM70vF6QnOgRFw4fbuoipa2XRhI8P5gqadOtcYveRlm2U/6/weYg0Zg07ELMDajxQcC9o= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344177940889.646230653953; Mon, 15 Apr 2019 09:02:57 -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 1897D307D95F; Mon, 15 Apr 2019 16:02:56 +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 DE7AF608D0; Mon, 15 Apr 2019 16:02: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 9BAA9181B9F2; Mon, 15 Apr 2019 16:02:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Phe003254 for ; Mon, 15 Apr 2019 12:02:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id D5E3B1001947; Mon, 15 Apr 2019 16:02:25 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DA441001E89 for ; Mon, 15 Apr 2019 16:02:25 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:03 +0200 Message-Id: <1df6fc31d3537213a7d675a72fb9559173360186.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/21] qemu: qapi: Convert arguments of QAPI traversal helpers to a struct 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-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.48]); Mon, 15 Apr 2019 16:02:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Create a context data type for the QAPI path rather than passing an increasing number of arguments. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 67 ++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 24dc340ef9..78b2be749e 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -69,21 +69,24 @@ virQEMUQAPISchemaObjectGet(const char *field, } +struct virQEMUQAPISchemaTraverseContext { + virHashTablePtr schema; + char **query; + virJSONValuePtr returnType; +}; + + static int virQEMUQAPISchemaTraverse(const char *baseName, - char **query, - virHashTablePtr schema, - virJSONValuePtr *type); + struct virQEMUQAPISchemaTraverseContext *ctxt); static int virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, - char **query, - virHashTablePtr schema, - virJSONValuePtr *type) + struct virQEMUQAPISchemaTraverseContext *c= txt) { virJSONValuePtr obj; - const char *querystr =3D *query; + const char *querystr =3D *ctxt->query; char modifier =3D *querystr; if (!c_isalpha(modifier)) @@ -102,16 +105,15 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, if (!obj) return 0; - return virQEMUQAPISchemaTraverse(virJSONValueObjectGetString(obj, "typ= e"), - query + 1, schema, type); + ctxt->query++; + + return virQEMUQAPISchemaTraverse(virJSONValueObjectGetString(obj, "typ= e"), ctxt); } static int virQEMUQAPISchemaTraverseArray(virJSONValuePtr cur, - char **query, - virHashTablePtr schema, - virJSONValuePtr *type) + struct virQEMUQAPISchemaTraverseContext *ct= xt) { const char *querytype; @@ -119,41 +121,37 @@ virQEMUQAPISchemaTraverseArray(virJSONValuePtr cur, if (!(querytype =3D virJSONValueObjectGetString(cur, "element-type"))) return 0; - return virQEMUQAPISchemaTraverse(querytype, query, schema, type); + return virQEMUQAPISchemaTraverse(querytype, ctxt); } static int virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, - char **query, - virHashTablePtr schema, - virJSONValuePtr *type) + struct virQEMUQAPISchemaTraverseContext *= ctxt) { const char *querytype; - if (!(querytype =3D virJSONValueObjectGetString(cur, *query))) + if (!(querytype =3D virJSONValueObjectGetString(cur, *ctxt->query))) return 0; - return virQEMUQAPISchemaTraverse(querytype, query + 1, schema, type); + ctxt->query++; + + return virQEMUQAPISchemaTraverse(querytype, ctxt); } static int virQEMUQAPISchemaTraverse(const char *baseName, - char **query, - virHashTablePtr schema, - virJSONValuePtr *type) + struct virQEMUQAPISchemaTraverseContext *ctxt) { virJSONValuePtr cur; const char *metatype; - if (!(cur =3D virHashLookup(schema, baseName))) + if (!(cur =3D virHashLookup(ctxt->schema, baseName))) return 0; - if (!*query) { - if (type) - *type =3D cur; - + if (!ctxt->query[0]) { + ctxt->returnType =3D cur; return 1; } @@ -161,12 +159,12 @@ virQEMUQAPISchemaTraverse(const char *baseName, return 0; if (STREQ(metatype, "array")) { - return virQEMUQAPISchemaTraverseArray(cur, query, schema, type); + return virQEMUQAPISchemaTraverseArray(cur, ctxt); } else if (STREQ(metatype, "object")) { - return virQEMUQAPISchemaTraverseObject(cur, query, schema, type); + return virQEMUQAPISchemaTraverseObject(cur, ctxt); } else if (STREQ(metatype, "command") || STREQ(metatype, "event")) { - return virQEMUQAPISchemaTraverseCommand(cur, query, schema, type); + return virQEMUQAPISchemaTraverseCommand(cur, ctxt); } else { /* alternates, basic types and enums can't be entered */ return 0; @@ -216,6 +214,8 @@ virQEMUQAPISchemaPathGet(const char *query, virJSONValuePtr *entry) { VIR_AUTOSTRINGLIST elems =3D NULL; + struct virQEMUQAPISchemaTraverseContext ctxt =3D { .schema =3D schema = }; + int rc; if (entry) *entry =3D NULL; @@ -228,7 +228,14 @@ virQEMUQAPISchemaPathGet(const char *query, return -1; } - return virQEMUQAPISchemaTraverse(elems[0], elems + 1, schema, entry); + ctxt.query =3D elems + 1; + + rc =3D virQEMUQAPISchemaTraverse(elems[0], &ctxt); + + if (entry) + *entry =3D ctxt.returnType; + + return rc; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344169; cv=none; d=zoho.com; s=zohoarc; b=aNMdr5yukuCtY0sncsKzYBQ9lnxVX6giI7bzMUjMO9oyR48k5Q3E2n95UKQRxYW6ruECSeRynuXEVwfg/KP1zMPdYPI5KlOlq0N5LyaF4i1fiwtJCmGCAUZJm1Sj7j+UMq5LCaZYBYOg+sXeKTQqagRaJJyEb8U1/XoOSdFodH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344169; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=X4NpKbAp9H1ARGsLSpCh40ZlmQ0uYR5aYMSnPNG4LP8=; b=ZKglA55P2WAFr+XhovmOH2UfCFxOk9xxxENZ/jGLwycu4ZIsRmTeGPaxfrc3UoAX/Hn3yfBxksZhq+OkDhAdFJpaKeaD9vtHr/czMduonhWAacoD0cWbhTe0qO9dsn+NKRN1TVFNdg72QUJhg4fnMIu4z5qgINNe5HoPaAuWt2w= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344169351693.4211000704518; Mon, 15 Apr 2019 09:02:49 -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 89A7330ADBB8; Mon, 15 Apr 2019 16:02:47 +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 61B855C1B4; Mon, 15 Apr 2019 16:02:47 +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 1EA62181AC48; Mon, 15 Apr 2019 16:02:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Q80003290 for ; Mon, 15 Apr 2019 12:02:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id A78A51001E89; Mon, 15 Apr 2019 16:02:26 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F4761001947 for ; Mon, 15 Apr 2019 16:02:26 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:04 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/21] qemu: qapi: Rename local vars in virQEMUQAPISchemaTraverseObject 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-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.47]); Mon, 15 Apr 2019 16:02:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Now that 'query' is no longer an argument we can reuse it. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 78b2be749e..ed2a4992ab 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -86,16 +86,16 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, struct virQEMUQAPISchemaTraverseContext *c= txt) { virJSONValuePtr obj; - const char *querystr =3D *ctxt->query; - char modifier =3D *querystr; + const char *query =3D *ctxt->query; + char modifier =3D *query; if (!c_isalpha(modifier)) - querystr++; + query++; if (modifier =3D=3D '+') { - obj =3D virQEMUQAPISchemaObjectGet("variants", querystr, "case", c= ur); + obj =3D virQEMUQAPISchemaObjectGet("variants", query, "case", cur); } else { - obj =3D virQEMUQAPISchemaObjectGet("members", querystr, "name", cu= r); + obj =3D virQEMUQAPISchemaObjectGet("members", query, "name", cur); if (modifier =3D=3D '*' && !virJSONValueObjectHasKey(obj, "default")) --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344182; cv=none; d=zoho.com; s=zohoarc; b=XG1wV3gQEG9SsjEeiK7ZrJuBTKYdpxOffqtL6t+gK4qJxtvVNNTq0eNsDayfKqq/YjRtIji1FMbY6Au1yUgLp7JKcBQq+Djb5L+8AgODoffvKoNeYNtF7EEmmxg13PoWxWT9BCOSLtCd9CFjYXnMzlFD3URO8UZK/4iO7BBg9B8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344182; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=R+zIQwFw/0rLrg5ccGiMAIjwX8yDorw688exdyS7xW0=; b=mqFNgeNTF5MxRsqrYM2MRucZdiKyGLMl12si4ha2j1TzCWy7i6+6lEXcJKc4fzYDc8PsbPLd3ekwYuz/BfdQV3pb72WWhIg4+NkZaDF7Ld/4hZyHTTYD6JmmTkYsrcEa5DXmnSTpJRvd48CTbpvt1cQHBck9Cbo5XJ0ZDpauDqM= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344182461259.08297203907557; Mon, 15 Apr 2019 09:03:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE43CC069B2C; Mon, 15 Apr 2019 16:03:00 +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 8BDF95D9E1; Mon, 15 Apr 2019 16:03:00 +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 45A2D181AC90; Mon, 15 Apr 2019 16:03:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Rpi003332 for ; Mon, 15 Apr 2019 12:02:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7979310A33C1; Mon, 15 Apr 2019 16:02:27 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 011111001E89 for ; Mon, 15 Apr 2019 16:02:26 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:05 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 12/21] qemu: qapi: Add helpers for virQEMUQAPISchemaTraverseContext 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-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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 15 Apr 2019 16:03:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Rather than modifying the context struct add a helpers that does this. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 46 +++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index ed2a4992ab..a03aab7f9b 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -71,11 +71,38 @@ virQEMUQAPISchemaObjectGet(const char *field, struct virQEMUQAPISchemaTraverseContext { virHashTablePtr schema; - char **query; + char **queries; virJSONValuePtr returnType; }; +static void +virQEMUQAPISchemaTraverseContextInit(struct virQEMUQAPISchemaTraverseConte= xt *ctxt, + char **queries, + virHashTablePtr schema) +{ + memset(ctxt, 0, sizeof(*ctxt)); + ctxt->schema =3D schema; + ctxt->queries =3D queries; +} + + +static const char * +virQEMUQAPISchemaTraverseContextNextQuery(struct virQEMUQAPISchemaTraverse= Context *ctxt) +{ + const char *query =3D ctxt->queries[0]; + ctxt->queries++; + return query; +} + + +static bool +virQEMUQAPISchemaTraverseContextHasNextQuery(struct virQEMUQAPISchemaTrave= rseContext *ctxt) +{ + return !!ctxt->queries[0]; +} + + static int virQEMUQAPISchemaTraverse(const char *baseName, struct virQEMUQAPISchemaTraverseContext *ctxt); @@ -86,7 +113,7 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, struct virQEMUQAPISchemaTraverseContext *c= txt) { virJSONValuePtr obj; - const char *query =3D *ctxt->query; + const char *query =3D virQEMUQAPISchemaTraverseContextNextQuery(ctxt); char modifier =3D *query; if (!c_isalpha(modifier)) @@ -105,8 +132,6 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, if (!obj) return 0; - ctxt->query++; - return virQEMUQAPISchemaTraverse(virJSONValueObjectGetString(obj, "typ= e"), ctxt); } @@ -129,13 +154,12 @@ static int virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, struct virQEMUQAPISchemaTraverseContext *= ctxt) { + const char *query =3D virQEMUQAPISchemaTraverseContextNextQuery(ctxt); const char *querytype; - if (!(querytype =3D virJSONValueObjectGetString(cur, *ctxt->query))) + if (!(querytype =3D virJSONValueObjectGetString(cur, query))) return 0; - ctxt->query++; - return virQEMUQAPISchemaTraverse(querytype, ctxt); } @@ -150,7 +174,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, if (!(cur =3D virHashLookup(ctxt->schema, baseName))) return 0; - if (!ctxt->query[0]) { + if (!virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) { ctxt->returnType =3D cur; return 1; } @@ -214,7 +238,7 @@ virQEMUQAPISchemaPathGet(const char *query, virJSONValuePtr *entry) { VIR_AUTOSTRINGLIST elems =3D NULL; - struct virQEMUQAPISchemaTraverseContext ctxt =3D { .schema =3D schema = }; + struct virQEMUQAPISchemaTraverseContext ctxt; int rc; if (entry) @@ -228,9 +252,9 @@ virQEMUQAPISchemaPathGet(const char *query, return -1; } - ctxt.query =3D elems + 1; + virQEMUQAPISchemaTraverseContextInit(&ctxt, elems, schema); - rc =3D virQEMUQAPISchemaTraverse(elems[0], &ctxt); + rc =3D virQEMUQAPISchemaTraverse(virQEMUQAPISchemaTraverseContextNextQ= uery(&ctxt), &ctxt); if (entry) *entry =3D ctxt.returnType; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344172; cv=none; d=zoho.com; s=zohoarc; b=WaC9/89ek15tdkS+faPPljTRoRFKFOYgdNMIIGC/yPRhhu5wz1joRQmTUjkU2stptIc6bBB12RZ2VGB7F6JIqvu8gGuDrDo5ds7Ngr4uZj7BcjNcxdNxxXgfWhrVDuKr5cddCrHwrnox9EDTYCZ/PVqlVKjy4NIHSM1pQMwVrHY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344172; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=i+IXQ5HVkwOkjITRS3mzcYykUWOicclDinWMc1Nnz+M=; b=eYrcGe6NYSVBU6fWWP7A86TOqPtl7upnIzPqHFSc2HMWIM4JPasBWxzQsN7dT3t/Y72hf0UQ0HTGCcl4JPUqLhpeqI2CVb6YTxS/TN0KrbTcid/03xuCVwPfhjM4sfC2lrs3Ze5XoLybjDavLQ6sbGegPetGvW51+U0xvbaDncQ= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344172844436.628302947359; Mon, 15 Apr 2019 09:02:52 -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 2B235307EA82; Mon, 15 Apr 2019 16:02: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 020CD5C22D; Mon, 15 Apr 2019 16:02: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 B3E473FA4B; Mon, 15 Apr 2019 16:02:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2STd003367 for ; Mon, 15 Apr 2019 12:02:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4A77A1001947; Mon, 15 Apr 2019 16:02:28 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id C6FE110A33C1 for ; Mon, 15 Apr 2019 16:02:27 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:06 +0200 Message-Id: <1b5f005c3d6747cad52212a549d737cf3fb50f57.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 13/21] qemu: qapi: Use declarative approach for meta-type parsers in virQEMUQAPISchemaTraverse 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-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.44]); Mon, 15 Apr 2019 16:02:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Introduce an array of callbacks for given 'meta-type' of the QAPI schema structure rather than using code to select it. This will simplify extension for the other meta-types which are not handled yet. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index a03aab7f9b..9a5becb26f 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -164,12 +164,30 @@ virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, } +typedef int (*virQEMUQAPISchemaTraverseFunc)(virJSONValuePtr cur, + struct virQEMUQAPISchemaTrave= rseContext *ctxt); + +struct virQEMUQAPISchemaTraverseMetaType { + const char *metatype; + virQEMUQAPISchemaTraverseFunc func; +}; + + +static const struct virQEMUQAPISchemaTraverseMetaType traverseMetaType[] = =3D { + { "object", virQEMUQAPISchemaTraverseObject }, + { "array", virQEMUQAPISchemaTraverseArray }, + { "command", virQEMUQAPISchemaTraverseCommand }, + { "event", virQEMUQAPISchemaTraverseCommand }, +}; + + static int virQEMUQAPISchemaTraverse(const char *baseName, struct virQEMUQAPISchemaTraverseContext *ctxt) { virJSONValuePtr cur; const char *metatype; + size_t i; if (!(cur =3D virHashLookup(ctxt->schema, baseName))) return 0; @@ -182,16 +200,9 @@ virQEMUQAPISchemaTraverse(const char *baseName, if (!(metatype =3D virJSONValueObjectGetString(cur, "meta-type"))) return 0; - if (STREQ(metatype, "array")) { - return virQEMUQAPISchemaTraverseArray(cur, ctxt); - } else if (STREQ(metatype, "object")) { - return virQEMUQAPISchemaTraverseObject(cur, ctxt); - } else if (STREQ(metatype, "command") || - STREQ(metatype, "event")) { - return virQEMUQAPISchemaTraverseCommand(cur, ctxt); - } else { - /* alternates, basic types and enums can't be entered */ - return 0; + for (i =3D 0; i < ARRAY_CARDINALITY(traverseMetaType); i++) { + if (STREQ(metatype, traverseMetaType[i].metatype)) + return traverseMetaType[i].func(cur, ctxt); } return 0; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344176; cv=none; d=zoho.com; s=zohoarc; b=gvdVYdC+9WEKWge+P6Np/2Z/KDsieRQMf1prvxIWIA7cbwYaYZb+QVLpYHIvP8l+CfI410SJwma/cVvs3h2z+z3mPD1jJNO8W/cl+PRbEnNNbb1Ly9clkJutUFJawfkWYtPYa7GuTM5dhYBpSBocNaBWZbqJ0UmMxr6lw9WPGhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344176; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OIHSfl+tAO9kwu+HRIS9roQdWCdHmxl+DZqSAXdWsgs=; b=GeDyKVYkCfugdfIQ8QCtIfXzXRa4I7azmMGEMk3Z8IwkS1IAh/NmDYoADERHi1NcOODzJK+NhQI0afg50I4cAiHvcBizea7Pz1/bqGQ8CPZyW854kSZg4L8wmknQokh7GlN9vfqIchGe8VLi84SaCoqU1t/RV+NLVXiskpApBDU= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344176747224.88603214107854; Mon, 15 Apr 2019 09:02:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0580D3092662; Mon, 15 Apr 2019 16:02: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 CC0026014E; Mon, 15 Apr 2019 16:02:54 +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 8278B181B9EC; Mon, 15 Apr 2019 16:02:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2TE1003402 for ; Mon, 15 Apr 2019 12:02:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1BFFD1001947; Mon, 15 Apr 2019 16:02:29 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9892C1001E89 for ; Mon, 15 Apr 2019 16:02:28 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:07 +0200 Message-Id: <91380eb9d7def413a0ddece62d20d4b89ef2b33f.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 14/21] qemu: qapi: Report schema and user errors for QAPI queries 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-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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 15 Apr 2019 16:02:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We treated broken schema as failure to look up given query. Treat it as a separate error instead. It is unlikely to happen though. Also prepare for possibility of user errors if query components which can't be queired deeper have following components. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 9a5becb26f..05e4922c57 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -70,6 +70,7 @@ virQEMUQAPISchemaObjectGet(const char *field, struct virQEMUQAPISchemaTraverseContext { + const char *prevquery; virHashTablePtr schema; char **queries; virJSONValuePtr returnType; @@ -90,9 +91,9 @@ virQEMUQAPISchemaTraverseContextInit(struct virQEMUQAPISc= hemaTraverseContext *ct static const char * virQEMUQAPISchemaTraverseContextNextQuery(struct virQEMUQAPISchemaTraverse= Context *ctxt) { - const char *query =3D ctxt->queries[0]; + ctxt->prevquery =3D ctxt->queries[0]; ctxt->queries++; - return query; + return ctxt->prevquery; } @@ -144,7 +145,7 @@ virQEMUQAPISchemaTraverseArray(virJSONValuePtr cur, /* arrays are just flattened by default */ if (!(querytype =3D virJSONValueObjectGetString(cur, "element-type"))) - return 0; + return -2; return virQEMUQAPISchemaTraverse(querytype, ctxt); } @@ -163,7 +164,9 @@ virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, return virQEMUQAPISchemaTraverse(querytype, ctxt); } - +/* The function must return 1 on successful query, 0 if the query was not = found + * -1 when a libvirt error is reported, -2 if the schema is invalid and -3= if + * the query component is malformed. */ typedef int (*virQEMUQAPISchemaTraverseFunc)(virJSONValuePtr cur, struct virQEMUQAPISchemaTrave= rseContext *ctxt); @@ -190,7 +193,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, size_t i; if (!(cur =3D virHashLookup(ctxt->schema, baseName))) - return 0; + return -2; if (!virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) { ctxt->returnType =3D cur; @@ -198,7 +201,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, } if (!(metatype =3D virJSONValueObjectGetString(cur, "meta-type"))) - return 0; + return -2; for (i =3D 0; i < ARRAY_CARDINALITY(traverseMetaType); i++) { if (STREQ(metatype, traverseMetaType[i].metatype)) @@ -250,6 +253,7 @@ virQEMUQAPISchemaPathGet(const char *query, { VIR_AUTOSTRINGLIST elems =3D NULL; struct virQEMUQAPISchemaTraverseContext ctxt; + const char *cmdname; int rc; if (entry) @@ -264,13 +268,30 @@ virQEMUQAPISchemaPathGet(const char *query, } virQEMUQAPISchemaTraverseContextInit(&ctxt, elems, schema); + cmdname =3D virQEMUQAPISchemaTraverseContextNextQuery(&ctxt); - rc =3D virQEMUQAPISchemaTraverse(virQEMUQAPISchemaTraverseContextNextQ= uery(&ctxt), &ctxt); + if (!virHashLookup(schema, cmdname)) + return 0; + + rc =3D virQEMUQAPISchemaTraverse(cmdname, &ctxt); if (entry) *entry =3D ctxt.returnType; - return rc; + if (rc >=3D 0) + return rc; + + if (rc =3D=3D -2) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("malformed QAPI schema when querying '%s' of '%s'= "), + NULLSTR(ctxt.prevquery), query); + } else if (rc =3D=3D -3) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("terminal QAPI query component '%s' of '%s' must = not have followers"), + NULLSTR(ctxt.prevquery), query); + } + + return -1; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344186; cv=none; d=zoho.com; s=zohoarc; b=gmnCjlVImY6KBY1FYEp8HqXDIeQR/5SrTlr0W97Ev77reHYrh1RZaEaNzARUhonCapLjp0/GtbwQRhWn9ORJ627CjKWlMUu2c0K36g90lcx9iAu+jmn7o4yh2+s99Mhl/DStHOCwI0P/7tI3fV357gLcvzQz+9DqAf+dbo+hOFE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344186; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=AE3bWcMrVvmaBT64l6f29RjBAy0tcOvZIQWE055ui4U=; b=W9CPgicrd3HZQKlrtqWM0qCp+miLPrq1jvKuHCFUYW/E0sgB3hZL+gZJacpkdW90bD0XYVEgJ++BClZ8CJ7qFnMpC5I1KPzTPESTq61RFYfS8yzauSwjyboeFHcoeammM+AoUS6z9HQ6AXnmhS4KiObcYZeizAG1Sq14lxtFTHs= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344186887799.9171355279474; Mon, 15 Apr 2019 09:03:06 -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 E7243313D664; Mon, 15 Apr 2019 16:03:04 +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 B66BD5D71C; Mon, 15 Apr 2019 16:03:04 +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 6ECC93FB13; Mon, 15 Apr 2019 16:03:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2TYt003438 for ; Mon, 15 Apr 2019 12:02:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id E1FD31001E75; Mon, 15 Apr 2019 16:02:29 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69EA51001947 for ; Mon, 15 Apr 2019 16:02:29 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:08 +0200 Message-Id: <13e00c2a3cdaee3ce8bb30e13f850aa6b400acec.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 15/21] qemu: qapi: Prepare for extension of virQEMUQAPISchemaPathGet docs 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-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.49]); Mon, 15 Apr 2019 16:03:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Prepare section for boolean queries and make the typed query section more clear. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 05e4922c57..f17a162434 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -222,16 +222,24 @@ virQEMUQAPISchemaTraverse(const char *baseName, * @query parameter has the following syntax which is very closely tied to= the * qemu schema syntax entries separated by slashes with a few special char= acters: * - * "command_or_event/attribute/subattribute/+variant_discriminator/subattr= ibute" + * "command_or_event/attribute/subattribute/subattribute/..." * * command_or_event: name of the event or attribute to introspect * attribute: selects whether arguments or return type should be introspec= ted * ("arg-type" or "ret-type" for commands, "arg-type" for event= s) - * subattribute: specifies member name of object types - * *subattribute: same as above but must be optional (has a property named - * 'default' field in the schema) - * +variant_discriminator: In the case of unionized objects, select a - * specific case to introspect. + * + * 'subattribute' may be one or more of the following depending on the fir= st + * character. + * + * - Type queries - @entry is filled on success with the corresponding sch= ema entry: + * 'subattribute': selects a plain object member named 'subattribute' + * '*subattribute': same as above but the selected member must be option= al + * (has a property named 'default' in the schema) + * '+variant": In the case of unionized objects, select a specific varia= nt of + * the prevously selected member + * + * - Boolean queries - @entry remains NULL, return value indicates success: + * (none) * * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. @@ -240,7 +248,8 @@ virQEMUQAPISchemaTraverse(const char *baseName, * types are currently not supported. * * The above types can be chained arbitrarily using slashes to construct a= ny - * path into the schema tree. + * path into the schema tree, booleans must be always the last component a= s they + * don't refer to a type. * * Returns 1 if @query was found in @schema filling @entry if non-NULL, 0 = if * @query was not found in @schema and -1 on other errors along with an ap= propriate --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344180; cv=none; d=zoho.com; s=zohoarc; b=ma7Bdij1U813sF5Q5jLrLqLiIASiFgZXeNhqT5/jCTw1QmdpiHDbxL6UzsaJpIvHrBCJ5R3Am3atTdVkJ9F7LZ2eSfNG9/hkzpMnYALmfx/ZkibNgWVV5dM/tu6/+7Y3Lk+2rx5k/T7c+pEzpvYdarCJyx+cka3gwgWODjOEDYo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344180; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=19ZQ5kl1JiAQQAPAibYwZz/bbUXqcZWhvGBElBXuXQI=; b=TMINfPLQ24EKk8mP/UK9DQiPjQo8kjMGPEskorrIFCnkj+48G8aSIwtM4vUonLjMKZC8E++drz+lhYwhnipNcoclfIbn3WLoCq/4fvEY12mxCG08mNoL3KsKmvP4ush6hF0MQRBj54KfmyxQsaJc7c9CGze105dJv6jUjQKGoa4= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344180217205.90177768972273; Mon, 15 Apr 2019 09:03:00 -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 9766430A9CC8; Mon, 15 Apr 2019 16:02:58 +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 660485D71C; Mon, 15 Apr 2019 16:02:58 +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 2B1A93FA50; Mon, 15 Apr 2019 16:02:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2UHo003475 for ; Mon, 15 Apr 2019 12:02:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id B37601001947; Mon, 15 Apr 2019 16:02:30 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C1491001E75 for ; Mon, 15 Apr 2019 16:02:30 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:09 +0200 Message-Id: <4fd6af98e04245b2e4005fe2bced3602e90cdf13.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 16/21] qemu: qapi: Implement worker for introspecting enums 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-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.40]); Mon, 15 Apr 2019 16:02:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 42 ++++++++++++++++++++++++++++++++++++- tests/qemumonitorjsontest.c | 3 +++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index f17a162434..8a695e022d 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -120,6 +120,10 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, if (!c_isalpha(modifier)) query++; + /* exit on modifers for other types */ + if (modifier =3D=3D '^') + return 0; + if (modifier =3D=3D '+') { obj =3D virQEMUQAPISchemaObjectGet("variants", query, "case", cur); } else { @@ -164,6 +168,41 @@ virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, return virQEMUQAPISchemaTraverse(querytype, ctxt); } + +static int +virQEMUQAPISchemaTraverseEnum(virJSONValuePtr cur, + struct virQEMUQAPISchemaTraverseContext *ctx= t) +{ + const char *query =3D virQEMUQAPISchemaTraverseContextNextQuery(ctxt); + virJSONValuePtr values; + virJSONValuePtr enumval; + const char *value; + size_t i; + + if (query[0] !=3D '^') + return 0; + + if (virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) + return -3; + + query++; + + if (!(values =3D virJSONValueObjectGetArray(cur, "values"))) + return -2; + + for (i =3D 0; i < virJSONValueArraySize(values); i++) { + if (!(enumval =3D virJSONValueArrayGet(values, i)) || + !(value =3D virJSONValueGetString(enumval))) + continue; + + if (STREQ(value, query)) + return 1; + } + + return 0; +} + + /* The function must return 1 on successful query, 0 if the query was not = found * -1 when a libvirt error is reported, -2 if the schema is invalid and -3= if * the query component is malformed. */ @@ -181,6 +220,7 @@ static const struct virQEMUQAPISchemaTraverseMetaType t= raverseMetaType[] =3D { { "array", virQEMUQAPISchemaTraverseArray }, { "command", virQEMUQAPISchemaTraverseCommand }, { "event", virQEMUQAPISchemaTraverseCommand }, + { "enum", virQEMUQAPISchemaTraverseEnum }, }; @@ -239,7 +279,7 @@ virQEMUQAPISchemaTraverse(const char *baseName, * the prevously selected member * * - Boolean queries - @entry remains NULL, return value indicates success: - * (none) + * '^enumval': returns true if the previously selected enum contains 'en= umval' * * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 339ee20b29..1c8ecead98 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3093,10 +3093,13 @@ mymain(void) DO_TEST_QAPI_QUERY("optional property", "block-commit/arg-type/*top", = 1, true); DO_TEST_QAPI_QUERY("variant", "blockdev-add/arg-type/+file", 1, true); DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 1, true); + DO_TEST_QAPI_QUERY("enum value", "query-status/ret-type/status/^debug"= , 1, false); DO_TEST_QAPI_QUERY("nonexistent command", "nonexistent", 0, false); DO_TEST_QAPI_QUERY("nonexistent attr", "screendump/arg-type/nonexisten= t", 0, false); DO_TEST_QAPI_QUERY("nonexistent variant", "blockdev-add/arg-type/+none= xistent", 0, false); + DO_TEST_QAPI_QUERY("nonexistent enum value", "query-status/ret-type/st= atus/^nonexistentdebug", 0, false); + DO_TEST_QAPI_QUERY("broken query for enum value", "query-status/ret-ty= pe/status/^debug/test", -1, false); #undef DO_TEST_QAPI_QUERY --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344190; cv=none; d=zoho.com; s=zohoarc; b=WImP2JiE94bACTitEeEhyb4l+HHAzuRcFz+yJza7a7rGEcrlJ+/sR7MO2CMkkzXartjDDIU7Cd0hEAhV9Pm/rBg0kybmshdvOKAiZDZXHIQULe5BxOA5gdfOK8rlllZkkfJ4QV+/h6WMqsiEfPpXc1ZEYyD2cKizArWzOMLlu+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344190; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=arlCDOCu+cdruunxzDTKKDFSMPqIShS0XhR6D8haUrU=; b=FKq/p/kf0D/J08OABZvAOSSPfU4Lu5z4sRN6zIO+CYEgxIXSA0FuIf+OCY3yXcUQVLPmn7gT0TCjBTg2aLNgOTbdV5rLIv4HDXQiehU65bNyLkyaa/YpydfohJIhHD8X4E4Ea0hCjhdfIbaGtriDk/H8NDgD3HJfStMTKkaYmZA= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344190867861.5309448029527; Mon, 15 Apr 2019 09:03:10 -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 B7F0581E15; Mon, 15 Apr 2019 16:03:08 +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 80C9E5D71C; Mon, 15 Apr 2019 16:03:08 +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 27711181B9F1; Mon, 15 Apr 2019 16:03:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2VFO003511 for ; Mon, 15 Apr 2019 12:02:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 860861001E89; Mon, 15 Apr 2019 16:02:31 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EB331001947 for ; Mon, 15 Apr 2019 16:02:30 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:10 +0200 Message-Id: <3c6d14af002b1b62501d0985d86be602ee745d3c.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 17/21] qemu: qapi: Implement worker for introspecting builtin types 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-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.25]); Mon, 15 Apr 2019 16:03:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 31 ++++++++++++++++++++++++++++++- tests/qemumonitorjsontest.c | 2 ++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 8a695e022d..d401e9a303 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -121,7 +121,7 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, query++; /* exit on modifers for other types */ - if (modifier =3D=3D '^') + if (modifier =3D=3D '^' || modifier =3D=3D '!') return 0; if (modifier =3D=3D '+') { @@ -203,6 +203,31 @@ virQEMUQAPISchemaTraverseEnum(virJSONValuePtr cur, } +static int +virQEMUQAPISchemaTraverseBuiltin(virJSONValuePtr cur, + struct virQEMUQAPISchemaTraverseContext *= ctxt) +{ + const char *query =3D virQEMUQAPISchemaTraverseContextNextQuery(ctxt); + const char *jsontype; + + if (query[0] !=3D '!') + return 0; + + if (virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) + return -3; + + query++; + + if (!(jsontype =3D virJSONValueObjectGetString(cur, "json-type"))) + return -1; + + if (STREQ(jsontype, query)) + return 1; + + return 0; +} + + /* The function must return 1 on successful query, 0 if the query was not = found * -1 when a libvirt error is reported, -2 if the schema is invalid and -3= if * the query component is malformed. */ @@ -221,6 +246,7 @@ static const struct virQEMUQAPISchemaTraverseMetaType t= raverseMetaType[] =3D { { "command", virQEMUQAPISchemaTraverseCommand }, { "event", virQEMUQAPISchemaTraverseCommand }, { "enum", virQEMUQAPISchemaTraverseEnum }, + { "builtin", virQEMUQAPISchemaTraverseBuiltin }, }; @@ -280,6 +306,9 @@ virQEMUQAPISchemaTraverse(const char *baseName, * * - Boolean queries - @entry remains NULL, return value indicates success: * '^enumval': returns true if the previously selected enum contains 'en= umval' + * '!basictype': returns true if previously selected type is of 'basicty= pe' + * JSON type. Spported are 'null', 'string', 'number', 'va= lue', + * 'int' and 'boolean. * * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 1c8ecead98..ece42aee0b 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3094,12 +3094,14 @@ mymain(void) DO_TEST_QAPI_QUERY("variant", "blockdev-add/arg-type/+file", 1, true); DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 1, true); DO_TEST_QAPI_QUERY("enum value", "query-status/ret-type/status/^debug"= , 1, false); + DO_TEST_QAPI_QUERY("builtin type", "query-qmp-schema/ret-type/name/!st= ring", 1, false); DO_TEST_QAPI_QUERY("nonexistent command", "nonexistent", 0, false); DO_TEST_QAPI_QUERY("nonexistent attr", "screendump/arg-type/nonexisten= t", 0, false); DO_TEST_QAPI_QUERY("nonexistent variant", "blockdev-add/arg-type/+none= xistent", 0, false); DO_TEST_QAPI_QUERY("nonexistent enum value", "query-status/ret-type/st= atus/^nonexistentdebug", 0, false); DO_TEST_QAPI_QUERY("broken query for enum value", "query-status/ret-ty= pe/status/^debug/test", -1, false); + DO_TEST_QAPI_QUERY("builtin type", "query-qmp-schema/ret-type/name/!nu= mber", 0, false); #undef DO_TEST_QAPI_QUERY --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344182; cv=none; d=zoho.com; s=zohoarc; b=KOUkdJpxcMvz6T209N5PAExxuDht8f8/zVzsSj4Phh0OKlbCKuFP2oUAiabDah6DnuoEPG/JO20czAbV1ULNTiJm5pBbgqvRj3yIv3Am2PxoRWkzF+q6Y6g5ry6tHZwWSGXWw8pbGDuVnHqtkXHe0MsGktfttNSfoWoHJgTbRVc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344182; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=N/PHh73IBq4jVqnpBsKr4rl8+pdsyQKS2WZZ1D85FM4=; b=lnhhMTpsk3KEJdkJ1YhIvItvaH5kRo5cseoIbpyS10f+GogianyT87zdLxviu2H9P+G0k+fBYlUXbw98q46+ORGRocBJcqqj9egxIr5QndKS88vConxgGaGRBqwqUhtV13roN8FNAjdwhbgw+IBlC8pUFn/ExQb6MX/4OaOpKTQ= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155534418217973.84408441869755; Mon, 15 Apr 2019 09:03:02 -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 6343986678; Mon, 15 Apr 2019 16:03:00 +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 37D365D71A; Mon, 15 Apr 2019 16:03:00 +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 A142A3FAF6; Mon, 15 Apr 2019 16:02:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2W06003544 for ; Mon, 15 Apr 2019 12:02:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 58EA81001947; Mon, 15 Apr 2019 16:02:32 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id D56C41001E75 for ; Mon, 15 Apr 2019 16:02:31 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:11 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/21] qemu: qapi: Implement worker for introspecting alternate types 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-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.26]); Mon, 15 Apr 2019 16:03:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 34 ++++++++++++++++++++++++++++++++-- tests/qemumonitorjsontest.c | 3 +++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index d401e9a303..4ed67b68bc 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -228,6 +228,35 @@ virQEMUQAPISchemaTraverseBuiltin(virJSONValuePtr cur, } +static int +virQEMUQAPISchemaTraverseAlternate(virJSONValuePtr cur, + struct virQEMUQAPISchemaTraverseContext= *ctxt) +{ + struct virQEMUQAPISchemaTraverseContext savectxt =3D *ctxt; + virJSONValuePtr members; + virJSONValuePtr member; + const char *membertype; + int rc; + size_t i; + + if (!(members =3D virJSONValueObjectGetArray(cur, "members"))) + return -2; + + for (i =3D 0; i < virJSONValueArraySize(members); i++) { + if (!(member =3D virJSONValueArrayGet(members, i)) || + !(membertype =3D virJSONValueObjectGetString(member, "type"))) + continue; + + *ctxt =3D savectxt; + + if ((rc =3D virQEMUQAPISchemaTraverse(membertype, ctxt)) !=3D 0) + return rc; + } + + return 0; +} + + /* The function must return 1 on successful query, 0 if the query was not = found * -1 when a libvirt error is reported, -2 if the schema is invalid and -3= if * the query component is malformed. */ @@ -247,6 +276,7 @@ static const struct virQEMUQAPISchemaTraverseMetaType t= raverseMetaType[] =3D { { "event", virQEMUQAPISchemaTraverseCommand }, { "enum", virQEMUQAPISchemaTraverseEnum }, { "builtin", virQEMUQAPISchemaTraverseBuiltin }, + { "alternate", virQEMUQAPISchemaTraverseAlternate }, }; @@ -313,8 +343,8 @@ virQEMUQAPISchemaTraverse(const char *baseName, * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. * - * Array types are automatically flattened to the singular type. Alternate - * types are currently not supported. + * Array types are automatically flattened to the singular type. Alternate= s are + * iterated until first success. * * The above types can be chained arbitrarily using slashes to construct a= ny * path into the schema tree, booleans must be always the last component a= s they diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index ece42aee0b..a25c0ff55b 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -3095,6 +3095,9 @@ mymain(void) DO_TEST_QAPI_QUERY("variant property", "blockdev-add/arg-type/+file/fi= lename", 1, true); DO_TEST_QAPI_QUERY("enum value", "query-status/ret-type/status/^debug"= , 1, false); DO_TEST_QAPI_QUERY("builtin type", "query-qmp-schema/ret-type/name/!st= ring", 1, false); + DO_TEST_QAPI_QUERY("alternate variant 1", "blockdev-add/arg-type/+qcow= 2/backing/!null", 1, false); + DO_TEST_QAPI_QUERY("alternate variant 2", "blockdev-add/arg-type/+qcow= 2/backing/!string", 1, false); + DO_TEST_QAPI_QUERY("alternate variant 3", "blockdev-add/arg-type/+qcow= 2/backing/+file/filename", 1, true); DO_TEST_QAPI_QUERY("nonexistent command", "nonexistent", 0, false); DO_TEST_QAPI_QUERY("nonexistent attr", "screendump/arg-type/nonexisten= t", 0, false); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344185; cv=none; d=zoho.com; s=zohoarc; b=W1WVZbhS0QWu1+rPfzf8TAJkrm0VdEnEtaTxUHtDq/0jRYkhg9M4b+5kZedMIR4JKZd7YTAUAHV6IDBomKfKOIdzsUTzSjPQnu96yAr/HK/waVeS6dyPMzn8w88vSlSgOPekoLlBnAVCSOzOXZQyy1if3k9Ww5Jdkh9n/WK2LNw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344185; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=GIZBtr0oyOPyBAZi8rwQomtaF0IcsNiHQoz3mr0zzJA=; b=kSJ0nfvEgHR+f/BXKNfc13GYP8YD5l94a8D2gahnng4vzjvrI6ZcmXzj/MwIKigP8RcFROzkLy9u1XlPjBuzrKeOnEjk6NdkDdwY+/O8Y451itpoaP9ZIDhvYUCC6CxmCUZ/BXs6PV0e2UoFRd2u0MZvlCqFaiRaxaBo035mLRU= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344185799128.94292312533457; Mon, 15 Apr 2019 09:03:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C1C8307D867; Mon, 15 Apr 2019 16:03:04 +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 F35BD6014E; Mon, 15 Apr 2019 16:03: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 B10A1181B9E2; Mon, 15 Apr 2019 16:03:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2Xcx003578 for ; Mon, 15 Apr 2019 12:02:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2B1A31001E75; Mon, 15 Apr 2019 16:02:33 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id A76AF1001947 for ; Mon, 15 Apr 2019 16:02:32 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:12 +0200 Message-Id: <30dd3e4fd3c3f784cade3e6594959cd049c93c9c.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 19/21] qemu: qapi: Implement support for 'features' 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-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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 15 Apr 2019 16:03:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Starting from version 4.1 qemu allows reporting 'features' for a given QAPI type object. This allows reporting support of fixes and additions which are otherwise invisible in the QAPI schema. Implement a possibility to query 'features' in the QAPI query strings. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_qapi.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 4ed67b68bc..5e6dab4417 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -109,6 +109,38 @@ virQEMUQAPISchemaTraverse(const char *baseName, struct virQEMUQAPISchemaTraverseContext *ctxt); +/** + * @featurename: name of 'feature' field to select + * @elem: QAPI JSON entry for a type + * + * Looks for @featurename in the array of 'features' for given type passed= in + * via @elem. Returns the pointer to the JSON string representing @feature. + */ +static int +virQEMUQAPISchemaTraverseHasObjectFeature(const char *featurename, + virJSONValuePtr elem) +{ + virJSONValuePtr featuresarray; + virJSONValuePtr cur; + const char *curstr; + size_t i; + + if (!(featuresarray =3D virJSONValueObjectGetArray(elem, "features"))) + return 0; + + for (i =3D 0; i < virJSONValueArraySize(featuresarray); i++) { + if (!(cur =3D virJSONValueArrayGet(featuresarray, i)) || + !(curstr =3D virJSONValueGetString(cur))) + return -2; + + if (STREQ(featurename, curstr)) + return 1; + } + + return 0; +} + + static int virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, struct virQEMUQAPISchemaTraverseContext *c= txt) @@ -124,6 +156,13 @@ virQEMUQAPISchemaTraverseObject(virJSONValuePtr cur, if (modifier =3D=3D '^' || modifier =3D=3D '!') return 0; + if (modifier =3D=3D '$') { + if (virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) + return -3; + + return virQEMUQAPISchemaTraverseHasObjectFeature(query, cur); + } + if (modifier =3D=3D '+') { obj =3D virQEMUQAPISchemaObjectGet("variants", query, "case", cur); } else { @@ -339,6 +378,8 @@ virQEMUQAPISchemaTraverse(const char *baseName, * '!basictype': returns true if previously selected type is of 'basicty= pe' * JSON type. Spported are 'null', 'string', 'number', 'va= lue', * 'int' and 'boolean. + * '$feature': returns true if the previously selected type supports 'fe= ature' + * ('feature' is in the 'features' array of given type) * * If the name of any (sub)attribute starts with non-alphabetical symbols = it * needs to be prefixed by a single space. --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344195; cv=none; d=zoho.com; s=zohoarc; b=m6XjOHslnOskvAxkxUQI0DHeFi6Hc2aWBviy3Xo5M0RHGBX8+qk1jyI5gog9y0xVRQ/ZNTAaIfMWKQcx0WUAFMAF036ZYQ75jgiARCA44ZeTl4JhNrF+S16KwylDcV+0wCQTScHvzfZiZ2fN2R6fbnjJwpTDRip27kpHb9kLB28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344195; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=plZ4fzpZiydrdiD4lrcXstVwC0pMLdzRIy5NHTJYn74=; b=ZsmUcwIRl2Wk7AmimgpTe8MdiLIVlD31MAyrIVL5+8nsbGLLITw7Z/BJnbB6SGN2SwmUdgqdYtoCWV95r8HLrMwsJ0Mefg5Vp5vFBZekKIEnGZv2IXt9ORc39gtn5NyJKQ+S5qw2qTeOHuup93zvCwrf2UV7sJNCyQxZurj1P9E= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344195687143.075713475587; Mon, 15 Apr 2019 09:03:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B30193DE0B; Mon, 15 Apr 2019 16:03:13 +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 8766060C4D; Mon, 15 Apr 2019 16:03:13 +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 3E888181BA06; Mon, 15 Apr 2019 16:03:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2bPW003737 for ; Mon, 15 Apr 2019 12:02:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D5E81001E8C; Mon, 15 Apr 2019 16:02:37 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA2241001E89 for ; Mon, 15 Apr 2019 16:02:33 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:13 +0200 Message-Id: <216508a74bed7db0919d9698524ecd82f88cc2ac.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 20/21] DO NOT PUSH: bump capabilities to 4.0.0 + patches 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-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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 15 Apr 2019 16:03:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" --- .../qemu_4.0.0.x86_64.xml | 2 +- .../caps_4.0.0.x86_64.replies | 3167 +++++++++-------- .../caps_4.0.0.x86_64.xml | 26 +- 3 files changed, 1677 insertions(+), 1518 deletions(-) diff --git a/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml b/tests/domai= ncapsschemadata/qemu_4.0.0.x86_64.xml index 42d8949e61..cba841d844 100644 --- a/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml +++ b/tests/domaincapsschemadata/qemu_4.0.0.x86_64.xml @@ -33,11 +33,11 @@ Skylake-Client-IBRS Intel + - diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies b/tests/q= emucapabilitiesdata/caps_4.0.0.x86_64.replies index aa9ee38c80..f43552e19a 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.replies @@ -17,11 +17,11 @@ { "return": { "qemu": { - "micro": 50, + "micro": 92, "minor": 1, "major": 3 }, - "package": "v3.1.0-1445-ga61faa3d02" + "package": "v4.0.0-rc2-24-gbcdb5721dd" }, "id": "libvirt-2" } @@ -55,7 +55,10 @@ "name": "query-qmp-schema" }, { - "name": "set-numa-node" + "name": "query-cpu-definitions" + }, + { + "name": "query-cpu-model-expansion" }, { "name": "query-sev-capabilities" @@ -66,6 +69,12 @@ { "name": "query-sev" }, + { + "name": "rtc-reset-reinjection" + }, + { + "name": "set-numa-node" + }, { "name": "query-vm-generation-id" }, @@ -75,9 +84,6 @@ { "name": "xen-load-devices-state" }, - { - "name": "rtc-reset-reinjection" - }, { "name": "query-acpi-ospm-status" }, @@ -102,12 +108,6 @@ { "name": "add-fd" }, - { - "name": "query-cpu-model-expansion" - }, - { - "name": "query-cpu-definitions" - }, { "name": "query-memory-size-summary" }, @@ -375,6 +375,9 @@ { "name": "query-rocker" }, + { + "name": "announce-self" + }, { "name": "query-rx-filter" }, @@ -462,6 +465,9 @@ { "name": "blockdev-del" }, + { + "name": "x-blockdev-reopen" + }, { "name": "blockdev-add" }, @@ -559,7 +565,7 @@ "name": "query-block" }, { - "name": "x-block-latency-histogram-set" + "name": "block-latency-histogram-set" }, { "name": "query-jobs" @@ -1124,6 +1130,10 @@ "name": "pc-0.15-machine", "parent": "generic-pc-machine" }, + { + "name": "authz-list-file", + "parent": "authz" + }, { "name": "kvmvapic", "parent": "sys-bus-device" @@ -1168,6 +1178,10 @@ "name": "virtio-blk-device", "parent": "virtio-device" }, + { + "name": "chardev-pipe", + "parent": "chardev-fd" + }, { "name": "nvdimm", "parent": "pc-dimm" @@ -1188,10 +1202,6 @@ "name": "chardev-msmouse", "parent": "chardev" }, - { - "name": "chardev-pipe", - "parent": "chardev-fd" - }, { "name": "pc-q35-2.9-machine", "parent": "generic-pc-machine" @@ -1372,14 +1382,14 @@ "name": "Westmere-IBRS-x86_64-cpu", "parent": "x86_64-cpu" }, - { - "name": "usb-serial", - "parent": "usb-serial-dev" - }, { "name": "Cascadelake-Server-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "usb-serial", + "parent": "usb-serial-dev" + }, { "name": "vt82c686b-usb-uhci", "parent": "pci-uhci-usb" @@ -1488,6 +1498,10 @@ "name": "virtio-serial-pci-transitional", "parent": "virtio-serial-pci-base" }, + { + "name": "ati-vga", + "parent": "pci-device" + }, { "name": "pc-q35-3.0-machine", "parent": "generic-pc-machine" @@ -2060,6 +2074,10 @@ "name": "igd-passthrough-i440FX", "parent": "i440FX" }, + { + "name": "authz-pam", + "parent": "authz" + }, { "name": "colo-compare", "parent": "object" @@ -2148,6 +2166,10 @@ "name": "hda-duplex", "parent": "hda-audio" }, + { + "name": "authz-simple", + "parent": "authz" + }, { "name": "kvm32-x86_64-cpu", "parent": "x86_64-cpu" @@ -2296,6 +2318,10 @@ "name": "pc-1.3-machine", "parent": "generic-pc-machine" }, + { + "name": "authz-list", + "parent": "authz" + }, { "name": "ide-drive", "parent": "ide-device" @@ -2308,17 +2334,13 @@ "name": "pvrdma", "parent": "pci-device" }, - { - "name": "isa-pit", - "parent": "pit-common" - }, { "name": "pc-1.2-machine", "parent": "generic-pc-machine" }, { - "name": "vfio-platform", - "parent": "sys-bus-device" + "name": "isa-pit", + "parent": "pit-common" }, { "name": "pxb", @@ -2406,6 +2428,11 @@ "name": "iothread", "type": "link" }, + { + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, { "name": "request-merging", "description": "on/off", @@ -2446,6 +2473,11 @@ "name": "rombar", "type": "uint32" }, + { + "name": "write-zeroes", + "description": "on/off", + "type": "bool" + }, { "name": "scsi", "description": "on/off", @@ -2465,11 +2497,19 @@ "description": "A power of two between 512 and 32768", "type": "uint16" }, + { + "name": "bootindex", + "type": "int32" + }, { "name": "indirect_desc", "description": "on/off", "type": "bool" }, + { + "name": "max-write-zeroes-sectors", + "type": "uint32" + }, { "name": "queue-size", "type": "uint16" @@ -2504,8 +2544,9 @@ "type": "BlockdevOnError" }, { - "name": "bootindex", - "type": "int32" + "name": "any_layout", + "description": "on/off", + "type": "bool" }, { "name": "discard_granularity", @@ -2532,9 +2573,8 @@ "type": "bool" }, { - "name": "any_layout", - "description": "on/off", - "type": "bool" + "name": "max-discard-sectors", + "type": "uint32" }, { "name": "x-pcie-lnksta-dllla", @@ -2597,7 +2637,7 @@ "type": "bool" }, { - "name": "notify_on_empty", + "name": "discard", "description": "on/off", "type": "bool" }, @@ -3179,6 +3219,10 @@ "name": "x-pci-vendor-id", "type": "uint32" }, + { + "name": "yres", + "type": "uint32" + }, { "name": "x-pci-sub-device-id", "type": "uint32" @@ -3187,13 +3231,17 @@ "name": "x-no-kvm-ioeventfd", "type": "bool" }, + { + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, { "name": "rombar", "type": "uint32" }, { - "name": "multifunction", - "description": "on/off", + "name": "x-no-kvm-msi", "type": "bool" }, { @@ -3202,8 +3250,8 @@ "type": "bool" }, { - "name": "x-no-kvm-msi", - "type": "bool" + "name": "xres", + "type": "uint32" }, { "name": "x-no-vfio-ioeventfd", @@ -4272,6 +4320,11 @@ "description": "on/off", "type": "bool" }, + { + "name": "edid", + "description": "on/off", + "type": "bool" + }, { "name": "addr", "description": "Slot and optional function number, example: 06.0 or = 06", @@ -4372,6 +4425,10 @@ "description": "on/off", "type": "bool" }, + { + "name": "xres", + "type": "uint32" + }, { "name": "yres", "type": "uint32" @@ -4387,7 +4444,7 @@ "type": "bool" }, { - "name": "virgl", + "name": "edid", "description": "on/off", "type": "bool" }, @@ -4396,8 +4453,9 @@ "type": "uint32" }, { - "name": "xres", - "type": "uint32" + "name": "virgl", + "description": "on/off", + "type": "bool" }, { "name": "max_hostmem", @@ -4549,12 +4607,17 @@ "description": "on/off", "type": "bool" }, + { + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, { "name": "disable-modern", "type": "bool" }, { - "name": "x-pcie-lnkctl-init", + "name": "free-page-hint", "description": "on/off", "type": "bool" }, @@ -4602,6 +4665,10 @@ "description": "on/off", "type": "bool" }, + { + "name": "iothread", + "type": "link" + }, { "name": "class", "type": "uint32" @@ -4711,11 +4778,20 @@ "name": "guest-stats-polling-interval", "type": "int" }, + { + "name": "iothread", + "type": "link" + }, { "name": "event_idx", "description": "on/off", "type": "bool" }, + { + "name": "free-page-hint", + "description": "on/off", + "type": "bool" + }, { "name": "iommu_platform", "description": "on/off", @@ -4850,6 +4926,10 @@ "name": "version", "type": "uint32" }, + { + "name": "x-scalable-mode", + "type": "bool" + }, { "name": "dma-drain", "type": "bool" @@ -5690,13 +5770,11 @@ "avx512f", "avx512dq", "clwb", - "intel-pt", "avx512cd", "avx512bw", "avx512vl", "avx512vbmi", "pku", - "", "avx512vbmi2", "gfni", "vaes", @@ -5705,7 +5783,6 @@ "avx512bitalg", "avx512-vpopcntdq", "la57", - "pconfig", "wbnoinvd", "avx512f", "avx512f", @@ -5719,10 +5796,8 @@ "name": "Icelake-Client", "typename": "Icelake-Client-x86_64-cpu", "unavailable-features": [ - "intel-pt", "avx512vbmi", "pku", - "", "avx512vbmi2", "gfni", "vaes", @@ -5818,12 +5893,10 @@ "avx512f", "avx512dq", "clwb", - "intel-pt", "avx512cd", "avx512bw", "avx512vl", "pku", - "", "avx512vnni", "avx512f", "avx512f", @@ -5955,6 +6028,14 @@ "name": "lossy", "type": "boolean" }, + { + "name": "sasl-authz", + "type": "string" + }, + { + "name": "tls-authz", + "type": "string" + }, { "name": "acl", "type": "boolean" @@ -6873,6 +6954,10 @@ "name": "websocket", "type": "boolean" }, + { + "name": "tls-authz", + "type": "string" + }, { "name": "tls-creds", "type": "string" @@ -7235,7 +7320,7 @@ }, { "state": false, - "capability": "x-multifd" + "capability": "multifd" }, { "state": false, @@ -7248,6 +7333,10 @@ { "state": false, "capability": "late-block-activate" + }, + { + "state": false, + "capability": "x-ignore-shared" } ], "id": "libvirt-43" @@ -7370,7 +7459,7 @@ "arg-type": "0" }, { - "name": "x-block-latency-histogram-set", + "name": "block-latency-histogram-set", "ret-type": "0", "meta-type": "command", "arg-type": "15" @@ -7567,6 +7656,12 @@ "meta-type": "command", "arg-type": "45" }, + { + "name": "x-blockdev-reopen", + "ret-type": "0", + "meta-type": "command", + "arg-type": "45" + }, { "name": "blockdev-del", "ret-type": "0", @@ -7817,50 +7912,56 @@ "meta-type": "event", "arg-type": "91" }, + { + "name": "announce-self", + "ret-type": "0", + "meta-type": "command", + "arg-type": "92" + }, { "name": "RDMA_GID_STATUS_CHANGED", "meta-type": "event", - "arg-type": "92" + "arg-type": "93" }, { "name": "query-rocker", - "ret-type": "94", + "ret-type": "95", "meta-type": "command", - "arg-type": "93" + "arg-type": "94" }, { "name": "query-rocker-ports", - "ret-type": "[96]", + "ret-type": "[97]", "meta-type": "command", - "arg-type": "95" + "arg-type": "96" }, { "name": "query-rocker-of-dpa-flows", - "ret-type": "[98]", + "ret-type": "[99]", "meta-type": "command", - "arg-type": "97" + "arg-type": "98" }, { "name": "query-rocker-of-dpa-groups", - "ret-type": "[100]", + "ret-type": "[101]", "meta-type": "command", - "arg-type": "99" + "arg-type": "100" }, { "name": "query-tpm-models", - "ret-type": "[101]", + "ret-type": "[102]", "meta-type": "command", "arg-type": "0" }, { "name": "query-tpm-types", - "ret-type": "[102]", + "ret-type": "[103]", "meta-type": "command", "arg-type": "0" }, { "name": "query-tpm", - "ret-type": "[103]", + "ret-type": "[104]", "meta-type": "command", "arg-type": "0" }, @@ -7868,40 +7969,40 @@ "name": "set_password", "ret-type": "0", "meta-type": "command", - "arg-type": "104" + "arg-type": "105" }, { "name": "expire_password", "ret-type": "0", "meta-type": "command", - "arg-type": "105" + "arg-type": "106" }, { "name": "screendump", "ret-type": "0", "meta-type": "command", - "arg-type": "106" + "arg-type": "107" }, { "name": "query-spice", - "ret-type": "107", + "ret-type": "108", "meta-type": "command", "arg-type": "0" }, { "name": "SPICE_CONNECTED", "meta-type": "event", - "arg-type": "108" + "arg-type": "109" }, { "name": "SPICE_INITIALIZED", "meta-type": "event", - "arg-type": "109" + "arg-type": "110" }, { "name": "SPICE_DISCONNECTED", "meta-type": "event", - "arg-type": "110" + "arg-type": "111" }, { "name": "SPICE_MIGRATE_COMPLETED", @@ -7910,13 +8011,13 @@ }, { "name": "query-vnc", - "ret-type": "111", + "ret-type": "112", "meta-type": "command", "arg-type": "0" }, { "name": "query-vnc-servers", - "ret-type": "[112]", + "ret-type": "[113]", "meta-type": "command", "arg-type": "0" }, @@ -7924,26 +8025,26 @@ "name": "change-vnc-password", "ret-type": "0", "meta-type": "command", - "arg-type": "113" + "arg-type": "114" }, { "name": "VNC_CONNECTED", "meta-type": "event", - "arg-type": "114" + "arg-type": "115" }, { "name": "VNC_INITIALIZED", "meta-type": "event", - "arg-type": "115" + "arg-type": "116" }, { "name": "VNC_DISCONNECTED", "meta-type": "event", - "arg-type": "116" + "arg-type": "117" }, { "name": "query-mice", - "ret-type": "[117]", + "ret-type": "[118]", "meta-type": "command", "arg-type": "0" }, @@ -7951,23 +8052,23 @@ "name": "send-key", "ret-type": "0", "meta-type": "command", - "arg-type": "118" + "arg-type": "119" }, { "name": "input-send-event", "ret-type": "0", "meta-type": "command", - "arg-type": "119" + "arg-type": "120" }, { "name": "query-display-options", - "ret-type": "120", + "ret-type": "121", "meta-type": "command", "arg-type": "0" }, { "name": "query-migrate", - "ret-type": "121", + "ret-type": "122", "meta-type": "command", "arg-type": "0" }, @@ -7975,11 +8076,11 @@ "name": "migrate-set-capabilities", "ret-type": "0", "meta-type": "command", - "arg-type": "122" + "arg-type": "123" }, { "name": "query-migrate-capabilities", - "ret-type": "[123]", + "ret-type": "[124]", "meta-type": "command", "arg-type": "0" }, @@ -7987,11 +8088,11 @@ "name": "migrate-set-parameters", "ret-type": "0", "meta-type": "command", - "arg-type": "124" + "arg-type": "125" }, { "name": "query-migrate-parameters", - "ret-type": "125", + "ret-type": "126", "meta-type": "command", "arg-type": "0" }, @@ -7999,7 +8100,7 @@ "name": "client_migrate_info", "ret-type": "0", "meta-type": "command", - "arg-type": "126" + "arg-type": "127" }, { "name": "migrate-start-postcopy", @@ -8010,17 +8111,17 @@ { "name": "MIGRATION", "meta-type": "event", - "arg-type": "127" + "arg-type": "128" }, { "name": "MIGRATION_PASS", "meta-type": "event", - "arg-type": "128" + "arg-type": "129" }, { "name": "COLO_EXIT", "meta-type": "event", - "arg-type": "129" + "arg-type": "130" }, { "name": "x-colo-lost-heartbeat", @@ -8038,25 +8139,25 @@ "name": "migrate-continue", "ret-type": "0", "meta-type": "command", - "arg-type": "130" + "arg-type": "131" }, { "name": "migrate_set_downtime", "ret-type": "0", "meta-type": "command", - "arg-type": "131" + "arg-type": "132" }, { "name": "migrate_set_speed", "ret-type": "0", "meta-type": "command", - "arg-type": "132" + "arg-type": "133" }, { "name": "migrate-set-cache-size", "ret-type": "0", "meta-type": "command", - "arg-type": "133" + "arg-type": "134" }, { "name": "query-migrate-cache-size", @@ -8068,29 +8169,29 @@ "name": "migrate", "ret-type": "0", "meta-type": "command", - "arg-type": "134" + "arg-type": "135" }, { "name": "migrate-incoming", "ret-type": "0", "meta-type": "command", - "arg-type": "135" + "arg-type": "136" }, { "name": "xen-save-devices-state", "ret-type": "0", "meta-type": "command", - "arg-type": "136" + "arg-type": "137" }, { "name": "xen-set-replication", "ret-type": "0", "meta-type": "command", - "arg-type": "137" + "arg-type": "138" }, { "name": "query-xen-replication-status", - "ret-type": "138", + "ret-type": "139", "meta-type": "command", "arg-type": "0" }, @@ -8102,7 +8203,7 @@ }, { "name": "query-colo-status", - "ret-type": "139", + "ret-type": "140", "meta-type": "command", "arg-type": "0" }, @@ -8111,7 +8212,7 @@ "ret-type": "0", "allow-oob": true, "meta-type": "command", - "arg-type": "140" + "arg-type": "141" }, { "name": "migrate-pause", @@ -8124,23 +8225,23 @@ "name": "transaction", "ret-type": "0", "meta-type": "command", - "arg-type": "141" + "arg-type": "142" }, { "name": "trace-event-get-state", - "ret-type": "[143]", + "ret-type": "[144]", "meta-type": "command", - "arg-type": "142" + "arg-type": "143" }, { "name": "trace-event-set-state", "ret-type": "0", "meta-type": "command", - "arg-type": "144" + "arg-type": "145" }, { "name": "query-qmp-schema", - "ret-type": "[145]", + "ret-type": "[146]", "meta-type": "command", "arg-type": "0" }, @@ -8148,17 +8249,17 @@ "name": "qmp_capabilities", "ret-type": "0", "meta-type": "command", - "arg-type": "146" + "arg-type": "147" }, { "name": "query-version", - "ret-type": "147", + "ret-type": "148", "meta-type": "command", "arg-type": "0" }, { "name": "query-commands", - "ret-type": "[148]", + "ret-type": "[149]", "meta-type": "command", "arg-type": "0" }, @@ -8166,64 +8267,64 @@ "name": "add_client", "ret-type": "0", "meta-type": "command", - "arg-type": "149" + "arg-type": "150" }, { "name": "query-name", - "ret-type": "150", + "ret-type": "151", "meta-type": "command", "arg-type": "0" }, { "name": "query-kvm", - "ret-type": "151", + "ret-type": "152", "meta-type": "command", "arg-type": "0" }, { "name": "query-uuid", - "ret-type": "152", + "ret-type": "153", "meta-type": "command", "arg-type": "0" }, { "name": "query-events", - "ret-type": "[153]", + "ret-type": "[154]", "meta-type": "command", "arg-type": "0" }, { "name": "query-cpus", - "ret-type": "[154]", + "ret-type": "[155]", "meta-type": "command", "arg-type": "0" }, { "name": "query-cpus-fast", - "ret-type": "[155]", + "ret-type": "[156]", "meta-type": "command", "arg-type": "0" }, { "name": "query-iothreads", - "ret-type": "[156]", + "ret-type": "[157]", "meta-type": "command", "arg-type": "0" }, { "name": "query-balloon", - "ret-type": "157", + "ret-type": "158", "meta-type": "command", "arg-type": "0" }, { "name": "BALLOON_CHANGE", "meta-type": "event", - "arg-type": "158" + "arg-type": "159" }, { "name": "query-pci", - "ret-type": "[159]", + "ret-type": "[160]", "meta-type": "command", "arg-type": "0" }, @@ -8255,19 +8356,19 @@ "name": "cpu-add", "ret-type": "0", "meta-type": "command", - "arg-type": "160" + "arg-type": "161" }, { "name": "memsave", "ret-type": "0", "meta-type": "command", - "arg-type": "161" + "arg-type": "162" }, { "name": "pmemsave", "ret-type": "0", "meta-type": "command", - "arg-type": "162" + "arg-type": "163" }, { "name": "cont", @@ -8297,108 +8398,102 @@ "name": "balloon", "ret-type": "0", "meta-type": "command", - "arg-type": "163" + "arg-type": "164" }, { "name": "human-monitor-command", "ret-type": "str", "meta-type": "command", - "arg-type": "164" + "arg-type": "165" }, { "name": "qom-list", - "ret-type": "[166]", + "ret-type": "[167]", "meta-type": "command", - "arg-type": "165" + "arg-type": "166" }, { "name": "qom-get", "ret-type": "any", "meta-type": "command", - "arg-type": "167" + "arg-type": "168" }, { "name": "qom-set", "ret-type": "0", "meta-type": "command", - "arg-type": "168" + "arg-type": "169" }, { "name": "change", "ret-type": "0", "meta-type": "command", - "arg-type": "169" + "arg-type": "170" }, { "name": "qom-list-types", - "ret-type": "[171]", + "ret-type": "[172]", "meta-type": "command", - "arg-type": "170" + "arg-type": "171" }, { "name": "device-list-properties", - "ret-type": "[166]", + "ret-type": "[167]", "meta-type": "command", - "arg-type": "172" + "arg-type": "173" }, { "name": "qom-list-properties", - "ret-type": "[166]", + "ret-type": "[167]", "meta-type": "command", - "arg-type": "173" + "arg-type": "174" }, { "name": "xen-set-global-dirty-log", "ret-type": "0", "meta-type": "command", - "arg-type": "174" + "arg-type": "175" }, { "name": "device_add", "ret-type": "0", "meta-type": "command", - "arg-type": "175" + "arg-type": "176" }, { "name": "device_del", "ret-type": "0", "meta-type": "command", - "arg-type": "176" + "arg-type": "177" }, { "name": "DEVICE_DELETED", "meta-type": "event", - "arg-type": "177" + "arg-type": "178" }, { "name": "dump-guest-memory", "ret-type": "0", "meta-type": "command", - "arg-type": "178" + "arg-type": "179" }, { "name": "query-dump", - "ret-type": "179", + "ret-type": "180", "meta-type": "command", "arg-type": "0" }, { "name": "DUMP_COMPLETED", "meta-type": "event", - "arg-type": "180" + "arg-type": "181" }, { "name": "query-dump-guest-memory-capability", - "ret-type": "181", + "ret-type": "182", "meta-type": "command", "arg-type": "0" }, - { - "name": "dump-skeys", - "ret-type": "0", - "meta-type": "command", - "arg-type": "182" - }, { "name": "object-add", "ret-type": "0", @@ -8441,146 +8536,128 @@ "meta-type": "command", "arg-type": "0" }, - { - "name": "query-cpu-definitions", - "ret-type": "[190]", - "meta-type": "command", - "arg-type": "0" - }, - { - "name": "query-cpu-model-expansion", - "ret-type": "192", - "meta-type": "command", - "arg-type": "191" - }, - { - "name": "query-cpu-model-comparison", - "ret-type": "194", - "meta-type": "command", - "arg-type": "193" - }, - { - "name": "query-cpu-model-baseline", - "ret-type": "196", - "meta-type": "command", - "arg-type": "195" - }, { "name": "add-fd", - "ret-type": "198", + "ret-type": "191", "meta-type": "command", - "arg-type": "197" + "arg-type": "190" }, { "name": "remove-fd", "ret-type": "0", "meta-type": "command", - "arg-type": "199" + "arg-type": "192" }, { "name": "query-fdsets", - "ret-type": "[200]", + "ret-type": "[193]", "meta-type": "command", "arg-type": "0" }, { "name": "query-target", - "ret-type": "201", + "ret-type": "194", "meta-type": "command", "arg-type": "0" }, { "name": "query-command-line-options", - "ret-type": "[203]", + "ret-type": "[196]", "meta-type": "command", - "arg-type": "202" + "arg-type": "195" }, { "name": "query-memdev", - "ret-type": "[204]", + "ret-type": "[197]", "meta-type": "command", "arg-type": "0" }, { "name": "query-memory-devices", - "ret-type": "[205]", + "ret-type": "[198]", "meta-type": "command", "arg-type": "0" }, { "name": "MEM_UNPLUG_ERROR", "meta-type": "event", - "arg-type": "206" + "arg-type": "199" }, { "name": "query-acpi-ospm-status", - "ret-type": "[207]", + "ret-type": "[200]", "meta-type": "command", "arg-type": "0" }, { "name": "ACPI_DEVICE_OST", "meta-type": "event", - "arg-type": "208" + "arg-type": "201" }, { - "name": "rtc-reset-reinjection", + "name": "xen-load-devices-state", "ret-type": "0", "meta-type": "command", - "arg-type": "0" - }, - { - "name": "RTC_CHANGE", - "meta-type": "event", - "arg-type": "209" + "arg-type": "202" }, { - "name": "xen-load-devices-state", - "ret-type": "0", + "name": "query-hotpluggable-cpus", + "ret-type": "[203]", "meta-type": "command", - "arg-type": "210" + "arg-type": "0" }, { - "name": "query-gic-capabilities", - "ret-type": "[211]", + "name": "query-vm-generation-id", + "ret-type": "204", "meta-type": "command", "arg-type": "0" }, { - "name": "query-hotpluggable-cpus", - "ret-type": "[212]", + "name": "set-numa-node", + "ret-type": "0", "meta-type": "command", - "arg-type": "0" + "arg-type": "205" }, { - "name": "query-vm-generation-id", - "ret-type": "213", + "name": "RTC_CHANGE", + "meta-type": "event", + "arg-type": "206" + }, + { + "name": "rtc-reset-reinjection", + "ret-type": "0", "meta-type": "command", "arg-type": "0" }, { "name": "query-sev", - "ret-type": "214", + "ret-type": "207", "meta-type": "command", "arg-type": "0" }, { "name": "query-sev-launch-measure", - "ret-type": "215", + "ret-type": "208", "meta-type": "command", "arg-type": "0" }, { "name": "query-sev-capabilities", - "ret-type": "216", + "ret-type": "209", "meta-type": "command", "arg-type": "0" }, { - "name": "set-numa-node", - "ret-type": "0", + "name": "query-cpu-model-expansion", + "ret-type": "217", + "meta-type": "command", + "arg-type": "216" + }, + { + "name": "query-cpu-definitions", + "ret-type": "[218]", "meta-type": "command", - "arg-type": "217" + "arg-type": "0" }, { "name": "0", @@ -8601,7 +8678,7 @@ }, { "name": "status", - "type": "218" + "type": "219" } ], "meta-type": "object" @@ -8615,7 +8692,7 @@ }, { "name": "reason", - "type": "219" + "type": "220" } ], "meta-type": "object" @@ -8629,7 +8706,7 @@ }, { "name": "reason", - "type": "219" + "type": "220" } ], "meta-type": "object" @@ -8639,7 +8716,7 @@ "members": [ { "name": "action", - "type": "220" + "type": "221" } ], "meta-type": "object" @@ -8649,7 +8726,7 @@ "members": [ { "name": "action", - "type": "220" + "type": "221" } ], "meta-type": "object" @@ -8659,12 +8736,12 @@ "members": [ { "name": "action", - "type": "221" + "type": "222" }, { "name": "info", "default": null, - "type": "222" + "type": "223" } ], "meta-type": "object" @@ -8678,7 +8755,7 @@ }, { "name": "status", - "type": "223" + "type": "224" } ], "meta-type": "object" @@ -8757,11 +8834,11 @@ }, { "name": "type", - "type": "224" + "type": "225" }, { "name": "status", - "type": "223" + "type": "224" }, { "name": "current-progress", @@ -8783,7 +8860,7 @@ "name": "15", "members": [ { - "name": "device", + "name": "id", "type": "str" }, { @@ -8851,12 +8928,12 @@ { "name": "io-status", "default": null, - "type": "225" + "type": "226" }, { "name": "dirty-bitmaps", "default": null, - "type": "[226]" + "type": "[227]" } ], "meta-type": "object" @@ -8897,7 +8974,7 @@ }, { "name": "stats", - "type": "227" + "type": "228" }, { "name": "parent", @@ -8950,7 +9027,7 @@ }, { "name": "io-status", - "type": "225" + "type": "226" }, { "name": "ready", @@ -8958,7 +9035,7 @@ }, { "name": "status", - "type": "223" + "type": "224" }, { "name": "auto-finalize", @@ -9046,7 +9123,7 @@ { "name": "mode", "default": null, - "type": "228" + "type": "229" } ], "meta-type": "object" @@ -9166,12 +9243,12 @@ }, { "name": "sync", - "type": "229" + "type": "230" }, { "name": "mode", "default": null, - "type": "228" + "type": "229" }, { "name": "speed", @@ -9191,12 +9268,12 @@ { "name": "on-source-error", "default": null, - "type": "230" + "type": "231" }, { "name": "on-target-error", "default": null, - "type": "230" + "type": "231" }, { "name": "auto-finalize", @@ -9229,7 +9306,7 @@ }, { "name": "sync", - "type": "229" + "type": "230" }, { "name": "speed", @@ -9249,12 +9326,12 @@ { "name": "on-source-error", "default": null, - "type": "230" + "type": "231" }, { "name": "on-target-error", "default": null, - "type": "230" + "type": "231" }, { "name": "auto-finalize", @@ -9313,7 +9390,7 @@ }, { "name": "detect_zeroes", - "type": "231" + "type": "232" }, { "name": "bps", @@ -9341,7 +9418,7 @@ }, { "name": "image", - "type": "232" + "type": "233" }, { "name": "bps_max", @@ -9415,7 +9492,7 @@ }, { "name": "cache", - "type": "233" + "type": "234" }, { "name": "write_threshold", @@ -9429,11 +9506,11 @@ "members": [ { "name": "nodes", - "type": "[234]" + "type": "[235]" }, { "name": "edges", - "type": "[235]" + "type": "[236]" } ], "meta-type": "object" @@ -9471,12 +9548,12 @@ }, { "name": "sync", - "type": "229" + "type": "230" }, { "name": "mode", "default": null, - "type": "228" + "type": "229" }, { "name": "speed", @@ -9496,12 +9573,12 @@ { "name": "on-source-error", "default": null, - "type": "230" + "type": "231" }, { "name": "on-target-error", "default": null, - "type": "230" + "type": "231" }, { "name": "unmap", @@ -9511,7 +9588,7 @@ { "name": "copy-mode", "default": null, - "type": "236" + "type": "237" }, { "name": "auto-finalize", @@ -9625,7 +9702,7 @@ }, { "name": "sync", - "type": "229" + "type": "230" }, { "name": "speed", @@ -9645,12 +9722,12 @@ { "name": "on-source-error", "default": null, - "type": "230" + "type": "231" }, { "name": "on-target-error", "default": null, - "type": "230" + "type": "231" }, { "name": "filter-node-name", @@ -9660,7 +9737,7 @@ { "name": "copy-mode", "default": null, - "type": "236" + "type": "237" }, { "name": "auto-finalize", @@ -9820,7 +9897,7 @@ { "name": "on-error", "default": null, - "type": "230" + "type": "231" }, { "name": "auto-finalize", @@ -9920,165 +9997,165 @@ "variants": [ { "case": "blkdebug", - "type": "240" + "type": "241" }, { "case": "blklogwrites", - "type": "241" + "type": "242" }, { "case": "blkverify", - "type": "242" + "type": "243" }, { "case": "bochs", - "type": "243" + "type": "244" }, { "case": "cloop", - "type": "243" + "type": "244" }, { "case": "copy-on-read", - "type": "243" + "type": "244" }, { "case": "dmg", - "type": "243" + "type": "244" }, { "case": "file", - "type": "244" + "type": "245" }, { "case": "ftp", - "type": "245" + "type": "246" }, { "case": "ftps", - "type": "246" + "type": "247" }, { "case": "gluster", - "type": "247" + "type": "248" }, { "case": "host_cdrom", - "type": "244" + "type": "245" }, { "case": "host_device", - "type": "244" + "type": "245" }, { "case": "http", - "type": "248" + "type": "249" }, { "case": "https", - "type": "249" + "type": "250" }, { "case": "iscsi", - "type": "250" + "type": "251" }, { "case": "luks", - "type": "251" + "type": "252" }, { "case": "nbd", - "type": "252" + "type": "253" }, { "case": "nfs", - "type": "253" + "type": "254" }, { "case": "null-aio", - "type": "254" + "type": "255" }, { "case": "null-co", - "type": "254" + "type": "255" }, { "case": "nvme", - "type": "255" + "type": "256" }, { "case": "parallels", - "type": "243" + "type": "244" }, { "case": "qcow2", - "type": "256" + "type": "257" }, { "case": "qcow", - "type": "257" + "type": "258" }, { "case": "qed", - "type": "258" + "type": "259" }, { "case": "quorum", - "type": "259" + "type": "260" }, { "case": "raw", - "type": "260" + "type": "261" }, { "case": "rbd", - "type": "261" + "type": "262" }, { "case": "replication", - "type": "262" + "type": "263" }, { "case": "sheepdog", - "type": "263" + "type": "264" }, { "case": "ssh", - "type": "264" + "type": "265" }, { "case": "throttle", - "type": "265" + "type": "266" }, { "case": "vdi", - "type": "243" + "type": "244" }, { "case": "vhdx", - "type": "243" + "type": "244" }, { "case": "vmdk", - "type": "258" + "type": "259" }, { "case": "vpc", - "type": "243" + "type": "244" }, { "case": "vvfat", - "type": "266" + "type": "267" }, { "case": "vxhs", - "type": "267" + "type": "268" } ], "members": [ { "name": "driver", - "type": "237" + "type": "238" }, { "name": "node-name", @@ -10088,12 +10165,12 @@ { "name": "discard", "default": null, - "type": "238" + "type": "239" }, { "name": "cache", "default": null, - "type": "239" + "type": "240" }, { "name": "read-only", @@ -10113,7 +10190,7 @@ { "name": "detect-zeroes", "default": null, - "type": "231" + "type": "232" } ], "meta-type": "object" @@ -10137,7 +10214,7 @@ }, { "name": "options", - "type": "268" + "type": "269" } ], "meta-type": "object" @@ -10228,7 +10305,7 @@ { "name": "read-only-mode", "default": null, - "type": "269" + "type": "270" } ], "meta-type": "object" @@ -10280,11 +10357,11 @@ }, { "name": "operation", - "type": "270" + "type": "271" }, { "name": "action", - "type": "271" + "type": "272" }, { "name": "nospace", @@ -10303,7 +10380,7 @@ "members": [ { "name": "type", - "type": "224" + "type": "225" }, { "name": "device", @@ -10334,7 +10411,7 @@ "members": [ { "name": "type", - "type": "224" + "type": "225" }, { "name": "device", @@ -10364,11 +10441,11 @@ }, { "name": "operation", - "type": "270" + "type": "271" }, { "name": "action", - "type": "271" + "type": "272" } ], "meta-type": "object" @@ -10378,7 +10455,7 @@ "members": [ { "name": "type", - "type": "224" + "type": "225" }, { "name": "device", @@ -10404,7 +10481,7 @@ "members": [ { "name": "type", - "type": "224" + "type": "225" }, { "name": "id", @@ -10474,7 +10551,7 @@ }, { "name": "iothread", - "type": "272" + "type": "273" }, { "name": "force", @@ -10597,12 +10674,17 @@ "members": [ { "name": "addr", - "type": "273" + "type": "274" }, { "name": "tls-creds", "default": null, "type": "str" + }, + { + "name": "tls-authz", + "default": null, + "type": "str" } ], "meta-type": "object" @@ -10642,7 +10724,7 @@ { "name": "mode", "default": null, - "type": "274" + "type": "275" } ], "meta-type": "object" @@ -10702,7 +10784,7 @@ "members": [ { "name": "type", - "type": "275" + "type": "276" }, { "name": "error", @@ -10776,7 +10858,7 @@ { "name": "format", "default": null, - "type": "276" + "type": "277" } ], "meta-type": "object" @@ -10795,7 +10877,7 @@ { "name": "format", "default": null, - "type": "276" + "type": "277" } ], "meta-type": "object" @@ -10814,7 +10896,7 @@ }, { "name": "backend", - "type": "277" + "type": "278" } ], "meta-type": "object" @@ -10839,7 +10921,7 @@ }, { "name": "backend", - "type": "277" + "type": "278" } ], "meta-type": "object" @@ -10945,15 +11027,15 @@ }, { "name": "multicast", - "type": "278" + "type": "279" }, { "name": "unicast", - "type": "278" + "type": "279" }, { "name": "vlan", - "type": "278" + "type": "279" }, { "name": "broadcast-allowed", @@ -11003,6 +11085,28 @@ }, { "name": "92", + "members": [ + { + "name": "initial", + "type": "int" + }, + { + "name": "max", + "type": "int" + }, + { + "name": "rounds", + "type": "int" + }, + { + "name": "step", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "93", "members": [ { "name": "netdev", @@ -11024,7 +11128,7 @@ "meta-type": "object" }, { - "name": "93", + "name": "94", "members": [ { "name": "name", @@ -11034,7 +11138,7 @@ "meta-type": "object" }, { - "name": "94", + "name": "95", "members": [ { "name": "name", @@ -11052,7 +11156,7 @@ "meta-type": "object" }, { - "name": "95", + "name": "96", "members": [ { "name": "name", @@ -11062,12 +11166,12 @@ "meta-type": "object" }, { - "name": "[96]", - "element-type": "96", + "name": "[97]", + "element-type": "97", "meta-type": "array" }, { - "name": "96", + "name": "97", "members": [ { "name": "name", @@ -11087,17 +11191,17 @@ }, { "name": "duplex", - "type": "279" + "type": "280" }, { "name": "autoneg", - "type": "280" + "type": "281" } ], "meta-type": "object" }, { - "name": "97", + "name": "98", "members": [ { "name": "name", @@ -11112,12 +11216,12 @@ "meta-type": "object" }, { - "name": "[98]", - "element-type": "98", + "name": "[99]", + "element-type": "99", "meta-type": "array" }, { - "name": "98", + "name": "99", "members": [ { "name": "cookie", @@ -11129,21 +11233,21 @@ }, { "name": "key", - "type": "281" + "type": "282" }, { "name": "mask", - "type": "282" + "type": "283" }, { "name": "action", - "type": "283" + "type": "284" } ], "meta-type": "object" }, { - "name": "99", + "name": "100", "members": [ { "name": "name", @@ -11158,12 +11262,12 @@ "meta-type": "object" }, { - "name": "[100]", - "element-type": "100", + "name": "[101]", + "element-type": "101", "meta-type": "array" }, { - "name": "100", + "name": "101", "members": [ { "name": "id", @@ -11232,12 +11336,12 @@ "meta-type": "object" }, { - "name": "[101]", - "element-type": "101", + "name": "[102]", + "element-type": "102", "meta-type": "array" }, { - "name": "101", + "name": "102", "meta-type": "enum", "values": [ "tpm-tis", @@ -11245,12 +11349,12 @@ ] }, { - "name": "[102]", - "element-type": "102", + "name": "[103]", + "element-type": "103", "meta-type": "array" }, { - "name": "102", + "name": "103", "meta-type": "enum", "values": [ "passthrough", @@ -11258,12 +11362,12 @@ ] }, { - "name": "[103]", - "element-type": "103", + "name": "[104]", + "element-type": "104", "meta-type": "array" }, { - "name": "103", + "name": "104", "members": [ { "name": "id", @@ -11271,17 +11375,17 @@ }, { "name": "model", - "type": "101" + "type": "102" }, { "name": "options", - "type": "284" + "type": "285" } ], "meta-type": "object" }, { - "name": "104", + "name": "105", "members": [ { "name": "protocol", @@ -11300,7 +11404,7 @@ "meta-type": "object" }, { - "name": "105", + "name": "106", "members": [ { "name": "protocol", @@ -11314,7 +11418,7 @@ "meta-type": "object" }, { - "name": "106", + "name": "107", "members": [ { "name": "filename", @@ -11334,7 +11438,7 @@ "meta-type": "object" }, { - "name": "107", + "name": "108", "members": [ { "name": "enabled", @@ -11371,60 +11475,60 @@ }, { "name": "mouse-mode", - "type": "285" + "type": "286" }, { "name": "channels", "default": null, - "type": "[286]" + "type": "[287]" } ], "meta-type": "object" }, { - "name": "108", + "name": "109", "members": [ { "name": "server", - "type": "287" + "type": "288" }, { "name": "client", - "type": "287" + "type": "288" } ], "meta-type": "object" }, { - "name": "109", + "name": "110", "members": [ { "name": "server", - "type": "288" + "type": "289" }, { "name": "client", - "type": "286" + "type": "287" } ], "meta-type": "object" }, { - "name": "110", + "name": "111", "members": [ { "name": "server", - "type": "287" + "type": "288" }, { "name": "client", - "type": "287" + "type": "288" } ], "meta-type": "object" }, { - "name": "111", + "name": "112", "members": [ { "name": "enabled", @@ -11438,7 +11542,7 @@ { "name": "family", "default": null, - "type": "289" + "type": "290" }, { "name": "service", @@ -11453,18 +11557,18 @@ { "name": "clients", "default": null, - "type": "[290]" + "type": "[291]" } ], "meta-type": "object" }, { - "name": "[112]", - "element-type": "112", + "name": "[113]", + "element-type": "113", "meta-type": "array" }, { - "name": "112", + "name": "113", "members": [ { "name": "id", @@ -11472,20 +11576,20 @@ }, { "name": "server", - "type": "[291]" + "type": "[292]" }, { "name": "clients", - "type": "[290]" + "type": "[291]" }, { "name": "auth", - "type": "292" + "type": "293" }, { "name": "vencrypt", "default": null, - "type": "293" + "type": "294" }, { "name": "display", @@ -11496,7 +11600,7 @@ "meta-type": "object" }, { - "name": "113", + "name": "114", "members": [ { "name": "password", @@ -11506,54 +11610,54 @@ "meta-type": "object" }, { - "name": "114", + "name": "115", "members": [ { "name": "server", - "type": "294" + "type": "295" }, { "name": "client", - "type": "295" + "type": "296" } ], "meta-type": "object" }, { - "name": "115", + "name": "116", "members": [ { "name": "server", - "type": "294" + "type": "295" }, { "name": "client", - "type": "290" + "type": "291" } ], "meta-type": "object" }, { - "name": "116", + "name": "117", "members": [ { "name": "server", - "type": "294" + "type": "295" }, { "name": "client", - "type": "290" + "type": "291" } ], "meta-type": "object" }, { - "name": "[117]", - "element-type": "117", + "name": "[118]", + "element-type": "118", "meta-type": "array" }, { - "name": "117", + "name": "118", "members": [ { "name": "name", @@ -11575,11 +11679,11 @@ "meta-type": "object" }, { - "name": "118", + "name": "119", "members": [ { "name": "keys", - "type": "[296]" + "type": "[297]" }, { "name": "hold-time", @@ -11590,7 +11694,7 @@ "meta-type": "object" }, { - "name": "119", + "name": "120", "members": [ { "name": "device", @@ -11604,22 +11708,26 @@ }, { "name": "events", - "type": "[297]" + "type": "[298]" } ], "meta-type": "object" }, { - "name": "120", + "name": "121", "tag": "type", "variants": [ { "case": "gtk", - "type": "300" + "type": "301" + }, + { + "case": "curses", + "type": "302" }, { "case": "egl-headless", - "type": "301" + "type": "303" }, { "case": "default", @@ -11634,18 +11742,18 @@ "type": "0" }, { - "case": "curses", + "case": "cocoa", "type": "0" }, { - "case": "cocoa", + "case": "spice-app", "type": "0" } ], "members": [ { "name": "type", - "type": "298" + "type": "299" }, { "name": "full-screen", @@ -11660,33 +11768,33 @@ { "name": "gl", "default": null, - "type": "299" + "type": "300" } ], "meta-type": "object" }, { - "name": "121", + "name": "122", "members": [ { "name": "status", "default": null, - "type": "302" + "type": "304" }, { "name": "ram", "default": null, - "type": "303" + "type": "305" }, { "name": "disk", "default": null, - "type": "303" + "type": "305" }, { "name": "xbzrle-cache", "default": null, - "type": "304" + "type": "306" }, { "name": "total-time", @@ -11731,32 +11839,37 @@ { "name": "compression", "default": null, - "type": "305" + "type": "307" + }, + { + "name": "socket-address", + "default": null, + "type": "[308]" } ], "meta-type": "object" }, { - "name": "122", + "name": "123", "members": [ { "name": "capabilities", - "type": "[123]" + "type": "[124]" } ], "meta-type": "object" }, { - "name": "[123]", - "element-type": "123", + "name": "[124]", + "element-type": "124", "meta-type": "array" }, { - "name": "123", + "name": "124", "members": [ { "name": "capability", - "type": "306" + "type": "309" }, { "name": "state", @@ -11766,8 +11879,28 @@ "meta-type": "object" }, { - "name": "124", + "name": "125", "members": [ + { + "name": "announce-initial", + "default": null, + "type": "int" + }, + { + "name": "announce-max", + "default": null, + "type": "int" + }, + { + "name": "announce-rounds", + "default": null, + "type": "int" + }, + { + "name": "announce-step", + "default": null, + "type": "int" + }, { "name": "compress-level", "default": null, @@ -11801,12 +11934,17 @@ { "name": "tls-creds", "default": null, - "type": "272" + "type": "273" }, { "name": "tls-hostname", "default": null, - "type": "272" + "type": "273" + }, + { + "name": "tls-authz", + "default": null, + "type": "273" }, { "name": "max-bandwidth", @@ -11829,12 +11967,7 @@ "type": "bool" }, { - "name": "x-multifd-channels", - "default": null, - "type": "int" - }, - { - "name": "x-multifd-page-count", + "name": "multifd-channels", "default": null, "type": "int" }, @@ -11857,8 +11990,28 @@ "meta-type": "object" }, { - "name": "125", + "name": "126", "members": [ + { + "name": "announce-initial", + "default": null, + "type": "int" + }, + { + "name": "announce-max", + "default": null, + "type": "int" + }, + { + "name": "announce-rounds", + "default": null, + "type": "int" + }, + { + "name": "announce-step", + "default": null, + "type": "int" + }, { "name": "compress-level", "default": null, @@ -11899,6 +12052,11 @@ "default": null, "type": "str" }, + { + "name": "tls-authz", + "default": null, + "type": "str" + }, { "name": "max-bandwidth", "default": null, @@ -11920,12 +12078,7 @@ "type": "bool" }, { - "name": "x-multifd-channels", - "default": null, - "type": "int" - }, - { - "name": "x-multifd-page-count", + "name": "multifd-channels", "default": null, "type": "int" }, @@ -11948,7 +12101,7 @@ "meta-type": "object" }, { - "name": "126", + "name": "127", "members": [ { "name": "protocol", @@ -11977,17 +12130,17 @@ "meta-type": "object" }, { - "name": "127", + "name": "128", "members": [ { "name": "status", - "type": "302" + "type": "304" } ], "meta-type": "object" }, { - "name": "128", + "name": "129", "members": [ { "name": "pass", @@ -11997,31 +12150,31 @@ "meta-type": "object" }, { - "name": "129", + "name": "130", "members": [ { "name": "mode", - "type": "307" + "type": "310" }, { "name": "reason", - "type": "308" + "type": "311" } ], "meta-type": "object" }, { - "name": "130", + "name": "131", "members": [ { "name": "state", - "type": "302" + "type": "304" } ], "meta-type": "object" }, { - "name": "131", + "name": "132", "members": [ { "name": "value", @@ -12031,7 +12184,7 @@ "meta-type": "object" }, { - "name": "132", + "name": "133", "members": [ { "name": "value", @@ -12041,7 +12194,7 @@ "meta-type": "object" }, { - "name": "133", + "name": "134", "members": [ { "name": "value", @@ -12056,7 +12209,7 @@ "meta-type": "builtin" }, { - "name": "134", + "name": "135", "members": [ { "name": "uri", @@ -12086,7 +12239,7 @@ "meta-type": "object" }, { - "name": "135", + "name": "136", "members": [ { "name": "uri", @@ -12096,7 +12249,7 @@ "meta-type": "object" }, { - "name": "136", + "name": "137", "members": [ { "name": "filename", @@ -12111,7 +12264,7 @@ "meta-type": "object" }, { - "name": "137", + "name": "138", "members": [ { "name": "enable", @@ -12130,7 +12283,7 @@ "meta-type": "object" }, { - "name": "138", + "name": "139", "members": [ { "name": "error", @@ -12145,21 +12298,25 @@ "meta-type": "object" }, { - "name": "139", + "name": "140", "members": [ { "name": "mode", - "type": "307" + "type": "310" + }, + { + "name": "last-mode", + "type": "310" }, { "name": "reason", - "type": "308" + "type": "311" } ], "meta-type": "object" }, { - "name": "140", + "name": "141", "members": [ { "name": "uri", @@ -12169,22 +12326,22 @@ "meta-type": "object" }, { - "name": "141", + "name": "142", "members": [ { "name": "actions", - "type": "[309]" + "type": "[312]" }, { "name": "properties", "default": null, - "type": "310" + "type": "313" } ], "meta-type": "object" }, { - "name": "142", + "name": "143", "members": [ { "name": "name", @@ -12199,12 +12356,12 @@ "meta-type": "object" }, { - "name": "[143]", - "element-type": "143", + "name": "[144]", + "element-type": "144", "meta-type": "array" }, { - "name": "143", + "name": "144", "members": [ { "name": "name", @@ -12212,7 +12369,7 @@ }, { "name": "state", - "type": "311" + "type": "314" }, { "name": "vcpu", @@ -12222,7 +12379,7 @@ "meta-type": "object" }, { - "name": "144", + "name": "145", "members": [ { "name": "name", @@ -12246,41 +12403,41 @@ "meta-type": "object" }, { - "name": "[145]", - "element-type": "145", + "name": "[146]", + "element-type": "146", "meta-type": "array" }, { - "name": "145", + "name": "146", "tag": "meta-type", "variants": [ { "case": "builtin", - "type": "313" + "type": "316" }, { "case": "enum", - "type": "314" + "type": "317" }, { "case": "array", - "type": "315" + "type": "318" }, { "case": "object", - "type": "316" + "type": "319" }, { "case": "alternate", - "type": "317" + "type": "320" }, { "case": "command", - "type": "318" + "type": "321" }, { "case": "event", - "type": "319" + "type": "322" } ], "members": [ @@ -12290,28 +12447,28 @@ }, { "name": "meta-type", - "type": "312" + "type": "315" } ], "meta-type": "object" }, { - "name": "146", + "name": "147", "members": [ { "name": "enable", "default": null, - "type": "[320]" + "type": "[323]" } ], "meta-type": "object" }, { - "name": "147", + "name": "148", "members": [ { "name": "qemu", - "type": "321" + "type": "324" }, { "name": "package", @@ -12321,12 +12478,12 @@ "meta-type": "object" }, { - "name": "[148]", - "element-type": "148", + "name": "[149]", + "element-type": "149", "meta-type": "array" }, { - "name": "148", + "name": "149", "members": [ { "name": "name", @@ -12336,7 +12493,7 @@ "meta-type": "object" }, { - "name": "149", + "name": "150", "members": [ { "name": "protocol", @@ -12360,7 +12517,7 @@ "meta-type": "object" }, { - "name": "150", + "name": "151", "members": [ { "name": "name", @@ -12371,7 +12528,7 @@ "meta-type": "object" }, { - "name": "151", + "name": "152", "members": [ { "name": "enabled", @@ -12385,7 +12542,7 @@ "meta-type": "object" }, { - "name": "152", + "name": "153", "members": [ { "name": "UUID", @@ -12395,12 +12552,12 @@ "meta-type": "object" }, { - "name": "[153]", - "element-type": "153", + "name": "[154]", + "element-type": "154", "meta-type": "array" }, { - "name": "153", + "name": "154", "members": [ { "name": "name", @@ -12410,41 +12567,41 @@ "meta-type": "object" }, { - "name": "[154]", - "element-type": "154", + "name": "[155]", + "element-type": "155", "meta-type": "array" }, { - "name": "154", + "name": "155", "tag": "arch", "variants": [ { "case": "x86", - "type": "324" + "type": "327" }, { "case": "sparc", - "type": "325" + "type": "328" }, { "case": "ppc", - "type": "326" + "type": "329" }, { "case": "mips", - "type": "327" + "type": "330" }, { "case": "tricore", - "type": "328" + "type": "331" }, { "case": "s390", - "type": "329" + "type": "332" }, { "case": "riscv", - "type": "330" + "type": "333" }, { "case": "other", @@ -12475,27 +12632,27 @@ { "name": "props", "default": null, - "type": "322" + "type": "325" }, { "name": "arch", - "type": "323" + "type": "326" } ], "meta-type": "object" }, { - "name": "[155]", - "element-type": "155", + "name": "[156]", + "element-type": "156", "meta-type": "array" }, { - "name": "155", + "name": "156", "tag": "target", "variants": [ { "case": "s390x", - "type": "329" + "type": "332" }, { "case": "aarch64", @@ -12634,26 +12791,26 @@ { "name": "props", "default": null, - "type": "322" + "type": "325" }, { "name": "arch", - "type": "323" + "type": "326" }, { "name": "target", - "type": "331" + "type": "334" } ], "meta-type": "object" }, { - "name": "[156]", - "element-type": "156", + "name": "[157]", + "element-type": "157", "meta-type": "array" }, { - "name": "156", + "name": "157", "members": [ { "name": "id", @@ -12679,7 +12836,7 @@ "meta-type": "object" }, { - "name": "157", + "name": "158", "members": [ { "name": "actual", @@ -12689,7 +12846,7 @@ "meta-type": "object" }, { - "name": "158", + "name": "159", "members": [ { "name": "actual", @@ -12699,12 +12856,12 @@ "meta-type": "object" }, { - "name": "[159]", - "element-type": "159", + "name": "[160]", + "element-type": "160", "meta-type": "array" }, { - "name": "159", + "name": "160", "members": [ { "name": "bus", @@ -12712,13 +12869,13 @@ }, { "name": "devices", - "type": "[332]" + "type": "[335]" } ], "meta-type": "object" }, { - "name": "160", + "name": "161", "members": [ { "name": "id", @@ -12728,7 +12885,7 @@ "meta-type": "object" }, { - "name": "161", + "name": "162", "members": [ { "name": "val", @@ -12751,7 +12908,7 @@ "meta-type": "object" }, { - "name": "162", + "name": "163", "members": [ { "name": "val", @@ -12769,7 +12926,7 @@ "meta-type": "object" }, { - "name": "163", + "name": "164", "members": [ { "name": "value", @@ -12779,7 +12936,7 @@ "meta-type": "object" }, { - "name": "164", + "name": "165", "members": [ { "name": "command-line", @@ -12794,7 +12951,7 @@ "meta-type": "object" }, { - "name": "165", + "name": "166", "members": [ { "name": "path", @@ -12804,12 +12961,12 @@ "meta-type": "object" }, { - "name": "[166]", - "element-type": "166", + "name": "[167]", + "element-type": "167", "meta-type": "array" }, { - "name": "166", + "name": "167", "members": [ { "name": "name", @@ -12828,7 +12985,7 @@ "meta-type": "object" }, { - "name": "167", + "name": "168", "members": [ { "name": "path", @@ -12847,7 +13004,7 @@ "meta-type": "builtin" }, { - "name": "168", + "name": "169", "members": [ { "name": "path", @@ -12865,7 +13022,7 @@ "meta-type": "object" }, { - "name": "169", + "name": "170", "members": [ { "name": "device", @@ -12884,7 +13041,7 @@ "meta-type": "object" }, { - "name": "170", + "name": "171", "members": [ { "name": "implements", @@ -12900,12 +13057,12 @@ "meta-type": "object" }, { - "name": "[171]", - "element-type": "171", + "name": "[172]", + "element-type": "172", "meta-type": "array" }, { - "name": "171", + "name": "172", "members": [ { "name": "name", @@ -12925,7 +13082,7 @@ "meta-type": "object" }, { - "name": "172", + "name": "173", "members": [ { "name": "typename", @@ -12935,7 +13092,7 @@ "meta-type": "object" }, { - "name": "173", + "name": "174", "members": [ { "name": "typename", @@ -12945,7 +13102,7 @@ "meta-type": "object" }, { - "name": "174", + "name": "175", "members": [ { "name": "enable", @@ -12955,7 +13112,7 @@ "meta-type": "object" }, { - "name": "175", + "name": "176", "members": [ { "name": "driver", @@ -12975,7 +13132,7 @@ "meta-type": "object" }, { - "name": "176", + "name": "177", "members": [ { "name": "id", @@ -12985,7 +13142,7 @@ "meta-type": "object" }, { - "name": "177", + "name": "178", "members": [ { "name": "device", @@ -13000,7 +13157,7 @@ "meta-type": "object" }, { - "name": "178", + "name": "179", "members": [ { "name": "paging", @@ -13028,17 +13185,17 @@ { "name": "format", "default": null, - "type": "333" + "type": "336" } ], "meta-type": "object" }, { - "name": "179", + "name": "180", "members": [ { "name": "status", - "type": "334" + "type": "337" }, { "name": "completed", @@ -13052,11 +13209,11 @@ "meta-type": "object" }, { - "name": "180", + "name": "181", "members": [ { "name": "result", - "type": "179" + "type": "180" }, { "name": "error", @@ -13066,22 +13223,12 @@ ], "meta-type": "object" }, - { - "name": "181", - "members": [ - { - "name": "formats", - "type": "[333]" - } - ], - "meta-type": "object" - }, { "name": "182", "members": [ { - "name": "filename", - "type": "str" + "name": "formats", + "type": "[336]" } ], "meta-type": "object" @@ -13193,34 +13340,17 @@ ], "meta-type": "object" }, - { - "name": "[190]", - "element-type": "190", - "meta-type": "array" - }, { "name": "190", "members": [ { - "name": "name", - "type": "str" - }, - { - "name": "migration-safe", + "name": "fdset-id", "default": null, - "type": "bool" - }, - { - "name": "static", - "type": "bool" + "type": "int" }, { - "name": "unavailable-features", + "name": "opaque", "default": null, - "type": "[str]" - }, - { - "name": "typename", "type": "str" } ], @@ -13230,12 +13360,12 @@ "name": "191", "members": [ { - "name": "type", - "type": "335" + "name": "fdset-id", + "type": "int" }, { - "name": "model", - "type": "336" + "name": "fd", + "type": "int" } ], "meta-type": "object" @@ -13244,22 +13374,32 @@ "name": "192", "members": [ { - "name": "model", - "type": "336" + "name": "fdset-id", + "type": "int" + }, + { + "name": "fd", + "default": null, + "type": "int" } ], "meta-type": "object" }, + { + "name": "[193]", + "element-type": "193", + "meta-type": "array" + }, { "name": "193", "members": [ { - "name": "modela", - "type": "336" + "name": "fdset-id", + "type": "int" }, { - "name": "modelb", - "type": "336" + "name": "fds", + "type": "[338]" } ], "meta-type": "object" @@ -13268,12 +13408,8 @@ "name": "194", "members": [ { - "name": "result", - "type": "337" - }, - { - "name": "responsible-properties", - "type": "[str]" + "name": "arch", + "type": "334" } ], "meta-type": "object" @@ -13282,145 +13418,47 @@ "name": "195", "members": [ { - "name": "modela", - "type": "336" - }, - { - "name": "modelb", - "type": "336" + "name": "option", + "default": null, + "type": "str" } ], "meta-type": "object" }, + { + "name": "[196]", + "element-type": "196", + "meta-type": "array" + }, { "name": "196", "members": [ { - "name": "model", - "type": "336" + "name": "option", + "type": "str" + }, + { + "name": "parameters", + "type": "[339]" } ], "meta-type": "object" }, + { + "name": "[197]", + "element-type": "197", + "meta-type": "array" + }, { "name": "197", "members": [ { - "name": "fdset-id", - "default": null, - "type": "int" - }, - { - "name": "opaque", + "name": "id", "default": null, "type": "str" - } - ], - "meta-type": "object" - }, - { - "name": "198", - "members": [ + }, { - "name": "fdset-id", - "type": "int" - }, - { - "name": "fd", - "type": "int" - } - ], - "meta-type": "object" - }, - { - "name": "199", - "members": [ - { - "name": "fdset-id", - "type": "int" - }, - { - "name": "fd", - "default": null, - "type": "int" - } - ], - "meta-type": "object" - }, - { - "name": "[200]", - "element-type": "200", - "meta-type": "array" - }, - { - "name": "200", - "members": [ - { - "name": "fdset-id", - "type": "int" - }, - { - "name": "fds", - "type": "[338]" - } - ], - "meta-type": "object" - }, - { - "name": "201", - "members": [ - { - "name": "arch", - "type": "331" - } - ], - "meta-type": "object" - }, - { - "name": "202", - "members": [ - { - "name": "option", - "default": null, - "type": "str" - } - ], - "meta-type": "object" - }, - { - "name": "[203]", - "element-type": "203", - "meta-type": "array" - }, - { - "name": "203", - "members": [ - { - "name": "option", - "type": "str" - }, - { - "name": "parameters", - "type": "[339]" - } - ], - "meta-type": "object" - }, - { - "name": "[204]", - "element-type": "204", - "meta-type": "array" - }, - { - "name": "204", - "members": [ - { - "name": "id", - "default": null, - "type": "str" - }, - { - "name": "size", + "name": "size", "type": "int" }, { @@ -13447,12 +13485,12 @@ "meta-type": "object" }, { - "name": "[205]", - "element-type": "205", + "name": "[198]", + "element-type": "198", "meta-type": "array" }, { - "name": "205", + "name": "198", "tag": "type", "variants": [ { @@ -13473,7 +13511,7 @@ "meta-type": "object" }, { - "name": "206", + "name": "199", "members": [ { "name": "device", @@ -13487,12 +13525,12 @@ "meta-type": "object" }, { - "name": "[207]", - "element-type": "207", + "name": "[200]", + "element-type": "200", "meta-type": "array" }, { - "name": "207", + "name": "200", "members": [ { "name": "device", @@ -13519,27 +13557,17 @@ "meta-type": "object" }, { - "name": "208", + "name": "201", "members": [ { "name": "info", - "type": "207" - } - ], - "meta-type": "object" - }, - { - "name": "209", - "members": [ - { - "name": "offset", - "type": "int" + "type": "200" } ], "meta-type": "object" }, { - "name": "210", + "name": "202", "members": [ { "name": "filename", @@ -13549,68 +13577,80 @@ "meta-type": "object" }, { - "name": "[211]", - "element-type": "211", + "name": "[203]", + "element-type": "203", "meta-type": "array" }, { - "name": "211", + "name": "203", "members": [ { - "name": "version", + "name": "type", + "type": "str" + }, + { + "name": "vcpus-count", "type": "int" }, { - "name": "emulated", - "type": "bool" + "name": "props", + "type": "325" }, { - "name": "kernel", - "type": "bool" + "name": "qom-path", + "default": null, + "type": "str" } ], "meta-type": "object" }, { - "name": "[212]", - "element-type": "212", - "meta-type": "array" - }, - { - "name": "212", + "name": "204", "members": [ { - "name": "type", + "name": "guid", "type": "str" - }, + } + ], + "meta-type": "object" + }, + { + "name": "205", + "tag": "type", + "variants": [ { - "name": "vcpus-count", - "type": "int" + "case": "node", + "type": "345" }, { - "name": "props", - "type": "322" + "case": "dist", + "type": "346" }, { - "name": "qom-path", - "default": null, - "type": "str" + "case": "cpu", + "type": "347" + } + ], + "members": [ + { + "name": "type", + "type": "344" } ], "meta-type": "object" }, { - "name": "213", + "name": "206", "members": [ { - "name": "guid", - "type": "str" + "name": "offset", + "type": "int" } ], "meta-type": "object" }, { - "name": "214", + "name": "207", "members": [ { "name": "enabled", @@ -13634,7 +13674,7 @@ }, { "name": "state", - "type": "344" + "type": "348" }, { "name": "handle", @@ -13644,7 +13684,7 @@ "meta-type": "object" }, { - "name": "215", + "name": "208", "members": [ { "name": "data", @@ -13654,7 +13694,7 @@ "meta-type": "object" }, { - "name": "216", + "name": "209", "members": [ { "name": "pdh", @@ -13676,26 +13716,58 @@ "meta-type": "object" }, { - "name": "217", - "tag": "type", - "variants": [ + "name": "216", + "members": [ { - "case": "node", - "type": "346" + "name": "type", + "type": "351" }, { - "case": "dist", - "type": "347" - }, + "name": "model", + "type": "349" + } + ], + "meta-type": "object" + }, + { + "name": "217", + "members": [ { - "case": "cpu", - "type": "348" + "name": "model", + "type": "349" } ], + "meta-type": "object" + }, + { + "name": "[218]", + "element-type": "218", + "meta-type": "array" + }, + { + "name": "218", "members": [ { - "name": "type", - "type": "345" + "name": "name", + "type": "str" + }, + { + "name": "migration-safe", + "default": null, + "type": "bool" + }, + { + "name": "static", + "type": "bool" + }, + { + "name": "unavailable-features", + "default": null, + "type": "[str]" + }, + { + "name": "typename", + "type": "str" } ], "meta-type": "object" @@ -13706,7 +13778,7 @@ "meta-type": "builtin" }, { - "name": "218", + "name": "219", "meta-type": "enum", "values": [ "debug", @@ -13729,7 +13801,7 @@ ] }, { - "name": "219", + "name": "220", "meta-type": "enum", "values": [ "none", @@ -13745,7 +13817,7 @@ ] }, { - "name": "220", + "name": "221", "meta-type": "enum", "values": [ "reset", @@ -13758,7 +13830,7 @@ ] }, { - "name": "221", + "name": "222", "meta-type": "enum", "values": [ "pause", @@ -13766,28 +13838,28 @@ ] }, { - "name": "222", + "name": "223", "tag": "type", "variants": [ { "case": "hyper-v", - "type": "350" + "type": "353" }, { "case": "s390", - "type": "351" + "type": "354" } ], "members": [ { "name": "type", - "type": "349" + "type": "352" } ], "meta-type": "object" }, { - "name": "223", + "name": "224", "meta-type": "enum", "values": [ "undefined", @@ -13804,7 +13876,7 @@ ] }, { - "name": "224", + "name": "225", "meta-type": "enum", "values": [ "commit", @@ -13820,7 +13892,7 @@ "meta-type": "array" }, { - "name": "225", + "name": "226", "meta-type": "enum", "values": [ "ok", @@ -13829,12 +13901,12 @@ ] }, { - "name": "[226]", - "element-type": "226", + "name": "[227]", + "element-type": "227", "meta-type": "array" }, { - "name": "226", + "name": "227", "members": [ { "name": "name", @@ -13849,15 +13921,32 @@ "name": "granularity", "type": "int" }, + { + "name": "recording", + "type": "bool" + }, + { + "name": "busy", + "type": "bool" + }, { "name": "status", - "type": "352" + "type": "355" + }, + { + "name": "persistent", + "type": "bool" + }, + { + "name": "inconsistent", + "default": null, + "type": "bool" } ], "meta-type": "object" }, { - "name": "227", + "name": "228", "members": [ { "name": "rd_bytes", @@ -13942,28 +14031,28 @@ }, { "name": "timed_stats", - "type": "[353]" + "type": "[356]" }, { - "name": "x_rd_latency_histogram", + "name": "rd_latency_histogram", "default": null, - "type": "354" + "type": "357" }, { - "name": "x_wr_latency_histogram", + "name": "wr_latency_histogram", "default": null, - "type": "354" + "type": "357" }, { - "name": "x_flush_latency_histogram", + "name": "flush_latency_histogram", "default": null, - "type": "354" + "type": "357" } ], "meta-type": "object" }, { - "name": "228", + "name": "229", "meta-type": "enum", "values": [ "existing", @@ -13971,7 +14060,7 @@ ] }, { - "name": "229", + "name": "230", "meta-type": "enum", "values": [ "top", @@ -13981,7 +14070,7 @@ ] }, { - "name": "230", + "name": "231", "meta-type": "enum", "values": [ "report", @@ -13992,7 +14081,7 @@ ] }, { - "name": "231", + "name": "232", "meta-type": "enum", "values": [ "off", @@ -14001,7 +14090,7 @@ ] }, { - "name": "232", + "name": "233", "members": [ { "name": "filename", @@ -14063,18 +14152,18 @@ { "name": "backing-image", "default": null, - "type": "232" + "type": "233" }, { "name": "format-specific", "default": null, - "type": "355" + "type": "358" } ], "meta-type": "object" }, { - "name": "233", + "name": "234", "members": [ { "name": "writeback", @@ -14092,12 +14181,12 @@ "meta-type": "object" }, { - "name": "[234]", - "element-type": "234", + "name": "[235]", + "element-type": "235", "meta-type": "array" }, { - "name": "234", + "name": "235", "members": [ { "name": "id", @@ -14105,7 +14194,7 @@ }, { "name": "type", - "type": "356" + "type": "359" }, { "name": "name", @@ -14115,12 +14204,12 @@ "meta-type": "object" }, { - "name": "[235]", - "element-type": "235", + "name": "[236]", + "element-type": "236", "meta-type": "array" }, { - "name": "235", + "name": "236", "members": [ { "name": "parent", @@ -14136,17 +14225,17 @@ }, { "name": "perm", - "type": "[357]" + "type": "[360]" }, { "name": "shared-perm", - "type": "[357]" + "type": "[360]" } ], "meta-type": "object" }, { - "name": "236", + "name": "237", "meta-type": "enum", "values": [ "background", @@ -14159,7 +14248,7 @@ "meta-type": "array" }, { - "name": "237", + "name": "238", "meta-type": "enum", "values": [ "blkdebug", @@ -14204,7 +14293,7 @@ ] }, { - "name": "238", + "name": "239", "meta-type": "enum", "values": [ "ignore", @@ -14212,7 +14301,7 @@ ] }, { - "name": "239", + "name": "240", "members": [ { "name": "direct", @@ -14228,11 +14317,11 @@ "meta-type": "object" }, { - "name": "240", + "name": "241", "members": [ { "name": "image", - "type": "358" + "type": "361" }, { "name": "config", @@ -14272,26 +14361,26 @@ { "name": "inject-error", "default": null, - "type": "[359]" + "type": "[362]" }, { "name": "set-state", "default": null, - "type": "[360]" + "type": "[363]" } ], "meta-type": "object" }, { - "name": "241", + "name": "242", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "log", - "type": "358" + "type": "361" }, { "name": "log-sector-size", @@ -14312,31 +14401,31 @@ "meta-type": "object" }, { - "name": "242", + "name": "243", "members": [ { "name": "test", - "type": "358" + "type": "361" }, { "name": "raw", - "type": "358" + "type": "361" } ], "meta-type": "object" }, { - "name": "243", + "name": "244", "members": [ { "name": "file", - "type": "358" + "type": "361" } ], "meta-type": "object" }, { - "name": "244", + "name": "245", "members": [ { "name": "filename", @@ -14350,12 +14439,17 @@ { "name": "locking", "default": null, - "type": "361" + "type": "364" }, { "name": "aio", "default": null, - "type": "362" + "type": "365" + }, + { + "name": "drop-cache", + "default": null, + "type": "bool" }, { "name": "x-check-cache-dropped", @@ -14363,10 +14457,13 @@ "type": "bool" } ], - "meta-type": "object" + "meta-type": "object", + "features": [ + "dynamic-auto-read-only" + ] }, { - "name": "245", + "name": "246", "members": [ { "name": "url", @@ -14406,7 +14503,7 @@ "meta-type": "object" }, { - "name": "246", + "name": "247", "members": [ { "name": "url", @@ -14451,7 +14548,7 @@ "meta-type": "object" }, { - "name": "247", + "name": "248", "members": [ { "name": "volume", @@ -14463,7 +14560,7 @@ }, { "name": "server", - "type": "[363]" + "type": "[308]" }, { "name": "debug", @@ -14479,7 +14576,7 @@ "meta-type": "object" }, { - "name": "248", + "name": "249", "members": [ { "name": "url", @@ -14529,7 +14626,7 @@ "meta-type": "object" }, { - "name": "249", + "name": "250", "members": [ { "name": "url", @@ -14584,11 +14681,11 @@ "meta-type": "object" }, { - "name": "250", + "name": "251", "members": [ { "name": "transport", - "type": "364" + "type": "366" }, { "name": "portal", @@ -14621,7 +14718,7 @@ { "name": "header-digest", "default": null, - "type": "365" + "type": "367" }, { "name": "timeout", @@ -14632,11 +14729,11 @@ "meta-type": "object" }, { - "name": "251", + "name": "252", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "key-secret", @@ -14647,11 +14744,11 @@ "meta-type": "object" }, { - "name": "252", + "name": "253", "members": [ { "name": "server", - "type": "363" + "type": "308" }, { "name": "export", @@ -14672,11 +14769,11 @@ "meta-type": "object" }, { - "name": "253", + "name": "254", "members": [ { "name": "server", - "type": "366" + "type": "368" }, { "name": "path", @@ -14716,7 +14813,7 @@ "meta-type": "object" }, { - "name": "254", + "name": "255", "members": [ { "name": "size", @@ -14732,7 +14829,7 @@ "meta-type": "object" }, { - "name": "255", + "name": "256", "members": [ { "name": "device", @@ -14746,16 +14843,16 @@ "meta-type": "object" }, { - "name": "256", + "name": "257", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "backing", "default": null, - "type": "367" + "type": "369" }, { "name": "lazy-refcounts", @@ -14780,7 +14877,7 @@ { "name": "overlap-check", "default": null, - "type": "368" + "type": "370" }, { "name": "cache-size", @@ -14810,48 +14907,53 @@ { "name": "encrypt", "default": null, - "type": "369" + "type": "371" + }, + { + "name": "data-file", + "default": null, + "type": "361" } ], "meta-type": "object" }, { - "name": "257", + "name": "258", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "backing", "default": null, - "type": "367" + "type": "369" }, { "name": "encrypt", "default": null, - "type": "370" + "type": "372" } ], "meta-type": "object" }, { - "name": "258", + "name": "259", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "backing", "default": null, - "type": "367" + "type": "369" } ], "meta-type": "object" }, { - "name": "259", + "name": "260", "members": [ { "name": "blkverify", @@ -14860,7 +14962,7 @@ }, { "name": "children", - "type": "[358]" + "type": "[361]" }, { "name": "vote-threshold", @@ -14874,17 +14976,17 @@ { "name": "read-pattern", "default": null, - "type": "371" + "type": "373" } ], "meta-type": "object" }, { - "name": "260", + "name": "261", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "offset", @@ -14900,7 +15002,7 @@ "meta-type": "object" }, { - "name": "261", + "name": "262", "members": [ { "name": "pool", @@ -14928,7 +15030,7 @@ { "name": "auth-client-required", "default": null, - "type": "[372]" + "type": "[374]" }, { "name": "key-secret", @@ -14938,21 +15040,21 @@ { "name": "server", "default": null, - "type": "[373]" + "type": "[375]" } ], "meta-type": "object" }, { - "name": "262", + "name": "263", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "mode", - "type": "374" + "type": "376" }, { "name": "top-id", @@ -14963,11 +15065,11 @@ "meta-type": "object" }, { - "name": "263", + "name": "264", "members": [ { "name": "server", - "type": "363" + "type": "308" }, { "name": "vdi", @@ -14987,11 +15089,11 @@ "meta-type": "object" }, { - "name": "264", + "name": "265", "members": [ { "name": "server", - "type": "375" + "type": "377" }, { "name": "path", @@ -15005,13 +15107,13 @@ { "name": "host-key-check", "default": null, - "type": "376" + "type": "378" } ], "meta-type": "object" }, { - "name": "265", + "name": "266", "members": [ { "name": "throttle-group", @@ -15019,13 +15121,13 @@ }, { "name": "file", - "type": "358" + "type": "361" } ], "meta-type": "object" }, { - "name": "266", + "name": "267", "members": [ { "name": "dir", @@ -15055,7 +15157,7 @@ "meta-type": "object" }, { - "name": "267", + "name": "268", "members": [ { "name": "vdisk-id", @@ -15063,7 +15165,7 @@ }, { "name": "server", - "type": "373" + "type": "375" }, { "name": "tls-creds", @@ -15074,68 +15176,68 @@ "meta-type": "object" }, { - "name": "268", + "name": "269", "tag": "driver", "variants": [ { "case": "file", - "type": "377" + "type": "379" }, { "case": "gluster", - "type": "378" + "type": "380" }, { "case": "luks", - "type": "379" + "type": "381" }, { "case": "nfs", - "type": "380" + "type": "382" }, { "case": "parallels", - "type": "381" + "type": "383" }, { "case": "qcow", - "type": "382" + "type": "384" }, { "case": "qcow2", - "type": "383" + "type": "385" }, { "case": "qed", - "type": "384" + "type": "386" }, { "case": "rbd", - "type": "385" + "type": "387" }, { "case": "sheepdog", - "type": "386" + "type": "388" }, { "case": "ssh", - "type": "387" + "type": "389" }, { "case": "vdi", - "type": "388" + "type": "390" }, { "case": "vhdx", - "type": "389" + "type": "391" }, { "case": "vmdk", - "type": "390" + "type": "392" }, { "case": "vpc", - "type": "391" + "type": "393" }, { "case": "blkdebug", @@ -15237,13 +15339,13 @@ "members": [ { "name": "driver", - "type": "237" + "type": "238" } ], "meta-type": "object" }, { - "name": "269", + "name": "270", "meta-type": "enum", "values": [ "retain", @@ -15252,7 +15354,7 @@ ] }, { - "name": "270", + "name": "271", "meta-type": "enum", "values": [ "read", @@ -15260,7 +15362,7 @@ ] }, { - "name": "271", + "name": "272", "meta-type": "enum", "values": [ "ignore", @@ -15269,7 +15371,7 @@ ] }, { - "name": "272", + "name": "273", "members": [ { "type": "str" @@ -15281,36 +15383,36 @@ "meta-type": "alternate" }, { - "name": "273", + "name": "274", "tag": "type", "variants": [ { "case": "inet", - "type": "393" + "type": "395" }, { "case": "unix", - "type": "394" + "type": "396" }, { "case": "vsock", - "type": "395" + "type": "397" }, { "case": "fd", - "type": "396" + "type": "398" } ], "members": [ { "name": "type", - "type": "392" + "type": "394" } ], "meta-type": "object" }, { - "name": "274", + "name": "275", "meta-type": "enum", "values": [ "safe", @@ -15318,7 +15420,7 @@ ] }, { - "name": "275", + "name": "276", "meta-type": "enum", "values": [ "read", @@ -15327,7 +15429,7 @@ ] }, { - "name": "276", + "name": "277", "meta-type": "enum", "values": [ "utf8", @@ -15335,100 +15437,100 @@ ] }, { - "name": "277", + "name": "278", "tag": "type", "variants": [ { "case": "file", - "type": "398" + "type": "400" }, { "case": "serial", - "type": "399" + "type": "401" }, { "case": "parallel", - "type": "399" + "type": "401" }, { "case": "pipe", - "type": "399" + "type": "401" }, { "case": "socket", - "type": "400" + "type": "402" }, { "case": "udp", - "type": "401" + "type": "403" }, { "case": "pty", - "type": "402" + "type": "404" }, { "case": "null", - "type": "402" + "type": "404" }, { "case": "mux", - "type": "403" + "type": "405" }, { "case": "msmouse", - "type": "402" + "type": "404" }, { "case": "wctablet", - "type": "402" + "type": "404" }, { "case": "braille", - "type": "402" + "type": "404" }, { "case": "testdev", - "type": "402" + "type": "404" }, { "case": "stdio", - "type": "404" + "type": "406" }, { "case": "console", - "type": "402" + "type": "404" }, { "case": "spicevmc", - "type": "405" + "type": "407" }, { "case": "spiceport", - "type": "406" + "type": "408" }, { "case": "vc", - "type": "407" + "type": "409" }, { "case": "ringbuf", - "type": "408" + "type": "410" }, { "case": "memory", - "type": "408" + "type": "410" } ], "members": [ { "name": "type", - "type": "397" + "type": "399" } ], "meta-type": "object" }, { - "name": "278", + "name": "279", "meta-type": "enum", "values": [ "normal", @@ -15437,7 +15539,7 @@ ] }, { - "name": "279", + "name": "280", "meta-type": "enum", "values": [ "half", @@ -15445,7 +15547,7 @@ ] }, { - "name": "280", + "name": "281", "meta-type": "enum", "values": [ "off", @@ -15453,7 +15555,7 @@ ] }, { - "name": "281", + "name": "282", "members": [ { "name": "priority", @@ -15512,7 +15614,7 @@ "meta-type": "object" }, { - "name": "282", + "name": "283", "members": [ { "name": "in-pport", @@ -15553,7 +15655,7 @@ "meta-type": "object" }, { - "name": "283", + "name": "284", "members": [ { "name": "goto-tbl", @@ -15589,28 +15691,28 @@ "meta-type": "object" }, { - "name": "284", + "name": "285", "tag": "type", "variants": [ { "case": "passthrough", - "type": "410" + "type": "412" }, { "case": "emulator", - "type": "411" + "type": "413" } ], "members": [ { "name": "type", - "type": "409" + "type": "411" } ], "meta-type": "object" }, { - "name": "285", + "name": "286", "meta-type": "enum", "values": [ "client", @@ -15619,12 +15721,12 @@ ] }, { - "name": "[286]", - "element-type": "286", + "name": "[287]", + "element-type": "287", "meta-type": "array" }, { - "name": "286", + "name": "287", "members": [ { "name": "host", @@ -15636,7 +15738,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "connection-id", @@ -15658,7 +15760,7 @@ "meta-type": "object" }, { - "name": "287", + "name": "288", "members": [ { "name": "host", @@ -15670,13 +15772,13 @@ }, { "name": "family", - "type": "289" + "type": "290" } ], "meta-type": "object" }, { - "name": "288", + "name": "289", "members": [ { "name": "host", @@ -15688,7 +15790,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "auth", @@ -15699,7 +15801,7 @@ "meta-type": "object" }, { - "name": "289", + "name": "290", "meta-type": "enum", "values": [ "ipv4", @@ -15710,12 +15812,12 @@ ] }, { - "name": "[290]", - "element-type": "290", + "name": "[291]", + "element-type": "291", "meta-type": "array" }, { - "name": "290", + "name": "291", "members": [ { "name": "host", @@ -15727,7 +15829,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "websocket", @@ -15747,12 +15849,12 @@ "meta-type": "object" }, { - "name": "[291]", - "element-type": "291", + "name": "[292]", + "element-type": "292", "meta-type": "array" }, { - "name": "291", + "name": "292", "members": [ { "name": "host", @@ -15764,7 +15866,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "websocket", @@ -15772,18 +15874,18 @@ }, { "name": "auth", - "type": "292" + "type": "293" }, { "name": "vencrypt", "default": null, - "type": "293" + "type": "294" } ], "meta-type": "object" }, { - "name": "292", + "name": "293", "meta-type": "enum", "values": [ "none", @@ -15798,7 +15900,7 @@ ] }, { - "name": "293", + "name": "294", "meta-type": "enum", "values": [ "plain", @@ -15813,7 +15915,7 @@ ] }, { - "name": "294", + "name": "295", "members": [ { "name": "host", @@ -15825,7 +15927,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "websocket", @@ -15840,7 +15942,7 @@ "meta-type": "object" }, { - "name": "295", + "name": "296", "members": [ { "name": "host", @@ -15852,7 +15954,7 @@ }, { "name": "family", - "type": "289" + "type": "290" }, { "name": "websocket", @@ -15862,67 +15964,67 @@ "meta-type": "object" }, { - "name": "[296]", - "element-type": "296", + "name": "[297]", + "element-type": "297", "meta-type": "array" }, { - "name": "296", + "name": "297", "tag": "type", "variants": [ { "case": "number", - "type": "413" + "type": "415" }, { "case": "qcode", - "type": "414" + "type": "416" } ], "members": [ { "name": "type", - "type": "412" + "type": "414" } ], "meta-type": "object" }, { - "name": "[297]", - "element-type": "297", + "name": "[298]", + "element-type": "298", "meta-type": "array" }, { - "name": "297", + "name": "298", "tag": "type", "variants": [ { "case": "key", - "type": "416" + "type": "418" }, { "case": "btn", - "type": "417" + "type": "419" }, { "case": "rel", - "type": "418" + "type": "420" }, { "case": "abs", - "type": "418" + "type": "420" } ], "members": [ { "name": "type", - "type": "415" + "type": "417" } ], "meta-type": "object" }, { - "name": "298", + "name": "299", "meta-type": "enum", "values": [ "default", @@ -15931,11 +16033,12 @@ "sdl", "egl-headless", "curses", - "cocoa" + "cocoa", + "spice-app" ] }, { - "name": "299", + "name": "300", "meta-type": "enum", "values": [ "off", @@ -15945,7 +16048,7 @@ ] }, { - "name": "300", + "name": "301", "members": [ { "name": "grab-on-hover", @@ -15961,7 +16064,18 @@ "meta-type": "object" }, { - "name": "301", + "name": "302", + "members": [ + { + "name": "charset", + "default": null, + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "303", "members": [ { "name": "rendernode", @@ -15972,7 +16086,7 @@ "meta-type": "object" }, { - "name": "302", + "name": "304", "meta-type": "enum", "values": [ "none", @@ -15991,7 +16105,7 @@ ] }, { - "name": "303", + "name": "305", "members": [ { "name": "transferred", @@ -16053,7 +16167,7 @@ "meta-type": "object" }, { - "name": "304", + "name": "306", "members": [ { "name": "cache-size", @@ -16083,7 +16197,7 @@ "meta-type": "object" }, { - "name": "305", + "name": "307", "members": [ { "name": "pages", @@ -16109,7 +16223,41 @@ "meta-type": "object" }, { - "name": "306", + "name": "[308]", + "element-type": "308", + "meta-type": "array" + }, + { + "name": "308", + "tag": "type", + "variants": [ + { + "case": "inet", + "type": "377" + }, + { + "case": "unix", + "type": "422" + }, + { + "case": "vsock", + "type": "423" + }, + { + "case": "fd", + "type": "424" + } + ], + "members": [ + { + "name": "type", + "type": "421" + } + ], + "meta-type": "object" + }, + { + "name": "309", "meta-type": "enum", "values": [ "xbzrle", @@ -16124,14 +16272,15 @@ "block", "return-path", "pause-before-switchover", - "x-multifd", + "multifd", "dirty-bitmaps", "postcopy-blocktime", - "late-block-activate" + "late-block-activate", + "x-ignore-shared" ] }, { - "name": "307", + "name": "310", "meta-type": "enum", "values": [ "none", @@ -16140,12 +16289,13 @@ ] }, { - "name": "308", + "name": "311", "meta-type": "enum", "values": [ "none", "request", - "error" + "error", + "processing" ] }, { @@ -16154,80 +16304,80 @@ "meta-type": "builtin" }, { - "name": "[309]", - "element-type": "309", + "name": "[312]", + "element-type": "312", "meta-type": "array" }, { - "name": "309", + "name": "312", "tag": "type", "variants": [ { "case": "abort", - "type": "420" + "type": "426" }, { "case": "block-dirty-bitmap-add", - "type": "421" + "type": "427" }, { "case": "block-dirty-bitmap-clear", - "type": "422" + "type": "428" }, { "case": "block-dirty-bitmap-enable", - "type": "422" + "type": "428" }, { "case": "block-dirty-bitmap-disable", - "type": "422" + "type": "428" }, { "case": "block-dirty-bitmap-merge", - "type": "423" + "type": "429" }, { "case": "blockdev-backup", - "type": "424" + "type": "430" }, { "case": "blockdev-snapshot", - "type": "425" + "type": "431" }, { "case": "blockdev-snapshot-internal-sync", - "type": "426" + "type": "432" }, { "case": "blockdev-snapshot-sync", - "type": "427" + "type": "433" }, { "case": "drive-backup", - "type": "428" + "type": "434" } ], "members": [ { "name": "type", - "type": "419" + "type": "425" } ], "meta-type": "object" }, { - "name": "310", + "name": "313", "members": [ { "name": "completion-mode", "default": null, - "type": "429" + "type": "435" } ], "meta-type": "object" }, { - "name": "311", + "name": "314", "meta-type": "enum", "values": [ "unavailable", @@ -16236,7 +16386,7 @@ ] }, { - "name": "312", + "name": "315", "meta-type": "enum", "values": [ "builtin", @@ -16249,17 +16399,17 @@ ] }, { - "name": "313", + "name": "316", "members": [ { "name": "json-type", - "type": "430" + "type": "436" } ], "meta-type": "object" }, { - "name": "314", + "name": "317", "members": [ { "name": "values", @@ -16269,7 +16419,7 @@ "meta-type": "object" }, { - "name": "315", + "name": "318", "members": [ { "name": "element-type", @@ -16279,11 +16429,11 @@ "meta-type": "object" }, { - "name": "316", + "name": "319", "members": [ { "name": "members", - "type": "[431]" + "type": "[437]" }, { "name": "tag", @@ -16293,23 +16443,28 @@ { "name": "variants", "default": null, - "type": "[432]" + "type": "[438]" + }, + { + "name": "features", + "default": null, + "type": "[str]" } ], "meta-type": "object" }, { - "name": "317", + "name": "320", "members": [ { "name": "members", - "type": "[433]" + "type": "[439]" } ], "meta-type": "object" }, { - "name": "318", + "name": "321", "members": [ { "name": "arg-type", @@ -16328,7 +16483,7 @@ "meta-type": "object" }, { - "name": "319", + "name": "322", "members": [ { "name": "arg-type", @@ -16338,19 +16493,19 @@ "meta-type": "object" }, { - "name": "[320]", - "element-type": "320", + "name": "[323]", + "element-type": "323", "meta-type": "array" }, { - "name": "320", + "name": "323", "meta-type": "enum", "values": [ "oob" ] }, { - "name": "321", + "name": "324", "members": [ { "name": "major", @@ -16368,7 +16523,7 @@ "meta-type": "object" }, { - "name": "322", + "name": "325", "members": [ { "name": "node-id", @@ -16394,7 +16549,7 @@ "meta-type": "object" }, { - "name": "323", + "name": "326", "meta-type": "enum", "values": [ "x86", @@ -16408,7 +16563,7 @@ ] }, { - "name": "324", + "name": "327", "members": [ { "name": "pc", @@ -16418,7 +16573,7 @@ "meta-type": "object" }, { - "name": "325", + "name": "328", "members": [ { "name": "pc", @@ -16432,7 +16587,7 @@ "meta-type": "object" }, { - "name": "326", + "name": "329", "members": [ { "name": "nip", @@ -16442,7 +16597,7 @@ "meta-type": "object" }, { - "name": "327", + "name": "330", "members": [ { "name": "PC", @@ -16452,7 +16607,7 @@ "meta-type": "object" }, { - "name": "328", + "name": "331", "members": [ { "name": "PC", @@ -16462,17 +16617,17 @@ "meta-type": "object" }, { - "name": "329", + "name": "332", "members": [ { "name": "cpu-state", - "type": "434" + "type": "440" } ], "meta-type": "object" }, { - "name": "330", + "name": "333", "members": [ { "name": "pc", @@ -16482,7 +16637,7 @@ "meta-type": "object" }, { - "name": "331", + "name": "334", "meta-type": "enum", "values": [ "aarch64", @@ -16519,12 +16674,12 @@ ] }, { - "name": "[332]", - "element-type": "332", + "name": "[335]", + "element-type": "335", "meta-type": "array" }, { - "name": "332", + "name": "335", "members": [ { "name": "bus", @@ -16540,11 +16695,11 @@ }, { "name": "class_info", - "type": "435" + "type": "441" }, { "name": "id", - "type": "436" + "type": "442" }, { "name": "irq", @@ -16558,17 +16713,17 @@ { "name": "pci_bridge", "default": null, - "type": "437" + "type": "443" }, { "name": "regions", - "type": "[438]" + "type": "[444]" } ], "meta-type": "object" }, { - "name": "333", + "name": "336", "meta-type": "enum", "values": [ "elf", @@ -16579,7 +16734,7 @@ ] }, { - "name": "334", + "name": "337", "meta-type": "enum", "values": [ "none", @@ -16589,43 +16744,10 @@ ] }, { - "name": "[333]", - "element-type": "333", + "name": "[336]", + "element-type": "336", "meta-type": "array" }, - { - "name": "335", - "meta-type": "enum", - "values": [ - "static", - "full" - ] - }, - { - "name": "336", - "members": [ - { - "name": "name", - "type": "str" - }, - { - "name": "props", - "default": null, - "type": "any" - } - ], - "meta-type": "object" - }, - { - "name": "337", - "meta-type": "enum", - "values": [ - "incompatible", - "identical", - "superset", - "subset" - ] - }, { "name": "[338]", "element-type": "338", @@ -16660,7 +16782,7 @@ }, { "name": "type", - "type": "439" + "type": "445" }, { "name": "help", @@ -16698,33 +16820,21 @@ "members": [ { "name": "data", - "type": "440" + "type": "446" } ], "meta-type": "object" }, { - "name": "343", - "meta-type": "enum", - "values": [ - "DIMM", - "CPU" - ] - }, - { - "name": "344", - "meta-type": "enum", - "values": [ - "uninit", - "launch-update", - "launch-secret", - "running", - "send-update", - "receive-update" + "name": "343", + "meta-type": "enum", + "values": [ + "DIMM", + "CPU" ] }, { - "name": "345", + "name": "344", "meta-type": "enum", "values": [ "node", @@ -16733,7 +16843,7 @@ ] }, { - "name": "346", + "name": "345", "members": [ { "name": "nodeid", @@ -16759,7 +16869,7 @@ "meta-type": "object" }, { - "name": "347", + "name": "346", "members": [ { "name": "src", @@ -16777,7 +16887,7 @@ "meta-type": "object" }, { - "name": "348", + "name": "347", "members": [ { "name": "node-id", @@ -16802,8 +16912,53 @@ ], "meta-type": "object" }, + { + "name": "348", + "meta-type": "enum", + "values": [ + "uninit", + "launch-update", + "launch-secret", + "running", + "send-update", + "receive-update" + ] + }, { "name": "349", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "props", + "default": null, + "type": "any" + } + ], + "meta-type": "object" + }, + { + "name": "350", + "meta-type": "enum", + "values": [ + "incompatible", + "identical", + "superset", + "subset" + ] + }, + { + "name": "351", + "meta-type": "enum", + "values": [ + "static", + "full" + ] + }, + { + "name": "352", "meta-type": "enum", "values": [ "hyper-v", @@ -16811,7 +16966,7 @@ ] }, { - "name": "350", + "name": "353", "members": [ { "name": "arg1", @@ -16837,7 +16992,7 @@ "meta-type": "object" }, { - "name": "351", + "name": "354", "members": [ { "name": "core", @@ -16853,28 +17008,29 @@ }, { "name": "reason", - "type": "441" + "type": "447" } ], "meta-type": "object" }, { - "name": "352", + "name": "355", "meta-type": "enum", "values": [ "active", "disabled", "frozen", - "locked" + "locked", + "inconsistent" ] }, { - "name": "[353]", - "element-type": "353", + "name": "[356]", + "element-type": "356", "meta-type": "array" }, { - "name": "353", + "name": "356", "members": [ { "name": "interval_length", @@ -16928,7 +17084,7 @@ "meta-type": "object" }, { - "name": "354", + "name": "357", "members": [ { "name": "boundaries", @@ -16947,32 +17103,32 @@ "meta-type": "array" }, { - "name": "355", + "name": "358", "tag": "type", "variants": [ { "case": "qcow2", - "type": "443" + "type": "449" }, { "case": "vmdk", - "type": "444" + "type": "450" }, { "case": "luks", - "type": "445" + "type": "451" } ], "members": [ { "name": "type", - "type": "442" + "type": "448" } ], "meta-type": "object" }, { - "name": "356", + "name": "359", "meta-type": "enum", "values": [ "block-backend", @@ -16981,12 +17137,12 @@ ] }, { - "name": "[357]", - "element-type": "357", + "name": "[360]", + "element-type": "360", "meta-type": "array" }, { - "name": "357", + "name": "360", "meta-type": "enum", "values": [ "consistent-read", @@ -16997,7 +17153,7 @@ ] }, { - "name": "358", + "name": "361", "members": [ { "type": "45" @@ -17009,16 +17165,16 @@ "meta-type": "alternate" }, { - "name": "[359]", - "element-type": "359", + "name": "[362]", + "element-type": "362", "meta-type": "array" }, { - "name": "359", + "name": "362", "members": [ { "name": "event", - "type": "446" + "type": "452" }, { "name": "state", @@ -17049,16 +17205,16 @@ "meta-type": "object" }, { - "name": "[360]", - "element-type": "360", + "name": "[363]", + "element-type": "363", "meta-type": "array" }, { - "name": "360", + "name": "363", "members": [ { "name": "event", - "type": "446" + "type": "452" }, { "name": "state", @@ -17073,7 +17229,7 @@ "meta-type": "object" }, { - "name": "361", + "name": "364", "meta-type": "enum", "values": [ "auto", @@ -17082,7 +17238,7 @@ ] }, { - "name": "362", + "name": "365", "meta-type": "enum", "values": [ "threads", @@ -17090,41 +17246,7 @@ ] }, { - "name": "[363]", - "element-type": "363", - "meta-type": "array" - }, - { - "name": "363", - "tag": "type", - "variants": [ - { - "case": "inet", - "type": "375" - }, - { - "case": "unix", - "type": "448" - }, - { - "case": "vsock", - "type": "449" - }, - { - "case": "fd", - "type": "450" - } - ], - "members": [ - { - "name": "type", - "type": "447" - } - ], - "meta-type": "object" - }, - { - "name": "364", + "name": "366", "meta-type": "enum", "values": [ "tcp", @@ -17132,7 +17254,7 @@ ] }, { - "name": "365", + "name": "367", "meta-type": "enum", "values": [ "crc32c", @@ -17142,11 +17264,11 @@ ] }, { - "name": "366", + "name": "368", "members": [ { "name": "type", - "type": "451" + "type": "453" }, { "name": "host", @@ -17156,7 +17278,7 @@ "meta-type": "object" }, { - "name": "367", + "name": "369", "members": [ { "type": "45" @@ -17171,62 +17293,62 @@ "meta-type": "alternate" }, { - "name": "368", + "name": "370", "members": [ { - "type": "452" + "type": "454" }, { - "type": "453" + "type": "455" } ], "meta-type": "alternate" }, { - "name": "369", + "name": "371", "tag": "format", "variants": [ { "case": "aes", - "type": "455" + "type": "457" }, { "case": "luks", - "type": "456" + "type": "458" } ], "members": [ { "name": "format", - "type": "454" + "type": "456" } ], "meta-type": "object" }, { - "name": "370", + "name": "372", "tag": "format", "variants": [ { "case": "aes", - "type": "455" + "type": "457" } ], "members": [ { "name": "format", - "type": "457" + "type": "459" } ], "meta-type": "object" }, { - "name": "[358]", - "element-type": "358", + "name": "[361]", + "element-type": "361", "meta-type": "array" }, { - "name": "371", + "name": "373", "meta-type": "enum", "values": [ "quorum", @@ -17234,12 +17356,12 @@ ] }, { - "name": "[372]", - "element-type": "372", + "name": "[374]", + "element-type": "374", "meta-type": "array" }, { - "name": "372", + "name": "374", "meta-type": "enum", "values": [ "cephx", @@ -17247,12 +17369,12 @@ ] }, { - "name": "[373]", - "element-type": "373", + "name": "[375]", + "element-type": "375", "meta-type": "array" }, { - "name": "373", + "name": "375", "members": [ { "name": "host", @@ -17266,7 +17388,7 @@ "meta-type": "object" }, { - "name": "374", + "name": "376", "meta-type": "enum", "values": [ "primary", @@ -17274,7 +17396,7 @@ ] }, { - "name": "375", + "name": "377", "members": [ { "name": "host", @@ -17308,12 +17430,12 @@ "meta-type": "object" }, { - "name": "376", + "name": "378", "tag": "mode", "variants": [ { "case": "hash", - "type": "459" + "type": "461" }, { "case": "none", @@ -17327,13 +17449,13 @@ "members": [ { "name": "mode", - "type": "458" + "type": "460" } ], "meta-type": "object" }, { - "name": "377", + "name": "379", "members": [ { "name": "filename", @@ -17346,7 +17468,7 @@ { "name": "preallocation", "default": null, - "type": "460" + "type": "462" }, { "name": "nocow", @@ -17357,11 +17479,11 @@ "meta-type": "object" }, { - "name": "378", + "name": "380", "members": [ { "name": "location", - "type": "247" + "type": "248" }, { "name": "size", @@ -17370,13 +17492,13 @@ { "name": "preallocation", "default": null, - "type": "460" + "type": "462" } ], "meta-type": "object" }, { - "name": "379", + "name": "381", "members": [ { "name": "key-secret", @@ -17386,27 +17508,27 @@ { "name": "cipher-alg", "default": null, - "type": "461" + "type": "463" }, { "name": "cipher-mode", "default": null, - "type": "462" + "type": "464" }, { "name": "ivgen-alg", "default": null, - "type": "463" + "type": "465" }, { "name": "ivgen-hash-alg", "default": null, - "type": "464" + "type": "466" }, { "name": "hash-alg", "default": null, - "type": "464" + "type": "466" }, { "name": "iter-time", @@ -17415,7 +17537,7 @@ }, { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17425,11 +17547,11 @@ "meta-type": "object" }, { - "name": "380", + "name": "382", "members": [ { "name": "location", - "type": "253" + "type": "254" }, { "name": "size", @@ -17439,11 +17561,11 @@ "meta-type": "object" }, { - "name": "381", + "name": "383", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17458,11 +17580,11 @@ "meta-type": "object" }, { - "name": "382", + "name": "384", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17476,17 +17598,27 @@ { "name": "encrypt", "default": null, - "type": "465" + "type": "467" } ], "meta-type": "object" }, { - "name": "383", + "name": "385", "members": [ { "name": "file", - "type": "358" + "type": "361" + }, + { + "name": "data-file", + "default": null, + "type": "361" + }, + { + "name": "data-file-raw", + "default": null, + "type": "bool" }, { "name": "size", @@ -17495,7 +17627,7 @@ { "name": "version", "default": null, - "type": "466" + "type": "468" }, { "name": "backing-file", @@ -17505,12 +17637,12 @@ { "name": "backing-fmt", "default": null, - "type": "237" + "type": "238" }, { "name": "encrypt", "default": null, - "type": "465" + "type": "467" }, { "name": "cluster-size", @@ -17520,7 +17652,7 @@ { "name": "preallocation", "default": null, - "type": "460" + "type": "462" }, { "name": "lazy-refcounts", @@ -17536,11 +17668,11 @@ "meta-type": "object" }, { - "name": "384", + "name": "386", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17554,7 +17686,7 @@ { "name": "backing-fmt", "default": null, - "type": "237" + "type": "238" }, { "name": "cluster-size", @@ -17570,11 +17702,11 @@ "meta-type": "object" }, { - "name": "385", + "name": "387", "members": [ { "name": "location", - "type": "261" + "type": "262" }, { "name": "size", @@ -17589,11 +17721,11 @@ "meta-type": "object" }, { - "name": "386", + "name": "388", "members": [ { "name": "location", - "type": "263" + "type": "264" }, { "name": "size", @@ -17607,12 +17739,12 @@ { "name": "preallocation", "default": null, - "type": "460" + "type": "462" }, { "name": "redundancy", "default": null, - "type": "467" + "type": "469" }, { "name": "object-size", @@ -17623,11 +17755,11 @@ "meta-type": "object" }, { - "name": "387", + "name": "389", "members": [ { "name": "location", - "type": "264" + "type": "265" }, { "name": "size", @@ -17637,11 +17769,11 @@ "meta-type": "object" }, { - "name": "388", + "name": "390", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17650,17 +17782,17 @@ { "name": "preallocation", "default": null, - "type": "460" + "type": "462" } ], "meta-type": "object" }, { - "name": "389", + "name": "391", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17679,7 +17811,7 @@ { "name": "subformat", "default": null, - "type": "468" + "type": "470" }, { "name": "block-state-zero", @@ -17690,11 +17822,11 @@ "meta-type": "object" }, { - "name": "390", + "name": "392", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17703,12 +17835,12 @@ { "name": "extents", "default": null, - "type": "[358]" + "type": "[361]" }, { "name": "subformat", "default": null, - "type": "469" + "type": "471" }, { "name": "backing-file", @@ -17718,7 +17850,7 @@ { "name": "adapter-type", "default": null, - "type": "470" + "type": "472" }, { "name": "hwversion", @@ -17734,11 +17866,11 @@ "meta-type": "object" }, { - "name": "391", + "name": "393", "members": [ { "name": "file", - "type": "358" + "type": "361" }, { "name": "size", @@ -17747,7 +17879,7 @@ { "name": "subformat", "default": null, - "type": "471" + "type": "473" }, { "name": "force-size", @@ -17763,7 +17895,7 @@ "meta-type": "builtin" }, { - "name": "392", + "name": "394", "meta-type": "enum", "values": [ "inet", @@ -17773,47 +17905,47 @@ ] }, { - "name": "393", + "name": "395", "members": [ { "name": "data", - "type": "375" + "type": "377" } ], "meta-type": "object" }, { - "name": "394", + "name": "396", "members": [ { "name": "data", - "type": "448" + "type": "422" } ], "meta-type": "object" }, { - "name": "395", + "name": "397", "members": [ { "name": "data", - "type": "449" + "type": "423" } ], "meta-type": "object" }, { - "name": "396", + "name": "398", "members": [ { "name": "data", - "type": "450" + "type": "424" } ], "meta-type": "object" }, { - "name": "397", + "name": "399", "meta-type": "enum", "values": [ "file", @@ -17838,26 +17970,6 @@ "memory" ] }, - { - "name": "398", - "members": [ - { - "name": "data", - "type": "472" - } - ], - "meta-type": "object" - }, - { - "name": "399", - "members": [ - { - "name": "data", - "type": "473" - } - ], - "meta-type": "object" - }, { "name": "400", "members": [ @@ -17950,6 +18062,26 @@ }, { "name": "409", + "members": [ + { + "name": "data", + "type": "483" + } + ], + "meta-type": "object" + }, + { + "name": "410", + "members": [ + { + "name": "data", + "type": "484" + } + ], + "meta-type": "object" + }, + { + "name": "411", "meta-type": "enum", "values": [ "passthrough", @@ -17957,27 +18089,27 @@ ] }, { - "name": "410", + "name": "412", "members": [ { "name": "data", - "type": "483" + "type": "485" } ], "meta-type": "object" }, { - "name": "411", + "name": "413", "members": [ { "name": "data", - "type": "484" + "type": "486" } ], "meta-type": "object" }, { - "name": "412", + "name": "414", "meta-type": "enum", "values": [ "number", @@ -17985,7 +18117,7 @@ ] }, { - "name": "413", + "name": "415", "members": [ { "name": "data", @@ -17995,17 +18127,17 @@ "meta-type": "object" }, { - "name": "414", + "name": "416", "members": [ { "name": "data", - "type": "485" + "type": "487" } ], "meta-type": "object" }, { - "name": "415", + "name": "417", "meta-type": "enum", "values": [ "key", @@ -18015,37 +18147,81 @@ ] }, { - "name": "416", + "name": "418", "members": [ { "name": "data", - "type": "486" + "type": "488" } ], "meta-type": "object" }, { - "name": "417", + "name": "419", "members": [ { "name": "data", - "type": "487" + "type": "489" } ], "meta-type": "object" }, { - "name": "418", + "name": "420", "members": [ { "name": "data", - "type": "488" + "type": "490" } ], "meta-type": "object" }, { - "name": "419", + "name": "421", + "meta-type": "enum", + "values": [ + "inet", + "unix", + "vsock", + "fd" + ] + }, + { + "name": "422", + "members": [ + { + "name": "path", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "423", + "members": [ + { + "name": "cid", + "type": "str" + }, + { + "name": "port", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "424", + "members": [ + { + "name": "str", + "type": "str" + } + ], + "meta-type": "object" + }, + { + "name": "425", "meta-type": "enum", "values": [ "abort", @@ -18062,17 +18238,17 @@ ] }, { - "name": "420", + "name": "426", "members": [ { "name": "data", - "type": "489" + "type": "491" } ], "meta-type": "object" }, { - "name": "421", + "name": "427", "members": [ { "name": "data", @@ -18082,7 +18258,7 @@ "meta-type": "object" }, { - "name": "422", + "name": "428", "members": [ { "name": "data", @@ -18092,7 +18268,7 @@ "meta-type": "object" }, { - "name": "423", + "name": "429", "members": [ { "name": "data", @@ -18102,7 +18278,7 @@ "meta-type": "object" }, { - "name": "424", + "name": "430", "members": [ { "name": "data", @@ -18112,7 +18288,7 @@ "meta-type": "object" }, { - "name": "425", + "name": "431", "members": [ { "name": "data", @@ -18122,7 +18298,7 @@ "meta-type": "object" }, { - "name": "426", + "name": "432", "members": [ { "name": "data", @@ -18132,7 +18308,7 @@ "meta-type": "object" }, { - "name": "427", + "name": "433", "members": [ { "name": "data", @@ -18142,7 +18318,7 @@ "meta-type": "object" }, { - "name": "428", + "name": "434", "members": [ { "name": "data", @@ -18152,7 +18328,7 @@ "meta-type": "object" }, { - "name": "429", + "name": "435", "meta-type": "enum", "values": [ "individual", @@ -18160,7 +18336,7 @@ ] }, { - "name": "430", + "name": "436", "meta-type": "enum", "values": [ "string", @@ -18174,12 +18350,12 @@ ] }, { - "name": "[431]", - "element-type": "431", + "name": "[437]", + "element-type": "437", "meta-type": "array" }, { - "name": "431", + "name": "437", "members": [ { "name": "name", @@ -18198,12 +18374,12 @@ "meta-type": "object" }, { - "name": "[432]", - "element-type": "432", + "name": "[438]", + "element-type": "438", "meta-type": "array" }, { - "name": "432", + "name": "438", "members": [ { "name": "case", @@ -18217,12 +18393,12 @@ "meta-type": "object" }, { - "name": "[433]", - "element-type": "433", + "name": "[439]", + "element-type": "439", "meta-type": "array" }, { - "name": "433", + "name": "439", "members": [ { "name": "type", @@ -18232,7 +18408,7 @@ "meta-type": "object" }, { - "name": "434", + "name": "440", "meta-type": "enum", "values": [ "uninitialized", @@ -18243,7 +18419,7 @@ ] }, { - "name": "435", + "name": "441", "members": [ { "name": "desc", @@ -18258,7 +18434,7 @@ "meta-type": "object" }, { - "name": "436", + "name": "442", "members": [ { "name": "device", @@ -18282,27 +18458,27 @@ "meta-type": "object" }, { - "name": "437", + "name": "443", "members": [ { "name": "bus", - "type": "490" + "type": "492" }, { "name": "devices", "default": null, - "type": "[332]" + "type": "[335]" } ], "meta-type": "object" }, { - "name": "[438]", - "element-type": "438", + "name": "[444]", + "element-type": "444", "meta-type": "array" }, { - "name": "438", + "name": "444", "members": [ { "name": "bar", @@ -18334,7 +18510,7 @@ "meta-type": "object" }, { - "name": "439", + "name": "445", "meta-type": "enum", "values": [ "string", @@ -18344,7 +18520,7 @@ ] }, { - "name": "440", + "name": "446", "members": [ { "name": "id", @@ -18383,7 +18559,7 @@ "meta-type": "object" }, { - "name": "441", + "name": "447", "meta-type": "enum", "values": [ "unknown", @@ -18394,7 +18570,7 @@ ] }, { - "name": "442", + "name": "448", "meta-type": "enum", "values": [ "qcow2", @@ -18403,37 +18579,37 @@ ] }, { - "name": "443", + "name": "449", "members": [ { "name": "data", - "type": "491" + "type": "493" } ], "meta-type": "object" }, { - "name": "444", + "name": "450", "members": [ { "name": "data", - "type": "492" + "type": "494" } ], "meta-type": "object" }, { - "name": "445", + "name": "451", "members": [ { "name": "data", - "type": "493" + "type": "495" } ], "meta-type": "object" }, { - "name": "446", + "name": "452", "meta-type": "enum", "values": [ "l1_update", @@ -18473,75 +18649,31 @@ "flush_to_disk", "pwritev_rmw_head", "pwritev_rmw_after_head", - "pwritev_rmw_tail", - "pwritev_rmw_after_tail", - "pwritev", - "pwritev_zero", - "pwritev_done", - "empty_image_prepare", - "l1_shrink_write_table", - "l1_shrink_free_l2_clusters", - "cor_write" - ] - }, - { - "name": "447", - "meta-type": "enum", - "values": [ - "inet", - "unix", - "vsock", - "fd" + "pwritev_rmw_tail", + "pwritev_rmw_after_tail", + "pwritev", + "pwritev_zero", + "pwritev_done", + "empty_image_prepare", + "l1_shrink_write_table", + "l1_shrink_free_l2_clusters", + "cor_write" ] }, { - "name": "448", - "members": [ - { - "name": "path", - "type": "str" - } - ], - "meta-type": "object" - }, - { - "name": "449", - "members": [ - { - "name": "cid", - "type": "str" - }, - { - "name": "port", - "type": "str" - } - ], - "meta-type": "object" - }, - { - "name": "450", - "members": [ - { - "name": "str", - "type": "str" - } - ], - "meta-type": "object" - }, - { - "name": "451", + "name": "453", "meta-type": "enum", "values": [ "inet" ] }, { - "name": "452", + "name": "454", "members": [ { "name": "template", "default": null, - "type": "453" + "type": "455" }, { "name": "main-header", @@ -18592,7 +18724,7 @@ "meta-type": "object" }, { - "name": "453", + "name": "455", "meta-type": "enum", "values": [ "none", @@ -18602,7 +18734,7 @@ ] }, { - "name": "454", + "name": "456", "meta-type": "enum", "values": [ "aes", @@ -18610,7 +18742,7 @@ ] }, { - "name": "455", + "name": "457", "members": [ { "name": "key-secret", @@ -18621,7 +18753,7 @@ "meta-type": "object" }, { - "name": "456", + "name": "458", "members": [ { "name": "key-secret", @@ -18632,14 +18764,14 @@ "meta-type": "object" }, { - "name": "457", + "name": "459", "meta-type": "enum", "values": [ "aes" ] }, { - "name": "458", + "name": "460", "meta-type": "enum", "values": [ "none", @@ -18648,11 +18780,11 @@ ] }, { - "name": "459", + "name": "461", "members": [ { "name": "type", - "type": "494" + "type": "496" }, { "name": "hash", @@ -18662,7 +18794,7 @@ "meta-type": "object" }, { - "name": "460", + "name": "462", "meta-type": "enum", "values": [ "off", @@ -18672,7 +18804,7 @@ ] }, { - "name": "461", + "name": "463", "meta-type": "enum", "values": [ "aes-128", @@ -18690,7 +18822,7 @@ ] }, { - "name": "462", + "name": "464", "meta-type": "enum", "values": [ "ecb", @@ -18700,7 +18832,7 @@ ] }, { - "name": "463", + "name": "465", "meta-type": "enum", "values": [ "plain", @@ -18709,7 +18841,7 @@ ] }, { - "name": "464", + "name": "466", "meta-type": "enum", "values": [ "md5", @@ -18722,28 +18854,28 @@ ] }, { - "name": "465", + "name": "467", "tag": "format", "variants": [ { "case": "qcow", - "type": "455" + "type": "457" }, { "case": "luks", - "type": "496" + "type": "498" } ], "members": [ { "name": "format", - "type": "495" + "type": "497" } ], "meta-type": "object" }, { - "name": "466", + "name": "468", "meta-type": "enum", "values": [ "v2", @@ -18751,28 +18883,28 @@ ] }, { - "name": "467", + "name": "469", "tag": "type", "variants": [ { "case": "full", - "type": "498" + "type": "500" }, { "case": "erasure-coded", - "type": "499" + "type": "501" } ], "members": [ { "name": "type", - "type": "497" + "type": "499" } ], "meta-type": "object" }, { - "name": "468", + "name": "470", "meta-type": "enum", "values": [ "dynamic", @@ -18780,7 +18912,7 @@ ] }, { - "name": "469", + "name": "471", "meta-type": "enum", "values": [ "monolithicSparse", @@ -18791,7 +18923,7 @@ ] }, { - "name": "470", + "name": "472", "meta-type": "enum", "values": [ "ide", @@ -18801,7 +18933,7 @@ ] }, { - "name": "471", + "name": "473", "meta-type": "enum", "values": [ "dynamic", @@ -18809,7 +18941,7 @@ ] }, { - "name": "472", + "name": "474", "members": [ { "name": "logfile", @@ -18839,7 +18971,7 @@ "meta-type": "object" }, { - "name": "473", + "name": "475", "members": [ { "name": "logfile", @@ -18859,7 +18991,7 @@ "meta-type": "object" }, { - "name": "474", + "name": "476", "members": [ { "name": "logfile", @@ -18873,13 +19005,18 @@ }, { "name": "addr", - "type": "273" + "type": "274" }, { "name": "tls-creds", "default": null, "type": "str" }, + { + "name": "tls-authz", + "default": null, + "type": "str" + }, { "name": "server", "default": null, @@ -18919,7 +19056,7 @@ "meta-type": "object" }, { - "name": "475", + "name": "477", "members": [ { "name": "logfile", @@ -18933,18 +19070,18 @@ }, { "name": "remote", - "type": "273" + "type": "274" }, { "name": "local", "default": null, - "type": "273" + "type": "274" } ], "meta-type": "object" }, { - "name": "476", + "name": "478", "members": [ { "name": "logfile", @@ -18960,7 +19097,7 @@ "meta-type": "object" }, { - "name": "477", + "name": "479", "members": [ { "name": "logfile", @@ -18980,7 +19117,7 @@ "meta-type": "object" }, { - "name": "478", + "name": "480", "members": [ { "name": "logfile", @@ -19001,7 +19138,7 @@ "meta-type": "object" }, { - "name": "479", + "name": "481", "members": [ { "name": "logfile", @@ -19021,7 +19158,7 @@ "meta-type": "object" }, { - "name": "480", + "name": "482", "members": [ { "name": "logfile", @@ -19041,7 +19178,7 @@ "meta-type": "object" }, { - "name": "481", + "name": "483", "members": [ { "name": "logfile", @@ -19077,7 +19214,7 @@ "meta-type": "object" }, { - "name": "482", + "name": "484", "members": [ { "name": "logfile", @@ -19098,7 +19235,7 @@ "meta-type": "object" }, { - "name": "483", + "name": "485", "members": [ { "name": "path", @@ -19114,7 +19251,7 @@ "meta-type": "object" }, { - "name": "484", + "name": "486", "members": [ { "name": "chardev", @@ -19124,7 +19261,7 @@ "meta-type": "object" }, { - "name": "485", + "name": "487", "meta-type": "enum", "values": [ "unmapped", @@ -19278,11 +19415,11 @@ ] }, { - "name": "486", + "name": "488", "members": [ { "name": "key", - "type": "296" + "type": "297" }, { "name": "down", @@ -19292,11 +19429,11 @@ "meta-type": "object" }, { - "name": "487", + "name": "489", "members": [ { "name": "button", - "type": "500" + "type": "502" }, { "name": "down", @@ -19306,11 +19443,11 @@ "meta-type": "object" }, { - "name": "488", + "name": "490", "members": [ { "name": "axis", - "type": "501" + "type": "503" }, { "name": "value", @@ -19320,13 +19457,13 @@ "meta-type": "object" }, { - "name": "489", + "name": "491", "members": [ ], "meta-type": "object" }, { - "name": "490", + "name": "492", "members": [ { "name": "number", @@ -19342,26 +19479,36 @@ }, { "name": "io_range", - "type": "502" + "type": "504" }, { "name": "memory_range", - "type": "502" + "type": "504" }, { "name": "prefetchable_range", - "type": "502" + "type": "504" } ], "meta-type": "object" }, { - "name": "491", + "name": "493", "members": [ { "name": "compat", "type": "str" }, + { + "name": "data-file", + "default": null, + "type": "str" + }, + { + "name": "data-file-raw", + "default": null, + "type": "bool" + }, { "name": "lazy-refcounts", "default": null, @@ -19379,13 +19526,18 @@ { "name": "encrypt", "default": null, - "type": "503" + "type": "505" + }, + { + "name": "bitmaps", + "default": null, + "type": "[506]" } ], "meta-type": "object" }, { - "name": "492", + "name": "494", "members": [ { "name": "create-type", @@ -19401,34 +19553,34 @@ }, { "name": "extents", - "type": "[232]" + "type": "[233]" } ], "meta-type": "object" }, { - "name": "493", + "name": "495", "members": [ { "name": "cipher-alg", - "type": "461" + "type": "463" }, { "name": "cipher-mode", - "type": "462" + "type": "464" }, { "name": "ivgen-alg", - "type": "463" + "type": "465" }, { "name": "ivgen-hash-alg", "default": null, - "type": "464" + "type": "466" }, { "name": "hash-alg", - "type": "464" + "type": "466" }, { "name": "payload-offset", @@ -19444,13 +19596,13 @@ }, { "name": "slots", - "type": "[504]" + "type": "[507]" } ], "meta-type": "object" }, { - "name": "494", + "name": "496", "meta-type": "enum", "values": [ "md5", @@ -19458,7 +19610,7 @@ ] }, { - "name": "495", + "name": "497", "meta-type": "enum", "values": [ "qcow", @@ -19466,7 +19618,7 @@ ] }, { - "name": "496", + "name": "498", "members": [ { "name": "key-secret", @@ -19476,27 +19628,27 @@ { "name": "cipher-alg", "default": null, - "type": "461" + "type": "463" }, { "name": "cipher-mode", "default": null, - "type": "462" + "type": "464" }, { "name": "ivgen-alg", "default": null, - "type": "463" + "type": "465" }, { "name": "ivgen-hash-alg", "default": null, - "type": "464" + "type": "466" }, { "name": "hash-alg", "default": null, - "type": "464" + "type": "466" }, { "name": "iter-time", @@ -19507,7 +19659,7 @@ "meta-type": "object" }, { - "name": "497", + "name": "499", "meta-type": "enum", "values": [ "full", @@ -19515,7 +19667,7 @@ ] }, { - "name": "498", + "name": "500", "members": [ { "name": "copies", @@ -19525,7 +19677,7 @@ "meta-type": "object" }, { - "name": "499", + "name": "501", "members": [ { "name": "data-strips", @@ -19539,7 +19691,7 @@ "meta-type": "object" }, { - "name": "500", + "name": "502", "meta-type": "enum", "values": [ "left", @@ -19552,7 +19704,7 @@ ] }, { - "name": "501", + "name": "503", "meta-type": "enum", "values": [ "x", @@ -19560,7 +19712,7 @@ ] }, { - "name": "502", + "name": "504", "members": [ { "name": "base", @@ -19574,12 +19726,12 @@ "meta-type": "object" }, { - "name": "503", + "name": "505", "tag": "format", "variants": [ { "case": "luks", - "type": "493" + "type": "495" }, { "case": "aes", @@ -19589,23 +19741,46 @@ "members": [ { "name": "format", - "type": "454" + "type": "456" + } + ], + "meta-type": "object" + }, + { + "name": "[506]", + "element-type": "506", + "meta-type": "array" + }, + { + "name": "506", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "granularity", + "type": "int" + }, + { + "name": "flags", + "type": "[508]" } ], "meta-type": "object" }, { - "name": "[232]", - "element-type": "232", + "name": "[233]", + "element-type": "233", "meta-type": "array" }, { - "name": "[504]", - "element-type": "504", + "name": "[507]", + "element-type": "507", "meta-type": "array" }, { - "name": "504", + "name": "507", "members": [ { "name": "active", @@ -19627,6 +19802,19 @@ } ], "meta-type": "object" + }, + { + "name": "[508]", + "element-type": "508", + "meta-type": "array" + }, + { + "name": "508", + "meta-type": "enum", + "values": [ + "in-use", + "auto" + ] } ], "id": "libvirt-44" @@ -19758,7 +19946,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -19829,7 +20016,7 @@ "rdseed": true, "avx512-4vnniw": false, "vme": true, - "vmx": false, + "vmx": true, "dtes64": false, "mtrr": true, "rdtscp": true, @@ -19965,7 +20152,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -20036,7 +20222,7 @@ "rdseed": true, "avx512-4vnniw": false, "vme": true, - "vmx": false, + "vmx": true, "dtes64": false, "mtrr": true, "rdtscp": true, @@ -20078,6 +20264,7 @@ "hv-frequencies": false, "tsc-frequency": 0, "xd": true, + "x-intel-pt-auto-level": true, "hv-vendor-id": "", "kvm-asyncpf": true, "kvm_asyncpf": true, @@ -20216,7 +20403,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "enforce": false, "stepping": 3, "xsave": true, @@ -20313,7 +20499,7 @@ "rdrand": true, "rdseed": true, "avx512-4vnniw": false, - "vmx": false, + "vmx": true, "vme": true, "dtes64": false, "mtrr": true, @@ -20463,7 +20649,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -20519,7 +20704,7 @@ "avx512er": false, "pmm-en": false, "pcid": true, - "arch-capabilities": true, + "arch-capabilities": false, "3dnow": false, "erms": true, "lahf-lm": true, @@ -20534,7 +20719,7 @@ "rdseed": true, "avx512-4vnniw": false, "vme": true, - "vmx": false, + "vmx": true, "dtes64": false, "mtrr": true, "rdtscp": true, @@ -20670,7 +20855,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -20726,7 +20910,7 @@ "avx512er": false, "pmm-en": false, "pcid": true, - "arch-capabilities": true, + "arch-capabilities": false, "3dnow": false, "erms": true, "lahf-lm": true, @@ -20741,7 +20925,7 @@ "rdseed": true, "avx512-4vnniw": false, "vme": true, - "vmx": false, + "vmx": true, "dtes64": false, "mtrr": true, "rdtscp": true, @@ -20783,6 +20967,7 @@ "hv-frequencies": false, "tsc-frequency": 0, "xd": true, + "x-intel-pt-auto-level": true, "hv-vendor-id": "", "kvm-asyncpf": true, "kvm_asyncpf": true, @@ -20921,7 +21106,6 @@ "fma": true, "cx16": true, "de": true, - "pconfig": false, "enforce": false, "stepping": 3, "xsave": true, @@ -20997,7 +21181,7 @@ "avx512er": false, "pmm-en": false, "pcid": true, - "arch-capabilities": true, + "arch-capabilities": false, "3dnow": false, "erms": true, "lahf-lm": true, @@ -21018,7 +21202,7 @@ "rdrand": true, "rdseed": true, "avx512-4vnniw": false, - "vmx": false, + "vmx": true, "vme": true, "dtes64": false, "mtrr": true, @@ -21482,13 +21666,11 @@ "avx512f", "avx512dq", "rdseed", - "intel-pt", "avx512cd", "avx512bw", "avx512vl", "avx512vbmi", "umip", - "", "avx512vbmi2", "gfni", "vaes", @@ -21496,7 +21678,6 @@ "avx512vnni", "avx512bitalg", "avx512-vpopcntdq", - "pconfig", "spec-ctrl", "ssbd", "3dnowprefetch", @@ -21522,10 +21703,8 @@ "invpcid", "rtm", "rdseed", - "intel-pt", "avx512vbmi", "umip", - "", "avx512vbmi2", "gfni", "vaes", @@ -21687,11 +21866,9 @@ "avx512f", "avx512dq", "rdseed", - "intel-pt", "avx512cd", "avx512bw", "avx512vl", - "", "avx512vnni", "spec-ctrl", "ssbd", @@ -21921,7 +22098,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -22128,7 +22304,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -22241,6 +22416,7 @@ "hv-frequencies": false, "tsc-frequency": 0, "xd": true, + "x-intel-pt-auto-level": true, "hv-vendor-id": "", "kvm-asyncpf": false, "kvm_asyncpf": false, @@ -22379,7 +22555,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "enforce": false, "stepping": 3, "xsave": true, @@ -22626,7 +22801,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -22833,7 +23007,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "stepping": 3, "xsave": true, "clflush": true, @@ -22946,6 +23119,7 @@ "hv-frequencies": false, "tsc-frequency": 0, "xd": true, + "x-intel-pt-auto-level": true, "hv-vendor-id": "", "kvm-asyncpf": false, "kvm_asyncpf": false, @@ -23084,7 +23258,6 @@ "fma": false, "cx16": true, "de": true, - "pconfig": false, "enforce": false, "stepping": 3, "xsave": true, diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.0.0.x86_64.xml index bc8e35e226..00f2a1cb55 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -201,10 +201,10 @@ - 3001050 + 3001092 0 43100758 - v3.1.0-1445-ga61faa3d02 + v4.0.0-rc2-24-gbcdb5721dd x86_64 @@ -225,6 +225,7 @@ + @@ -363,7 +364,6 @@ - @@ -439,7 +439,7 @@ - + @@ -460,7 +460,7 @@ - + @@ -495,6 +495,7 @@ + @@ -633,7 +634,6 @@ - @@ -848,13 +848,11 @@ - - @@ -863,7 +861,6 @@ - @@ -871,10 +868,8 @@ - - @@ -917,12 +912,10 @@ - - @@ -1121,13 +1114,11 @@ - - @@ -1135,7 +1126,6 @@ - @@ -1155,10 +1145,8 @@ - - @@ -1271,11 +1259,9 @@ - - --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 22:31:55 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 ARC-Seal: i=1; a=rsa-sha256; t=1555344199; cv=none; d=zoho.com; s=zohoarc; b=ZCudTWZmbn4SVTJHsQUmid9Keg/EIfD4jJNX96us6TAk0t/gag0VymGNN7U3ybfk1Gxe44XGC3bS8/5Zy12vmLQ31hvT5WQ+I3N+U82pCHtskzAb5dz19eTEvgGR6QiLMiPY483IBfEUyoSSnDYzei+X7gQI3cEs0qC9JCxkPYQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555344199; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=T/2xL8kSv+aetSp5VUy1IC1wIMfGcioY0JUG4kWcx/E=; b=Ru+P3cAThnypSna2ie3uil0mpuqkAZTHszoG2hnYouqKZHuMCcPY5yj7QLZ/PWV/jTbknmn0mmIzaQqJcJrQsFPlPrK80fGMaIj0JO1FZ9Dk82Mx518lUkWZThscU0/BsXj1goWkaochbkE7P5JTH9dFrC4JhElRI/Jlx1OEhTA= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555344199491962.0232880772182; Mon, 15 Apr 2019 09:03:19 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D97825277E; Mon, 15 Apr 2019 16:03:17 +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 A442F60BF3; Mon, 15 Apr 2019 16:03:17 +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 5C6503FB15; Mon, 15 Apr 2019 16:03:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FG2bPP003774 for ; Mon, 15 Apr 2019 12:02:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id D552D1001E8B; Mon, 15 Apr 2019 16:02:37 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B8E71001E89 for ; Mon, 15 Apr 2019 16:02:37 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 18:02:14 +0200 Message-Id: <91b69fc8e825a8581eeb36b5a402e7b6e2a5c4ee.1555344008.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 21/21] qemu: caps: Add capability for dynamic 'auto-read-only' support for files 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-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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 15 Apr 2019 16:03:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Initial implementation of 'auto-read-only' didn't reopen the backing files when needed. For '-blockdev' to work we need to be able to tel qemu to open a file read-only and change it during blockjobs as we label backing chains with a sVirt label which does not allow writing. The dynamic auto-read-only supports this as it reopens files when writing is demanded. Add a capability to detect that the posix file based backends support the dynamic part. --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index da90cd666e..4b851a6e89 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -526,6 +526,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "scsi-disk.device_id", "virtio-pci-non-transitional", "overcommit", + + /* 330 */ + "blockdev-file-dynamic-auto-read-only", ); @@ -1265,6 +1268,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, { "query-iothreads/ret-type/poll-max-ns", QEMU_CAPS_IOTHREAD_POLLING }, { "query-display-options/ret-type/+egl-headless/rendernode", QEMU_CAPS= _EGL_HEADLESS_RENDERNODE }, + { "blockdev-add/arg-type/+file/$dynamic-auto-read-only", QEMU_CAPS_BLO= CK_FILE_AUTO_READONLY_DYNAMIC }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index fd7bec7589..b207142fdb 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -509,6 +509,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL, /* virtio *-pci-{non-}transitional = devices */ QEMU_CAPS_OVERCOMMIT, /* -overcommit */ + /* 330 */ + QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC, /* the auto-read-only prop= erty of block backends for files is dynamic */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.0.0.x86_64.xml index 00f2a1cb55..dd77b67456 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -201,6 +201,7 @@ + 3001092 0 43100758 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list