Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA171CCF2E3 for ; Mon, 19 Oct 2026 14:26:58 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xIoE6-0002cJ-JI; Mon, 19 Oct 2026 10:20:34 -0400 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 1xIoDX-0002Ie-0M for qemu-devel@nongnu.org; Mon, 19 Oct 2026 10:20:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xIoDQ-0005fD-VF for qemu-devel@nongnu.org; Mon, 19 Oct 2026 10:19:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792419592; 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=RkpFpl1bbbDpYFNCoJlVSzjIRH2bxpZPoruRRfteaOw=; b=K+3LI2H7hxtYC9tNFjTAoHWtqPVOQcMUwRz8rWp9pUC6ncjokF3kfwzRznfRK5Xj+KOogZ Q6+bZdbDrmn4VyxijZkXeHOhAQNy3VtzKThUKMPqio7FGj9KxZ1adGMPnKM+H7SnoL03N5 2tDxM5GP3B6kLrY4kKiL07VNfs/17Y4= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-677-8B7KhyQmOHeR-hPpEbtU-w-1; Mon, 19 Oct 2026 14:19:44 +0000 X-MC-Unique: 8B7KhyQmOHeR-hPpEbtU-w-1 X-Mimecast-MFC-AGG-ID: 8B7KhyQmOHeR-hPpEbtU-w_1792419583 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A53E1956050; Mon, 19 Oct 2026 14:19:43 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.5]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 438B57D9; Mon, 19 Oct 2026 14:19:43 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8A6FB21E6603; Mon, 19 Oct 2026 16:19:30 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com, michael.roth@amd.com, pierrick.bouvier@oss.qualcomm.com, philmd@oss.qualcomm.com, kkostiuk@redhat.com, alistair.francis@wdc.com, amachhiw@linux.ibm.com Subject: [PATCH v6 58/65] qdev: convert PropertyInfo definitions to use qapi_type Date: Mon, 19 Oct 2026 16:19:22 +0200 Message-ID: <20261019141929.1594337-59-armbru@redhat.com> In-Reply-To: <20261019141929.1594337-1-armbru@redhat.com> References: <20261019141929.1594337-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.329, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Marc-André Lureau Convert 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 (refactored in the next patches). Signed-off-by: Marc-André Lureau Signed-off-by: Markus Armbruster --- backends/spdm-socket.c | 4 ++-- backends/tpm/tpm_util.c | 3 ++- migration/options.c | 4 +++- target/sparc/cpu.c | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/backends/spdm-socket.c b/backends/spdm-socket.c index 826efc276d..4a43079759 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) @@ -253,9 +254,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..dc6d4b2115 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 */ @@ -77,7 +78,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..029282a160 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 @@ -294,7 +296,7 @@ static void set_default_value_tls_opt(ObjectProperty *op, const Property *prop) * TYPE_MIGRATION's TLS options. */ 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 ae9bdca9df..d0354a4d02 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 @@ -948,7 +949,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