mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-28 20:41:52 -06:00
qdev: add 64bit properties
Needed for virtio features which go from 32bit to 64bit with virtio 1.0 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
434027badb
commit
fdba6d967e
2 changed files with 68 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
/*** qdev-properties.c ***/
|
||||
|
||||
extern PropertyInfo qdev_prop_bit;
|
||||
extern PropertyInfo qdev_prop_bit64;
|
||||
extern PropertyInfo qdev_prop_bool;
|
||||
extern PropertyInfo qdev_prop_uint8;
|
||||
extern PropertyInfo qdev_prop_uint16;
|
||||
|
@ -50,6 +51,15 @@ extern PropertyInfo qdev_prop_arraylen;
|
|||
.qtype = QTYPE_QBOOL, \
|
||||
.defval = (bool)_defval, \
|
||||
}
|
||||
#define DEFINE_PROP_BIT64(_name, _state, _field, _bit, _defval) { \
|
||||
.name = (_name), \
|
||||
.info = &(qdev_prop_bit), \
|
||||
.bitnr = (_bit), \
|
||||
.offset = offsetof(_state, _field) \
|
||||
+ type_check(uint64_t, typeof_field(_state, _field)), \
|
||||
.qtype = QTYPE_QBOOL, \
|
||||
.defval = (bool)_defval, \
|
||||
}
|
||||
|
||||
#define DEFINE_PROP_BOOL(_name, _state, _field, _defval) { \
|
||||
.name = (_name), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue