From: Marc-André Lureau <[email protected]> Add a .qapi_type pointer to PropertyInfo definitions in device-specific files. Mechanical, except for "display_mode" in apple-gfx.m, which is a string of a specific format.
Signed-off-by: Marc-André Lureau <[email protected]> Signed-off-by: Markus Armbruster <[email protected]> --- hw/block/xen-block.c | 2 ++ hw/misc/xlnx-versal-trng.c | 2 ++ hw/nvme/nguid.c | 2 ++ hw/nvram/xlnx-bbram.c | 2 ++ hw/nvram/xlnx-efuse.c | 2 ++ hw/pci/pci.c | 2 ++ hw/s390x/ccw-device.c | 2 ++ hw/s390x/css.c | 3 +++ hw/s390x/s390-pci-bus.c | 2 ++ hw/vfio/pci-quirks.c | 2 ++ hw/display/apple-gfx.m | 2 ++ 11 files changed, 23 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 474c12fe4a..ffdb080657 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -29,6 +29,7 @@ #include "dataplane/xen-block.h" #include "hw/xen/interface/io/xs_wire.h" #include "trace.h" +#include "qapi/qapi-builtin-type-infos.h" #define XVDA_MAJOR 202 #define XVDQ_MAJOR (1 << 20) @@ -664,6 +665,7 @@ invalid: */ static const PropertyInfo xen_block_prop_vdev = { .type = "str", + .qapi_type = &str_type_info, .description = "Virtual Disk specifier (d*p*/xvd*/hd*/sd*)", .get = xen_block_get_vdev, .set = xen_block_set_vdev, diff --git a/hw/misc/xlnx-versal-trng.c b/hw/misc/xlnx-versal-trng.c index 0584ee089e..3204e083ea 100644 --- a/hw/misc/xlnx-versal-trng.c +++ b/hw/misc/xlnx-versal-trng.c @@ -36,6 +36,7 @@ #include "qapi/visitor.h" #include "migration/vmstate.h" #include "hw/core/qdev-properties.h" +#include "qapi/qapi-builtin-type-infos.h" #ifndef XLNX_VERSAL_TRNG_ERR_DEBUG #define XLNX_VERSAL_TRNG_ERR_DEBUG 0 @@ -663,6 +664,7 @@ static void trng_prop_fault_event_get(Object *obj, Visitor *v, static const PropertyInfo trng_prop_fault_events = { .type = "uint32", + .qapi_type = &uint32_type_info, .description = "Set to trigger TRNG fault events", .set = trng_prop_fault_event_set, .get = trng_prop_fault_event_get, diff --git a/hw/nvme/nguid.c b/hw/nvme/nguid.c index 4cd6fad6ac..ccc12ac9f9 100644 --- a/hw/nvme/nguid.c +++ b/hw/nvme/nguid.c @@ -18,6 +18,7 @@ #include "qapi/visitor.h" #include "qemu/ctype.h" #include "nvme.h" +#include "qapi/qapi-builtin-type-infos.h" #define NGUID_SEPARATOR '-' @@ -180,6 +181,7 @@ static void set_nguid(Object *obj, Visitor *v, const char *name, void *opaque, const PropertyInfo qdev_prop_nguid = { .type = "str", + .qapi_type = &str_type_info, .description = "NGUID or \"" NGUID_VALUE_AUTO "\" for random value", .get = get_nguid, diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c index e336874bde..8e7597621d 100644 --- a/hw/nvram/xlnx-bbram.c +++ b/hw/nvram/xlnx-bbram.c @@ -34,6 +34,7 @@ #include "hw/core/qdev-properties.h" #include "hw/core/qdev-properties-system.h" #include "hw/nvram/xlnx-efuse.h" +#include "qapi/qapi-builtin-type-infos.h" #ifndef XLNX_BBRAM_ERR_DEBUG #define XLNX_BBRAM_ERR_DEBUG 0 @@ -487,6 +488,7 @@ static void bbram_prop_release_drive(Object *obj, const char *name, static const PropertyInfo bbram_prop_drive = { .type = "str", + .qapi_type = &str_type_info, .description = "Node name or ID of a block device to use as BBRAM backend", .realized_set_allowed = true, .get = bbram_prop_get_drive, diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c index 03c9fbc0d0..7d2030f7aa 100644 --- a/hw/nvram/xlnx-efuse.c +++ b/hw/nvram/xlnx-efuse.c @@ -34,6 +34,7 @@ #include "system/blockdev.h" #include "hw/core/qdev-properties.h" #include "hw/core/qdev-properties-system.h" +#include "qapi/qapi-builtin-type-infos.h" #define TBIT0_OFFSET 28 #define TBIT1_OFFSET 29 @@ -252,6 +253,7 @@ static void efuse_prop_release_drive(Object *obj, const char *name, static const PropertyInfo efuse_prop_drive = { .type = "str", + .qapi_type = &str_type_info, .description = "Node name or ID of a block device to use as eFUSE backend", .realized_set_allowed = true, .get = efuse_prop_get_drive, diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 0efb4eb4bb..0f4c900991 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -53,6 +53,7 @@ #include "qapi/error.h" #include "qemu/cutils.h" #include "pci-internal.h" +#include "qapi/qapi-builtin-type-infos.h" #include "hw/xen/xen.h" #include "hw/i386/kvm/xen_evtchn.h" @@ -81,6 +82,7 @@ static void prop_pci_busnr_get(Object *obj, Visitor *v, const char *name, static const PropertyInfo prop_pci_busnr = { .type = "busnr", + .qapi_type = &uint8_type_info, .get = prop_pci_busnr_get, }; diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c index 25c4273279..54766f53e1 100644 --- a/hw/s390x/ccw-device.c +++ b/hw/s390x/ccw-device.c @@ -17,6 +17,7 @@ #include "qapi/visitor.h" #include "qemu/ctype.h" #include "qapi/error.h" +#include "qapi/qapi-builtin-type-infos.h" static void ccw_device_refill_ids(CcwDevice *dev) { @@ -75,6 +76,7 @@ static void ccw_device_set_loadparm(Object *obj, Visitor *v, const PropertyInfo ccw_loadparm = { .type = "str", + .qapi_type = &str_type_info, .description = "Up to 8 chars in set of [A-Za-z0-9. ] to select" " a guest kernel", .get = ccw_device_get_loadparm, diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 65341c68c3..44805ceb49 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -24,6 +24,7 @@ #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/s390-ccw.h" #include "exec/cpu-common.h" +#include "qapi/qapi-builtin-type-infos.h" typedef struct CrwContainer { CRW crw; @@ -2531,6 +2532,7 @@ out: const PropertyInfo css_devid_propinfo = { .type = "str", + .qapi_type = &str_type_info, .description = "Identifier of an I/O device in the channel " "subsystem, example: fe.1.23ab", .get = get_css_devid, @@ -2539,6 +2541,7 @@ const PropertyInfo css_devid_propinfo = { const PropertyInfo css_devid_ro_propinfo = { .type = "str", + .qapi_type = &str_type_info, .description = "Read-only identifier of an I/O device in the channel " "subsystem, example: fe.1.23ab", .get = get_css_devid, diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index cdd75cdfd2..6703d4c1cb 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -35,6 +35,7 @@ #include "system/runstate.h" #include "trace.h" +#include "qapi/qapi-builtin-type-infos.h" S390pciState *s390_get_phb(void) { @@ -1852,6 +1853,7 @@ static void s390_pci_set_fid(Object *obj, Visitor *v, const char *name, static const PropertyInfo s390_pci_fid_propinfo = { .type = "uint32", + .qapi_type = &uint32_type_info, .description = "zpci_fid", .get = s390_pci_get_fid, .set = s390_pci_set_fid, diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index c5b4f9091d..a38a0e7a3a 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -26,6 +26,7 @@ #include "pci.h" #include "pci-quirks.h" #include "trace.h" +#include "qapi/qapi-builtin-type-infos.h" /* * List of device ids/vendor ids for which to disable @@ -1437,6 +1438,7 @@ static void set_nv_gpudirect_clique_id(Object *obj, Visitor *v, const PropertyInfo qdev_prop_nv_gpudirect_clique = { .type = "uint8", + .qapi_type = &uint8_type_info, .description = "NVIDIA GPUDirect Clique ID (0 - 15)", .get = get_nv_gpudirect_clique_id, .set = set_nv_gpudirect_clique_id, diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index be0061b9db..4db80f0b10 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -15,6 +15,7 @@ #include "qemu/lockable.h" #include "qemu/cutils.h" #include "qemu/log.h" +#include "qapi/qapi-builtin-type-infos.h" #include "qapi/visitor.h" #include "qapi/error.h" #include "qemu/aio-wait.h" @@ -872,6 +873,7 @@ static void apple_gfx_set_display_mode(Object *obj, Visitor *v, const PropertyInfo qdev_prop_apple_gfx_display_mode = { .type = "display_mode", + .qapi_type = &str_type_info, .description = "Display mode in pixels and Hertz, as <width>x<height>@<refresh-rate> " "Example: 3840x2160@60", -- 2.55.0
