summaryrefslogtreecommitdiff
path: root/include/hw/pci
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-05-07 15:16:58 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-06-03 11:37:44 +0200
commit340b50c759d6b4ef33e514c40afcc799c0d7df7a (patch)
treec3226aa187cc3aa473cb69afa4fb8d4035c49901 /include/hw/pci
parent45ec267160307ce2ca7494d942589ba222b29479 (diff)
downloadqemu-340b50c759d6b4ef33e514c40afcc799c0d7df7a.tar.gz
pci: add VMSTATE_MSIX
Using a trick cut+pasted from vmstate_scsi_device to wind up msix_save and msix_load. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/pci')
-rw-r--r--include/hw/pci/msix.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
index e648410535..954d82b350 100644
--- a/include/hw/pci/msix.h
+++ b/include/hw/pci/msix.h
@@ -43,4 +43,15 @@ int msix_set_vector_notifiers(PCIDevice *dev,
MSIVectorReleaseNotifier release_notifier,
MSIVectorPollNotifier poll_notifier);
void msix_unset_vector_notifiers(PCIDevice *dev);
+
+extern const VMStateDescription vmstate_msix;
+
+#define VMSTATE_MSIX(_field, _state) { \
+ .name = (stringify(_field)), \
+ .size = sizeof(PCIDevice), \
+ .vmsd = &vmstate_msix, \
+ .flags = VMS_STRUCT, \
+ .offset = vmstate_offset_value(_state, _field, PCIDevice), \
+}
+
#endif