aboutsummaryrefslogtreecommitdiff
path: root/hw/hw.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-03-10 12:33:55 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-03-10 16:12:26 -0600
commit639f49b60cc399d753409734b011359fb71d8f7d (patch)
tree51843bf2be7215821a6c84814180a216c83f8a24 /hw/hw.h
parent6059631c042202b249d3e399741ba77afa2b555f (diff)
downloadqemu-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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 9df1c2c..4e09f18 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -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) { \