mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
Machine queue, 2020-12-15
* qdev code cleanup * Convert some QOM instance properties to class properties * Update git URLs on MAINTAINERS -----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEEWjIv1avE09usz9GqKAeTb5hNxaYFAl/Y09cUHGVoYWJrb3N0 QHJlZGhhdC5jb20ACgkQKAeTb5hNxaaJXRAAueMM4w9la/JTSF84GR5AmbJx1pGA YlOxP74Kae35UbrgygZhcb0FvBLRKHcpvGL7ZxWW9CfPFOstHf9i5IkFqU+mHGvU 7en9oHCTgepnqSeBt+cdI2mHD+aOwqapeR8Lw/8xiol9AmbxkZDJWpPWQHuvR1qM SSUZtJF79LLI68EI67AHDMzb4f34Ug7rmvXflWqw8RpDnE25IO/L9Pd59+JbcTI0 LndRf38M9RZTcPG1RX3QDvmBGhsX2QTZ1eY7buzfXsDIb4BofOTZBKp/IAc4mbUy ngqdKjeFPVrWdXIn+mEOGI6/uRCujpFPMLmVk+fnCYB+WJ9EGRv4v17AWFJryVFn 0NFwmRbwJvHAy0Tz1T1Bq6GrRFFjbMTxubjjnsW7YB0V0Y2OHYCtjTSQ5bXkwpw+ JiOL5q6NTwPctrqYaiUHRevYFUOF9Ywr2TroDt2PeEkSaxpptMQTvmaDlhwdS/MK t0nb3PoaztldAc8KV/mJX6zRNMR8J1li/hIXykMOrYOgpNN4Oz0Clo0VJ+7vIWjE IEyV7NXLEET592poWNYABMXiPrLFuaosZLWpM0TR2jugOOTsmNNa6xKoj03qE58S cUBoGIyfC4Up5eOE8CDK804T0LgcykDnCEqjOnNvLtTNoq483+WrhHkmFGiieHh3 uj6SVW7ETxvh6Og= =rzsJ -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging Machine queue, 2020-12-15 * qdev code cleanup * Convert some QOM instance properties to class properties * Update git URLs on MAINTAINERS # gpg: Signature made Tue 15 Dec 2020 15:18:47 GMT # gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6 # gpg: issuer "ehabkost@redhat.com" # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/machine-next-pull-request: (25 commits) MAINTAINERS: Update my git repository URLs qdev: Move UUID property to qdev-properties-system.c qdev: Make qdev_propinfo_get_uint16() static qdev: Make error_set_from_qdev_prop_error() get Object* argument qdev: Make check_prop_still_unset() get Object* argument qdev: Make qdev_find_global_prop() get Object* argument qdev: Make qdev_get_prop_ptr() get Object* arg qdev: Make bit_prop_set() get Object* argument qdev: Make PropertyInfo.print method get Object* argument qdev: Don't use dev->id on set_size32() error message sparc: Check dev->realized at sparc_set_nwindows() qdev: Check dev->realized at set_size() qdev: Move property code to qdev-properties.[ch] cpu: Move cpu_common_props to hw/core/cpu.c cs4231: Get rid of empty property array netfilter: Use class properties netfilter: Reorder functions can_host: Use class properties arm/cpu64: Register "aarch64" as class property virt: Register "its" as class property ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
69e92bd558
28 changed files with 504 additions and 538 deletions
|
@ -1111,7 +1111,6 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
|
|||
|
||||
void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...)
|
||||
GCC_FMT_ATTR(2, 3);
|
||||
extern Property cpu_common_props[];
|
||||
void cpu_exec_initfn(CPUState *cpu);
|
||||
void cpu_exec_realizefn(CPUState *cpu, Error **errp);
|
||||
void cpu_exec_unrealizefn(CPUState *cpu);
|
||||
|
|
|
@ -276,43 +276,6 @@ struct BusState {
|
|||
ResettableState reset;
|
||||
};
|
||||
|
||||
/**
|
||||
* Property:
|
||||
* @set_default: true if the default value should be set from @defval,
|
||||
* in which case @info->set_default_value must not be NULL
|
||||
* (if false then no default value is set by the property system
|
||||
* and the field retains whatever value it was given by instance_init).
|
||||
* @defval: default value for the property. This is used only if @set_default
|
||||
* is true.
|
||||
*/
|
||||
struct Property {
|
||||
const char *name;
|
||||
const PropertyInfo *info;
|
||||
ptrdiff_t offset;
|
||||
uint8_t bitnr;
|
||||
bool set_default;
|
||||
union {
|
||||
int64_t i;
|
||||
uint64_t u;
|
||||
} defval;
|
||||
int arrayoffset;
|
||||
const PropertyInfo *arrayinfo;
|
||||
int arrayfieldsize;
|
||||
const char *link_type;
|
||||
};
|
||||
|
||||
struct PropertyInfo {
|
||||
const char *name;
|
||||
const char *description;
|
||||
const QEnumLookup *enum_table;
|
||||
int (*print)(DeviceState *dev, Property *prop, char *dest, size_t len);
|
||||
void (*set_default_value)(ObjectProperty *op, const Property *prop);
|
||||
void (*create)(ObjectClass *oc, Property *prop);
|
||||
ObjectPropertyAccessor *get;
|
||||
ObjectPropertyAccessor *set;
|
||||
ObjectPropertyRelease *release;
|
||||
};
|
||||
|
||||
/**
|
||||
* GlobalProperty:
|
||||
* @used: Set to true if property was used when initializing a device.
|
||||
|
|
|
@ -3,6 +3,44 @@
|
|||
|
||||
#include "hw/qdev-core.h"
|
||||
|
||||
/**
|
||||
* Property:
|
||||
* @set_default: true if the default value should be set from @defval,
|
||||
* in which case @info->set_default_value must not be NULL
|
||||
* (if false then no default value is set by the property system
|
||||
* and the field retains whatever value it was given by instance_init).
|
||||
* @defval: default value for the property. This is used only if @set_default
|
||||
* is true.
|
||||
*/
|
||||
struct Property {
|
||||
const char *name;
|
||||
const PropertyInfo *info;
|
||||
ptrdiff_t offset;
|
||||
uint8_t bitnr;
|
||||
bool set_default;
|
||||
union {
|
||||
int64_t i;
|
||||
uint64_t u;
|
||||
} defval;
|
||||
int arrayoffset;
|
||||
const PropertyInfo *arrayinfo;
|
||||
int arrayfieldsize;
|
||||
const char *link_type;
|
||||
};
|
||||
|
||||
struct PropertyInfo {
|
||||
const char *name;
|
||||
const char *description;
|
||||
const QEnumLookup *enum_table;
|
||||
int (*print)(Object *obj, Property *prop, char *dest, size_t len);
|
||||
void (*set_default_value)(ObjectProperty *op, const Property *prop);
|
||||
void (*create)(ObjectClass *oc, Property *prop);
|
||||
ObjectPropertyAccessor *get;
|
||||
ObjectPropertyAccessor *set;
|
||||
ObjectPropertyRelease *release;
|
||||
};
|
||||
|
||||
|
||||
/*** qdev-properties.c ***/
|
||||
|
||||
extern const PropertyInfo qdev_prop_bit;
|
||||
|
@ -264,14 +302,14 @@ void qdev_prop_set_macaddr(DeviceState *dev, const char *name,
|
|||
const uint8_t *value);
|
||||
void qdev_prop_set_enum(DeviceState *dev, const char *name, int value);
|
||||
|
||||
void *qdev_get_prop_ptr(DeviceState *dev, Property *prop);
|
||||
void *qdev_get_prop_ptr(Object *obj, Property *prop);
|
||||
|
||||
void qdev_prop_register_global(GlobalProperty *prop);
|
||||
const GlobalProperty *qdev_find_global_prop(DeviceState *dev,
|
||||
const GlobalProperty *qdev_find_global_prop(Object *obj,
|
||||
const char *name);
|
||||
int qdev_prop_check_globals(void);
|
||||
void qdev_prop_set_globals(DeviceState *dev);
|
||||
void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
|
||||
void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj,
|
||||
Property *prop, const char *value);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue