qdev: convert PropertyInfo definitions to use qapi_type
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 <stefanb@linux.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-52-armbru@redhat.com>
[Trivial conflict with commit b8bd334225 (migration: forbid
snapshots under Xen resolved]
This commit is contained in:
1 parent
07458a910f
commit
fe5a14313e
4 files changed
+9
-1
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
#include "qapi/clone-visitor.h"
|
||||
#include "qapi/dealloc-visitor.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-builtin-type-infos.h"
|
||||
#include "qapi/qapi-commands-migration.h"
|
||||
#include "qapi/qapi-type-infos-common.h"
|
||||
#include "qapi/qapi-visit-migration.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qapi/qobject-input-visitor.h"
|
||||
@@ -296,6 +298,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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user