diff options
author | Juan Quintela <quintela@redhat.com> | 2011-03-10 12:33:55 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-03-10 16:12:26 -0600 |
commit | 639f49b60cc399d753409734b011359fb71d8f7d (patch) | |
tree | 51843bf2be7215821a6c84814180a216c83f8a24 /hw/hw.h | |
parent | 6059631c042202b249d3e399741ba77afa2b555f (diff) | |
download | qemu-639f49b60cc399d753409734b011359fb71d8f7d.zip qemu-639f49b60cc399d753409734b011359fb71d8f7d.tar.gz qemu-639f49b60cc399d753409734b011359fb71d8f7d.tar.bz2 |
vmstate: be able to store/save a pci device from a pointer
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 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -629,6 +629,14 @@ extern const VMStateDescription vmstate_pci_device; .offset = vmstate_offset_value(_state, _field, PCIDevice), \ } +#define VMSTATE_PCI_DEVICE_POINTER(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(PCIDevice), \ + .vmsd = &vmstate_pci_device, \ + .flags = VMS_STRUCT|VMS_POINTER, \ + .offset = vmstate_offset_pointer(_state, _field, PCIDevice), \ +} + extern const VMStateDescription vmstate_pcie_device; #define VMSTATE_PCIE_DEVICE(_field, _state) { \ |