From nobody Mon Feb 9 19:30:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1614182338; cv=none; d=zohomail.com; s=zohoarc; b=YhRk5YubOhaTDbqUlgHQG0DJZK5QZ3maBTM1hjNnJ9jIrTnqXN5TAYUqeRoeRvD2T3DSDctUsruJHCpgKxkdkMnh1vdHjdoZx4Bz5Shq4T5QbHXZlH3gFnkYOefm5nT00X9wx9lPJCBiIdlZrG8CymlDLh5esajMf61h+SOgz/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614182338; 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; bh=uIW5XDNJmLHEXWrVWbu+fQuzmyD59Ms6VhST2hrh3/E=; b=iAKKKyzLEMceIXKAKqUFpd34YZuyOspQN0/mQJMfZ62UJMYX2V2KrP0zvaOjjiDfiyw2gg0QTr4DhsGp+p2uZxcKGGCbz4uZ4olVGB08NCk4pAa2xwy90vyeuTaO5mR9VeB1bev6S8CXSto4c+qBsX7ZABRSZYMCk0sGSmjzOf4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614182338782142.70998325912637; Wed, 24 Feb 2021 07:58:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-192-m6xNWlKVOKCkBphyEUwpKA-1; Wed, 24 Feb 2021 10:58:55 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B4836DF8D0; Wed, 24 Feb 2021 15:58: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 93F5B50DD2; Wed, 24 Feb 2021 15:58:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5BD95CF43; Wed, 24 Feb 2021 15:58:45 +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 11OFwF3l010752 for ; Wed, 24 Feb 2021 10:58:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 06F3610021AA; Wed, 24 Feb 2021 15:58:15 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F5731001E73 for ; Wed, 24 Feb 2021 15:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614182337; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uIW5XDNJmLHEXWrVWbu+fQuzmyD59Ms6VhST2hrh3/E=; b=jVIPs5lkiu0sNDxiQy/oN96VAh6cHKEK4nOWUsUJgpkifVa8DqiG9AiNE3dbtfo5qTWxWp P6Dg5TlqfeCEk5F8RPbT/N82MiK7RKxZo0tPeHMLlmB2+vlIwHe49QGL0KcAnGQVol1ZLC o59+mAUKMYOrTGlifjypLXRJZz4xZJw= X-MC-Unique: m6xNWlKVOKCkBphyEUwpKA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v2 04/12] qemu: capabilities: Introduce QEMU_CAPS_OBJECT_QAPIFIED Date: Wed, 24 Feb 2021 16:57:58 +0100 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 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Starting from qemu-6.0 the parameters of -object/object-add are formally described by the QAPI schema. Additionally this changes the nesting of the properties as the 'props' nested object will be flattened to the parent. We'll need to detect whether qemu switched to this new approach to generate the objects with proper nesting and also allow testing. The capability is based on the presence of the 'secret' object in the 'qom-type' enum. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f40d6d77be..d1452f6354 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -618,6 +618,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "memory-backend-file.x-use-canonical-path-for-ramblock-id", "vnc-opts", "migration-param.block-bitmap-mapping", + + /* 395 */ + "object.qapified", ); @@ -1553,6 +1556,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "netdev_add/arg-type/+vhost-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA }, { "migrate-set-parameters/arg-type/block-bitmap-mapping/bitmaps/transf= orm", QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING }, + { "object-add/arg-type/qom-type/^secret", QEMU_CAPS_OBJECT_QAPIFIED }, }; typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index a5b6c7f104..193432246d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -599,6 +599,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_VNC_OPTS, /* -vnc uses QemuOpts parser instead of custom cod= e */ QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING, /* block-bitmap-mappin= g in migrate-set-parameters */ + /* 395 */ + QEMU_CAPS_OBJECT_QAPIFIED, /* parameters for object-add are formally d= escribed */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.29.2