diff options
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/cryptodev.h | 7 | ||||
-rw-r--r-- | include/sysemu/hostmem.h | 4 | ||||
-rw-r--r-- | include/sysemu/hvf.h | 1 | ||||
-rw-r--r-- | include/sysemu/iothread.h | 5 | ||||
-rw-r--r-- | include/sysemu/kvm.h | 1 | ||||
-rw-r--r-- | include/sysemu/rng-random.h | 2 | ||||
-rw-r--r-- | include/sysemu/rng.h | 4 | ||||
-rw-r--r-- | include/sysemu/tpm.h | 5 | ||||
-rw-r--r-- | include/sysemu/tpm_backend.h | 4 | ||||
-rw-r--r-- | include/sysemu/vhost-user-backend.h | 4 |
10 files changed, 21 insertions, 16 deletions
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h index 35eab06d0e..e11526271a 100644 --- a/include/sysemu/cryptodev.h +++ b/include/sysemu/cryptodev.h @@ -37,6 +37,8 @@ #define TYPE_CRYPTODEV_BACKEND "cryptodev-backend" +typedef struct CryptoDevBackend CryptoDevBackend; +typedef struct CryptoDevBackendClass CryptoDevBackendClass; #define CRYPTODEV_BACKEND(obj) \ OBJECT_CHECK(CryptoDevBackend, \ (obj), TYPE_CRYPTODEV_BACKEND) @@ -54,7 +56,6 @@ typedef struct CryptoDevBackendConf CryptoDevBackendConf; typedef struct CryptoDevBackendPeers CryptoDevBackendPeers; typedef struct CryptoDevBackendClient CryptoDevBackendClient; -typedef struct CryptoDevBackend CryptoDevBackend; enum CryptoDevBackendAlgType { CRYPTODEV_BACKEND_ALG_SYM, @@ -146,7 +147,7 @@ typedef struct CryptoDevBackendSymOpInfo { uint8_t data[]; } CryptoDevBackendSymOpInfo; -typedef struct CryptoDevBackendClass { +struct CryptoDevBackendClass { ObjectClass parent_class; void (*init)(CryptoDevBackend *backend, Error **errp); @@ -161,7 +162,7 @@ typedef struct CryptoDevBackendClass { int (*do_sym_op)(CryptoDevBackend *backend, CryptoDevBackendSymOpInfo *op_info, uint32_t queue_index, Error **errp); -} CryptoDevBackendClass; +}; typedef enum CryptoDevBackendOptionsType { CRYPTODEV_BACKEND_TYPE_NONE = 0, diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index 8276e53683..7b775b6687 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -20,6 +20,8 @@ #include "qemu/bitmap.h" #define TYPE_MEMORY_BACKEND "memory-backend" +typedef struct HostMemoryBackend HostMemoryBackend; +typedef struct HostMemoryBackendClass HostMemoryBackendClass; #define MEMORY_BACKEND(obj) \ OBJECT_CHECK(HostMemoryBackend, (obj), TYPE_MEMORY_BACKEND) #define MEMORY_BACKEND_GET_CLASS(obj) \ @@ -42,8 +44,6 @@ */ #define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" -typedef struct HostMemoryBackend HostMemoryBackend; -typedef struct HostMemoryBackendClass HostMemoryBackendClass; /** * HostMemoryBackendClass: diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h index 760d6c79a2..566b5f52fc 100644 --- a/include/sysemu/hvf.h +++ b/include/sysemu/hvf.h @@ -14,6 +14,7 @@ #define HVF_H #include "sysemu/accel.h" +#include "qom/object.h" #ifdef CONFIG_HVF uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h index 6181486401..42902ffb9f 100644 --- a/include/sysemu/iothread.h +++ b/include/sysemu/iothread.h @@ -20,7 +20,7 @@ #define TYPE_IOTHREAD "iothread" -typedef struct { +struct IOThread { Object parent_obj; QemuThread thread; @@ -37,7 +37,8 @@ typedef struct { int64_t poll_max_ns; int64_t poll_grow; int64_t poll_shrink; -} IOThread; +}; +typedef struct IOThread IOThread; #define IOTHREAD(obj) \ OBJECT_CHECK(IOThread, obj, TYPE_IOTHREAD) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 8445a88db1..3e89884c54 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -18,6 +18,7 @@ #include "hw/core/cpu.h" #include "exec/memattrs.h" #include "sysemu/accel.h" +#include "qom/object.h" #ifdef NEED_CPU_H # ifdef CONFIG_KVM diff --git a/include/sysemu/rng-random.h b/include/sysemu/rng-random.h index 38186fe83d..87e82dd7a3 100644 --- a/include/sysemu/rng-random.h +++ b/include/sysemu/rng-random.h @@ -15,8 +15,8 @@ #include "qom/object.h" #define TYPE_RNG_RANDOM "rng-random" +typedef struct RngRandom RngRandom; #define RNG_RANDOM(obj) OBJECT_CHECK(RngRandom, (obj), TYPE_RNG_RANDOM) -typedef struct RngRandom RngRandom; #endif diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h index fa6eada78c..c38da7d342 100644 --- a/include/sysemu/rng.h +++ b/include/sysemu/rng.h @@ -17,6 +17,8 @@ #include "qom/object.h" #define TYPE_RNG_BACKEND "rng-backend" +typedef struct RngBackend RngBackend; +typedef struct RngBackendClass RngBackendClass; #define RNG_BACKEND(obj) \ OBJECT_CHECK(RngBackend, (obj), TYPE_RNG_BACKEND) #define RNG_BACKEND_GET_CLASS(obj) \ @@ -27,8 +29,6 @@ #define TYPE_RNG_BUILTIN "rng-builtin" typedef struct RngRequest RngRequest; -typedef struct RngBackendClass RngBackendClass; -typedef struct RngBackend RngBackend; typedef void (EntropyReceiveFunc)(void *opaque, const void *data, diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 730c61ac97..04673cab53 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -26,6 +26,7 @@ typedef enum TPMVersion { } TPMVersion; #define TYPE_TPM_IF "tpm-if" +typedef struct TPMIfClass TPMIfClass; #define TPM_IF_CLASS(klass) \ OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF) #define TPM_IF_GET_CLASS(obj) \ @@ -35,13 +36,13 @@ typedef enum TPMVersion { typedef struct TPMIf TPMIf; -typedef struct TPMIfClass { +struct TPMIfClass { InterfaceClass parent_class; enum TpmModel model; void (*request_completed)(TPMIf *obj, int ret); enum TPMVersion (*get_version)(TPMIf *obj); -} TPMIfClass; +}; #define TYPE_TPM_TIS_ISA "tpm-tis" #define TYPE_TPM_TIS_SYSBUS "tpm-tis-device" diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index 9e7451fb52..740c94c6cd 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -19,6 +19,8 @@ #include "qapi/error.h" #define TYPE_TPM_BACKEND "tpm-backend" +typedef struct TPMBackend TPMBackend; +typedef struct TPMBackendClass TPMBackendClass; #define TPM_BACKEND(obj) \ OBJECT_CHECK(TPMBackend, (obj), TYPE_TPM_BACKEND) #define TPM_BACKEND_GET_CLASS(obj) \ @@ -26,8 +28,6 @@ #define TPM_BACKEND_CLASS(klass) \ OBJECT_CLASS_CHECK(TPMBackendClass, (klass), TYPE_TPM_BACKEND) -typedef struct TPMBackendClass TPMBackendClass; -typedef struct TPMBackend TPMBackend; typedef struct TPMBackendCmd { uint8_t locty; diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-user-backend.h index 9abf8f06a1..89eb5eaf65 100644 --- a/include/sysemu/vhost-user-backend.h +++ b/include/sysemu/vhost-user-backend.h @@ -22,6 +22,8 @@ #include "io/channel.h" #define TYPE_VHOST_USER_BACKEND "vhost-user-backend" +typedef struct VhostUserBackend VhostUserBackend; +typedef struct VhostUserBackendClass VhostUserBackendClass; #define VHOST_USER_BACKEND(obj) \ OBJECT_CHECK(VhostUserBackend, (obj), TYPE_VHOST_USER_BACKEND) #define VHOST_USER_BACKEND_GET_CLASS(obj) \ @@ -29,8 +31,6 @@ #define VHOST_USER_BACKEND_CLASS(klass) \ OBJECT_CLASS_CHECK(VhostUserBackendClass, (klass), TYPE_VHOST_USER_BACKEND) -typedef struct VhostUserBackend VhostUserBackend; -typedef struct VhostUserBackendClass VhostUserBackendClass; struct VhostUserBackendClass { ObjectClass parent_class; |