diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-20 19:42:39 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:30:22 -0500 |
commit | 73534f2f682f2957fabb25e3890481098cc5dcee (patch) | |
tree | 16dc4aa473ce9f024409689a77e3ff775a8f6c66 /hw/hw.h | |
parent | f16c4abfadf9ae63bd22fb793484912542be0da7 (diff) | |
download | qemu-73534f2f682f2957fabb25e3890481098cc5dcee.zip qemu-73534f2f682f2957fabb25e3890481098cc5dcee.tar.gz qemu-73534f2f682f2957fabb25e3890481098cc5dcee.tar.bz2 |
Port PCIDevice state to VMState
This uses a variant of buffer, with extra checks. Also uses the new
support for cheking that a read value is less or equal than a field.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r-- | hw/hw.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -402,6 +402,18 @@ extern const VMStateInfo vmstate_info_buffer; + type_check_array(uint8_t,typeof_field(_state, _field),sizeof(typeof_field(_state,_field))) \ } +extern const VMStateDescription vmstate_pci_device; + +#define VMSTATE_PCI_DEVICE(_field, _state) { \ + .name = (stringify(_field)), \ + .version_id = 2, \ + .size = sizeof(PCIDevice), \ + .vmsd = &vmstate_pci_device, \ + .flags = VMS_STRUCT, \ + .offset = offsetof(_state, _field) \ + + type_check(PCIDevice,typeof_field(_state, _field)) \ +} + /* _f : field name _f_n : num of elements field_name _n : num of elements |