diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-13 17:07:20 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-13 10:20:51 -0600 |
commit | 701a8f76aa5243d90a71935982c20c06d8e83b80 (patch) | |
tree | 0cd413bfa739326cb70b251d3ed2b698d0debb41 /hw/pci.h | |
parent | 49d4d9b63ebb0d487e80d3d85a75d8256d313df9 (diff) | |
download | qemu-701a8f76aa5243d90a71935982c20c06d8e83b80.zip qemu-701a8f76aa5243d90a71935982c20c06d8e83b80.tar.gz qemu-701a8f76aa5243d90a71935982c20c06d8e83b80.tar.bz2 |
vmstate: extract declarations out of hw/hw.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r-- | hw/pci.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -552,4 +552,22 @@ static inline void pci_dma_sglist_init(QEMUSGList *qsg, PCIDevice *dev, qemu_sglist_init(qsg, alloc_hint); } +extern const VMStateDescription vmstate_pci_device; + +#define VMSTATE_PCI_DEVICE(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(PCIDevice), \ + .vmsd = &vmstate_pci_device, \ + .flags = VMS_STRUCT, \ + .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), \ +} + #endif |