diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-06-01 10:45:39 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-06-01 14:18:55 +0200 |
commit | fdba6d967e00864edd21275a6ee1d23a383510e8 (patch) | |
tree | 83b4dad5f0f3c93d12a7b4ac839fb821462bae48 /include/hw/qdev-properties.h | |
parent | 434027badb421863b85ffdb4769966533c001cfa (diff) |
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>
Diffstat (limited to 'include/hw/qdev-properties.h')
-rw-r--r-- | include/hw/qdev-properties.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index d67dad5f77..0cfff1c77c 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -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), \ |