Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04946606A324 for ; Sun, 1 Nov 2026 20:20:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=a+sahufr Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xNc2R-0002y2-F1; Sun, 01 Nov 2026 15:20:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNbzt-00054t-7k for qemu-devel@nongnu.org; Sun, 01 Nov 2026 15:17:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xNbzi-0007Ef-8j for qemu-devel@nongnu.org; Sun, 01 Nov 2026 15:17:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793564253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YEJqVZbU+S4UhP1/wICxl7VYtJ1cRub3UT3PVWt9/ek=; b=a+sahufrRWHKnfX59zgHpeS4n01VNweoRHFYwnqilNup+VwHHPApQLXy5ZjtTNtv7UmuXQ 8ccdTD0wGz38OU05deAfTWbcMl5ntHn/CCkPeKzE6CC+Up5/kHwCJAld8DbrX0aaYRY0oq AqA4BB31+WxbACt0YpU86bM0uUzINOQ= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-120-1WVgtnUvMgaLNBQqZVv0lg-1; Sun, 01 Nov 2026 15:17:30 -0500 X-MC-Unique: 1WVgtnUvMgaLNBQqZVv0lg-1 X-Mimecast-MFC-AGG-ID: 1WVgtnUvMgaLNBQqZVv0lg_1793564249 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 410CA1800660; Sun, 1 Nov 2026 20:17:29 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F3A4E1800257; Sun, 1 Nov 2026 20:17:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8976C21E66D7; Sun, 01 Nov 2026 21:17:18 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com, Stefan Berger Subject: [PATCH v8 51/56] qdev: convert PropertyInfo definitions to use qapi_type Date: Sun, 1 Nov 2026 21:17:12 +0100 Message-ID: <20261101201717.3911097-52-armbru@redhat.com> In-Reply-To: <20261101201717.3911097-1-armbru@redhat.com> References: <20261101201717.3911097-1-armbru@redhat.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Marc-André Lureau Add a .qapi_type pointer to the remaining PropertyInfo definitions outside hw/. After this patch, all PropertyInfo definitions have .qapi_type set, except qdev_prop_link (uses .create) and qdev_prop_array (left for later). Reviewed-by: Stefan Berger Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- backends/spdm-socket.c | 3 ++- backends/tpm/tpm_util.c | 2 ++ migration/options.c | 3 +++ target/sparc/cpu.c | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/backends/spdm-socket.c b/backends/spdm-socket.c index 826efc276d..e1d5626062 100644 --- a/backends/spdm-socket.c +++ b/backends/spdm-socket.c @@ -17,6 +17,7 @@ #include "hw/core/qdev-properties.h" #include "hw/core/qdev-properties-system.h" #include "hw/core/qdev-prop-internal.h" +#include "qapi/qapi-type-infos-sockets.h" static bool read_bytes(const int socket, uint8_t *buffer, size_t number_of_bytes) @@ -254,8 +255,8 @@ void spdm_socket_close(const int socket, SpdmTransportType transport_type) const PropertyInfo qdev_prop_spdm_trans = { .type = "SpdmTransportType", + .qapi_type = &SpdmTransportType_type_info, .description = "Spdm Transport, doe/nvme/mctp/scsi/unspecified", - .enum_table = &SpdmTransportType_lookup, .get = qdev_propinfo_get_enum, .set = qdev_propinfo_set_enum, .set_default_value = qdev_propinfo_set_default_value_enum, diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index 7019f7fd3e..e52f342933 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -30,6 +30,7 @@ #include "system/tpm_backend.h" #include "system/tpm_util.h" #include "trace.h" +#include "qapi/qapi-builtin-type-infos.h" /* tpm backend property */ @@ -78,6 +79,7 @@ static void release_tpm(Object *obj, const char *name, void *opaque) const PropertyInfo qdev_prop_tpm = { .type = "str", + .qapi_type = &str_type_info, .description = "ID of a tpm to use as a backend", .get = get_tpm, .set = set_tpm, diff --git a/migration/options.c b/migration/options.c index 46d040fc3f..1be4151ea7 100644 --- a/migration/options.c +++ b/migration/options.c @@ -37,6 +37,8 @@ #include "ram.h" #include "options.h" #include "system/kvm.h" +#include "qapi/qapi-builtin-type-infos.h" +#include "qapi/qapi-type-infos-common.h" /* Maximum migrate downtime set to 2000 seconds */ #define MAX_MIGRATE_DOWNTIME_SECONDS 2000 @@ -295,6 +297,7 @@ static void set_default_value_tls_opt(ObjectProperty *op, const Property *prop) */ const PropertyInfo qdev_prop_StrOrNull = { .type = "StrOrNull", + .qapi_type = &StrOrNull_type_info, .get = get_StrOrNull, .set = set_StrOrNull, .release = release_StrOrNull, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 28ae629d50..7729413698 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -30,6 +30,7 @@ #include "tcg/tcg.h" #include "fpu/softfloat.h" #include "target/sparc/translate.h" +#include "qapi/qapi-builtin-type-infos.h" //#define DEBUG_FEATURES @@ -950,6 +951,7 @@ static void sparc_set_nwindows(Object *obj, Visitor *v, const char *name, static const PropertyInfo qdev_prop_nwindows = { .type = "int", + .qapi_type = &int_type_info, .description = "Number of register windows", .get = sparc_get_nwindows, .set = sparc_set_nwindows, -- 2.55.0