diff options
author | Anthony Liguori | 2013-06-03 15:37:54 +0200 |
---|---|---|
committer | Anthony Liguori | 2013-06-03 15:37:54 +0200 |
commit | 40459a0312569817f622926efd0780ef2299aaa1 (patch) | |
tree | 35fb6c0fc95022191c94a1f5774dda84cce96cda /hw/pci/msix.c | |
parent | Merge remote-tracking branch 'mjt/trivial-patches' into staging (diff) | |
parent | xhci: add live migration support (diff) | |
download | qemu-40459a0312569817f622926efd0780ef2299aaa1.tar.gz qemu-40459a0312569817f622926efd0780ef2299aaa1.tar.xz qemu-40459a0312569817f622926efd0780ef2299aaa1.zip |
Merge remote-tracking branch 'kraxel/usb.83' into staging
# By Gerd Hoffmann (5) and others
# Via Gerd Hoffmann
* kraxel/usb.83:
xhci: add live migration support
xhci: add xhci_init_epctx
xhci: add xhci_alloc_epctx
xhci: add XHCISlot->addressed
pci: add VMSTATE_MSIX
host-libusb: Correct test for USB packet state
Fix usage of USB_DEV_FLAG_IS_HOST flag.
Message-id: 1370253951-12323-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci/msix.c')
-rw-r--r-- | hw/pci/msix.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hw/pci/msix.c b/hw/pci/msix.c index e231a0dc4b..6da75ec693 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -569,3 +569,36 @@ void msix_unset_vector_notifiers(PCIDevice *dev) dev->msix_vector_release_notifier = NULL; dev->msix_vector_poll_notifier = NULL; } + +static void put_msix_state(QEMUFile *f, void *pv, size_t size) +{ + msix_save(pv, f); +} + +static int get_msix_state(QEMUFile *f, void *pv, size_t size) +{ + msix_load(pv, f); + return 0; +} + +static VMStateInfo vmstate_info_msix = { + .name = "msix state", + .get = get_msix_state, + .put = put_msix_state, +}; + +const VMStateDescription vmstate_msix = { + .name = "msix", + .fields = (VMStateField[]) { + { + .name = "msix", + .version_id = 0, + .field_exists = NULL, + .size = 0, /* ouch */ + .info = &vmstate_info_msix, + .flags = VMS_SINGLE, + .offset = 0, + }, + VMSTATE_END_OF_LIST() + } +}; |