aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index 625e717..0d2cff6 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -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